Class AnimatedModelComponent

Inheritance Relationships

Base Type

Class Documentation

class AnimatedModelComponent : public RenderableComponent

Component for skeletal animation models.

Public Types

enum AnimationMode

Values:

None = 0
Looping = 1
Alternating = 2

Public Functions

AnimatedModelComponent(Entity &owner, const JSON::json &data)
~AnimatedModelComponent()
bool preRender(float deltaMilliseconds)
void render(float viewDistance)
String getCurrentAnimationName() const
float getCurrentTime() const
void checkCurrentAnimationExists()
void update(float deltaMilliseconds)
void setPlaying(bool enabled)
void play()
void stop()
void setAnimation(const String &name)
void swapAnimation(const String &name)
void transition(const String &name, float transitionTime)
void swapTransition(const String &name, float transitionTime)
void setSpeedMultiplier(float speedMul)
float getStartTime() const
float getEndTime() const
bool isPlaying() const
bool hasEnded() const
void assignBoundingBox()
void assignOverrides(Ref<AnimatedModelResourceFile> file, const HashMap<String, String> &materialOverrides)
void setAnimatedResourceFile(Ref<AnimatedModelResourceFile> file, const HashMap<String, String> &materialOverrides)
Ref<AnimatedModelResourceFile> getAnimatedResourceFile() const
bool setupData()

Perform setting up internal data needed from other components after they have been added to the owning entity.

JSON::json getJSON() const

Get JSON representation of the component data needed to re-construct component from memory.

void draw()

Expose the component data with ImGui.

Protected Attributes

float m_TimeDirection = 1.0f
float m_TransitionTime = 1.0f
float m_RemainingTransitionTime = 0.0f
Ref<AnimatedModelResourceFile> m_AnimatedModelResourceFile
String m_CurrentAnimationName
float m_CurrentTimePosition
float m_SpeedMultiplier
RootExclusion m_RootExclusion
bool m_IsPlaying
bool m_IsPlayOnStart
AnimationMode m_AnimationMode
Vector<Matrix> m_FinalTransforms