Class AnimatedModel
- Namespace
- LibGFX.Core.GameElements
- Assembly
- LibGFX.dll
An animated 3D model game element
public class AnimatedModel : GameElement, IIdentifier, IPropertyTable, ISerialization
- Inheritance
-
AnimatedModel
- Implements
- Inherited Members
Constructors
AnimatedModel()
Creates a new instance of the AnimatedModel class.
public AnimatedModel()
AnimatedModel(string, SkinnedMeshModel)
Creates a new animated model game element Can share the same model instance with other AnimatedModel elements
public AnimatedModel(string name, SkinnedMeshModel model)
Parameters
namestringmodelSkinnedMeshModel
AnimatedModel(string, Vector3, SkinnedMeshModel)
Creates a new animated model game element
public AnimatedModel(string name, Vector3 position, SkinnedMeshModel model)
Parameters
namestringpositionVector3modelSkinnedMeshModel
AnimatedModel(string, Vector3, Vector3, SkinnedMeshModel)
Creates a new animated model game element
public AnimatedModel(string name, Vector3 position, Vector3 scale, SkinnedMeshModel model)
Parameters
namestringpositionVector3scaleVector3modelSkinnedMeshModel
Properties
AnimationSpeed
The animation speed multiplier
public float AnimationSpeed { get; set; }
Property Value
Animator
The animator for this model
public Animator Animator { get; }
Property Value
HasTransparency
Determines if the game element has transparency.
public override bool HasTransparency { get; }
Property Value
Methods
ComputeAABB()
Computes the axis-aligned bounding box of the animated model
public override void ComputeAABB()
GetModel()
Gets the underlying skinned mesh model associated with this instance.
public SkinnedMeshModel GetModel()
Returns
- SkinnedMeshModel
The SkinnedMeshModel representing the current skinned mesh model.
PlayAnimation(Animation3D)
Plays an animation
public void PlayAnimation(Animation3D animation)
Parameters
animationAnimation3D
PlayAnimation(int)
Plays an animation by index
public void PlayAnimation(int index)
Parameters
indexint
PlayAnimation(string)
Plays an animation by name
public void PlayAnimation(string name)
Parameters
namestring
Render(BaseScene, Viewport, IRenderDevice, Camera)
Renders the animated model
public override void Render(BaseScene scene, Viewport viewport, IRenderDevice renderer, Camera camera)
Parameters
sceneBaseSceneviewportViewportrendererIRenderDevicecameraCamera
RenderShadow(BaseScene, Viewport, IRenderDevice)
Renders the shadow of the animated model
public override void RenderShadow(BaseScene scene, Viewport viewport, IRenderDevice renderer)
Parameters
sceneBaseSceneviewportViewportrendererIRenderDevice
Update(BaseScene, float)
Updates the animated model
public override void Update(BaseScene scene, float dt)