2#include "../base/foray_framerenderinfo.hpp"
3#include "../foray_basics.hpp"
4#include "../foray_glm.hpp"
31 inline AnimationKeyframe(
float time,
const glm::vec4& value,
const glm::vec4& intangent,
const glm::vec4& outtangent)
104 void
Update(const base::FrameRenderInfo&);
Represents an animation, defined by atleast one channel affecting one node property each.
Definition foray_animation.hpp:94
std::vector< AnimationChannel > mChannels
Collection of channels. These bind keyframe values from samplers to node properties.
Definition foray_animation.hpp:112
float mEnd
The highest keyframe time value.
Definition foray_animation.hpp:116
void Update(const base::FrameRenderInfo &)
Applies current playback state.
float mStart
The lowest keyframe time value.
Definition foray_animation.hpp:114
std::vector< AnimationSampler > mSamplers
Collection of samplers. These contain raw keyframe values.
Definition foray_animation.hpp:110
PlaybackConfig mPlaybackConfig
Configuration representing current playback state.
Definition foray_animation.hpp:118
std::string mName
Animation name.
Definition foray_animation.hpp:108
A scene node. Extends the registry with hierarchical information.
Definition foray_node.hpp:8
#define FORAY_PROPERTY_V(member)
Getter+Setter shorthand for value types.
Definition foray_basics.hpp:81
#define FORAY_PROPERTY_R(member)
Getter+Setter shorthand for reference types.
Definition foray_basics.hpp:86
Definition foray_animation.hpp:8
EAnimationTargetPath
Target path defines which aspect of a nodes transforms the animation channel targets.
Definition foray_animation.hpp:19
EAnimationInterpolation
Interpolation mode defines how values are interpolated between keyframes.
Definition foray_animation.hpp:11
Definition foray_env.hpp:92
A channel is the animation of a single node property.
Definition foray_animation.hpp:70
int32_t SamplerIndex
Definition foray_animation.hpp:72
EAnimationTargetPath TargetPath
Definition foray_animation.hpp:74
Node * Target
Definition foray_animation.hpp:73
A set of values at a time point.
Definition foray_animation.hpp:27
AnimationKeyframe(float time, const glm::vec4 &value, const glm::vec4 &intangent, const glm::vec4 &outtangent)
Definition foray_animation.hpp:31
float Time
Definition foray_animation.hpp:36
glm::vec4 OutTangent
Definition foray_animation.hpp:39
glm::vec4 Value
Definition foray_animation.hpp:37
AnimationKeyframe(float time, const glm::vec4 &value)
Definition foray_animation.hpp:30
AnimationKeyframe()
Definition foray_animation.hpp:29
glm::vec4 InTangent
Definition foray_animation.hpp:38
A collection of keyframes.
Definition foray_animation.hpp:44
EAnimationInterpolation Interpolation
Definition foray_animation.hpp:61
glm::quat SampleQuat(float time) const
Get an interpolated sample.
static glm::vec4 InterpolateCubicSpline(float time, const AnimationKeyframe *lower, const AnimationKeyframe *upper)
static glm::quat ReinterpreteAsQuat(glm::vec4)
static glm::vec4 InterpolateStep(float time, const AnimationKeyframe *lower, const AnimationKeyframe *upper)
static glm::quat InterpolateLinearQuat(float time, const AnimationKeyframe *lower, const AnimationKeyframe *upper)
std::vector< AnimationKeyframe > Keyframes
Definition foray_animation.hpp:62
static glm::vec4 InterpolateLinear(float time, const AnimationKeyframe *lower, const AnimationKeyframe *upper)
glm::vec3 SampleVec(float time) const
Get an interpolated sample.
void SelectKeyframe(float time, const AnimationKeyframe *&lower, const AnimationKeyframe *&upper) const
Definition foray_animation.hpp:78
bool Enable
If false, playback is paused.
Definition foray_animation.hpp:81
float ConstantDelta
If non zero, will advance each frame with a constant delta time as opposed to the render engines fram...
Definition foray_animation.hpp:87
float Cursor
Current playback position used for interpolation.
Definition foray_animation.hpp:89
float PlaybackSpeed
Speed multiplier.
Definition foray_animation.hpp:85
bool Loop
The animation is looped if set to true.
Definition foray_animation.hpp:83