/**
 * @class kAnimTrackComponent
 * @brief Handles Animation for skinned mesh actors
 */
class kAnimTrackComponent
{
public:

	/**
	 * @brief Returns the actor this component is attached to
	 */
	kActor @Owner();
	
	/**
	 * @brief Toggle Visibility
	 */
	void Toggle(const bool isVisible);
	
	/**
	 * @brief Returns the number of frames in the current playing animation
	 */
	const int NumFrames();
	
	/**
	 * @brief Returns the current frame index in the current playing animation
	 */
	const int CurrentFrame();
	
	/**
	 * @brief Sets the current animation as well as it's play speed and animFlags
	 */
	void Set(const int animID, float animSpeed, EnumAnimStateFlags animStateFlags);
	
	/**
	 * @brief Sets and blends the new animation with the previous animation
	 */
	void Blend(const int animID, float animSpeed, float blendSpeed, EnumAnimStateFlags animStateFlags);
	
	/**
	 * @brief Returns true if animID exists in the actors animations
	 */
	bool CheckAnimID(const int animID);
	
	/**
	 * @brief Is playing an animation
	 */
	bool IsPlaying(const int animID);
	
	const float TrackTime();
	
	/**
	 * @brief Amount of time in seconds the animation has been playing for
	 */
	const float PlayTime();
	
	void Resume();
	void Pause();
	void Stop();
	const int PlayingID();
	
	/**
	 * @brief Return true when the animation has played through till the end
	 */
	const const bool CycleCompleted();
	
	/**
	 * @brief Returns true if it's looping
	 */
	const bool Looping();
	
	/**
	 * @brief Returns true if animation is currently blending
	 */
	const bool Blending();
	
	/**
	 * @brief Returns true if no animation is playing
	 */
	const bool Stopped();
	
	/**
	 * @brief Get/Set the movement clipFlags. Used when the animation has rootmotion.
	 */
	EnumClipFlags &MovementClipFlags();
	
	/**
	 * @brief Get/Set The current animation flags.
	 */
	EnumAnimStateFlags &Flags();
	
	/**
	 * @brief Skips the animation to the last frame.
	 */
	void SetLastFrame(const bool unknown = false);
	
	/**
	 * @brief Changes the current animations speed
	 */
	void ChangeSpeed(const float speed);
	
	/**
	 * @brief The number of animations this animComponent has
	 */
	const uint AnimCount();
};
