lambdacube-engine-0.1.1: Graphics/LambdaCube/AnimationState.hs
module Graphics.LambdaCube.AnimationState where
import Data.Map
import Graphics.LambdaCube.Types
{-| Represents the state of an animation and the weight of it's influence.
@remarks
Other classes can hold instances of this class to store the state of any animations
they are using.
-}
data AnimationState
= AnimationState
{ asBlendMask :: [Float] -- ^ the blend mask (containing per bone weights)
, asAnimationName :: String
, asTimePos :: FloatType
, asLength :: FloatType
, asWeight :: FloatType
, asEnabled :: Bool
, asLoop :: Bool
}
-- | Class encapsulating a set of AnimationState objects.
data AnimationStateSet
= AnimationStateSet
{ assDirtyFrameNumber :: Int
, assAnimationStates :: Map String AnimationState
, assEnabledAnimationStates :: [AnimationState] -- ^ List of enabled animation states
}