Nebula
Loading...
Searching...
No Matches
clipplayback.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
12//------------------------------------------------------------------------------
13#if WITH_NEBULA_EDITOR
15#include "util/array.h"
16#include "util/string.h"
17#include <functional>
18
19namespace GraphicsFeature
20{
21
23struct ClipMarker
24{
25 Util::String clip;
26 Util::String name;
27 float start = 0.0f;
28 float end = 0.0f;
29 bool highlight = false;
30 bool point = false;
32 IndexT id = InvalidIndex;
33};
35using ClipMarkerChanged = std::function<void(const ClipMarker& marker, float start, float end, bool done)>;
36
38struct ClipPlayback
39{
41 bool loop = true;
43 float speed = 1.0f;
46 float fade = 0.0f;
47};
48
52void AnimationClips(const Graphics::GraphicsEntityId character, ClipPlayback& playback, IndexT& clip, const Util::Array<ClipMarker>& markers = Util::Array<ClipMarker>(), const ClipMarkerChanged& onMarkerChanged = nullptr);
53
54} // namespace GraphicsFeature
55#endif // WITH_NEBULA_EDITOR
Definition graphicsfeatureunit.cc:66
ClipStatus::Type clip(const plane &plane, const line &l, line &outClippedLine)
Definition plane.h:214
int IndexT
Definition types.h:49