Show / Hide Table of Contents

Class MyAnimationControllerComponent

Entity component containing animation controller.

Inheritance
System.Object
MyComponentBase
MyEntityComponentBase
MyAnimationControllerComponent
Inherited Members
MyEntityComponentBase.Container
MyEntityComponentBase.Entity
MyEntityComponentBase.AttachSyncToEntity
MyEntityComponentBase.OnAfterAddedToContainer
MyEntityComponentBase.BeforeRemovedFromContainer
MyComponentBase.SetContainer(IMyComponentContainer)
MyComponentBase.GetAs<T>()
MyComponentBase.OnAddedToScene()
MyComponentBase.OnRemovedFromScene()
MyComponentBase.Serialize(Boolean)
MyComponentBase.Deserialize(MyObjectBuilder_ComponentBase)
MyComponentBase.Init(MyComponentDefinitionBase)
MyComponentBase.IsSerialized()
MyComponentBase.RemoveExistingComponentOnNewInsert
MyComponentBase.ContainerBase
Namespace: VRage.Game.Components
Assembly: VRage.Game.dll
Syntax
public class MyAnimationControllerComponent : MyEntityComponentBase, IMyEntityComponentBase, IMyComponentBase

Constructors

MyAnimationControllerComponent(MyEntity, Action, IMyTerrainHeightProvider)

Declaration
public MyAnimationControllerComponent(MyEntity entity, Action obtainBones, IMyTerrainHeightProvider heightProvider)
Parameters
Type Name Description
MyEntity entity
System.Action obtainBones
VRageRender.Animations.IMyTerrainHeightProvider heightProvider

Fields

CameraDistance

Declaration
public float CameraDistance
Field Value
Type Description
System.Single

MainLayerAnimationSpeed

Declaration
public float MainLayerAnimationSpeed
Field Value
Type Description
System.Single

OtherLayersAnimationSpeed

Declaration
public float OtherLayersAnimationSpeed
Field Value
Type Description
System.Single

ReloadBonesNeeded

Declaration
public readonly Action ReloadBonesNeeded
Field Value
Type Description
System.Action

Properties

BoneAbsoluteTransforms

Declaration
public Matrix[] BoneAbsoluteTransforms { get; }
Property Value
Type Description
Matrix[]

BoneRelativeTransforms

Declaration
public Matrix[] BoneRelativeTransforms { get; }
Property Value
Type Description
Matrix[]

CharacterBones

Get reference to array of character pack and its contents.

Declaration
public MyCharacterBone[] CharacterBones { get; }
Property Value
Type Description
VRageRender.Animations.MyCharacterBone[]

CharacterBonesSorted

Declaration
public MyCharacterBone[] CharacterBonesSorted { get; }
Property Value
Type Description
VRageRender.Animations.MyCharacterBone[]

ComponentTypeDebugString

Name of the component type for debug purposes (e.g.: "Position")

Declaration
public override string ComponentTypeDebugString { get; }
Property Value
Type Description
System.String
Overrides
MyEntityComponentBase.ComponentTypeDebugString

Controller

Get the animation controller instance.

Declaration
public MyAnimationController Controller { get; }
Property Value
Type Description
VRageRender.Animations.MyAnimationController

InverseKinematics

Get the instance of inverse kinematics.

Declaration
public MyAnimationInverseKinematics InverseKinematics { get; }
Property Value
Type Description
VRageRender.Animations.MyAnimationInverseKinematics

LastFrameActions

Declaration
public List<MyStringId> LastFrameActions { get; }
Property Value
Type Description
System.Collections.Generic.List<MyStringId>

LastRawBoneResult

Declaration
public MyAnimationClip.BoneState[] LastRawBoneResult { get; }
Property Value
Type Description
VRageRender.Animations.MyAnimationClip.BoneState[]

SourceId

Declaration
public MyDefinitionId SourceId { get; set; }
Property Value
Type Description
MyDefinitionId

Variables

Get the variable storage of animation controller instance. Shortcut.

Declaration
public IMyVariableStorage<float> Variables { get; }
Property Value
Type Description
VRage.Generics.IMyVariableStorage<System.Single>

Methods

ApplyVariables()

Declaration
public void ApplyVariables()

AttachAnimationEventCallback(Action<List<String>>)

Declaration
public void AttachAnimationEventCallback(Action<List<string>> action)
Parameters
Type Name Description
System.Action<System.Collections.Generic.List<System.String>> action

Clear()

Declaration
public void Clear()

DetachAnimationEventCallback(Action<List<String>>)

Declaration
public void DetachAnimationEventCallback(Action<List<string>> action)
Parameters
Type Name Description
System.Action<System.Collections.Generic.List<System.String>> action

FindBone(String, out Int32)

Declaration
public MyCharacterBone FindBone(string name, out int index)
Parameters
Type Name Description
System.String name
System.Int32 index
Returns
Type Description
VRageRender.Animations.MyCharacterBone

FinishUpdate()

Declaration
public void FinishUpdate()

GetKeyedAnimationTracks(String)

Declaration
public List<MyAnimationTreeNode> GetKeyedAnimationTracks(string key)
Parameters
Type Name Description
System.String key
Returns
Type Description
System.Collections.Generic.List<VRageRender.Animations.MyAnimationTreeNode>

MarkAsValid()

Declaration
public void MarkAsValid()

OnAddedToContainer()

Component was added in the entity component container.

Declaration
public override void OnAddedToContainer()
Overrides
MyEntityComponentBase.OnAddedToContainer()

OnBeforeRemovedFromContainer()

Component will be removed from entity component container.

Declaration
public override void OnBeforeRemovedFromContainer()
Overrides
MyEntityComponentBase.OnBeforeRemovedFromContainer()

SetCharacterBones(MyCharacterBone[], Matrix[], Matrix[])

Declaration
public void SetCharacterBones(MyCharacterBone[] characterBones, Matrix[] relativeTransforms, Matrix[] absoluteTransforms)
Parameters
Type Name Description
VRageRender.Animations.MyCharacterBone[] characterBones
Matrix[] relativeTransforms
Matrix[] absoluteTransforms

TriggerAction(MyStringId, String[])

Trigger an action in the layers specified. If no layers are specified, it is triggered for all instead. If there is a transition having given (non-null) name, it is followed immediatelly. Conditions of transition are ignored. This is a shortcut to Controller.TriggerAction.

Declaration
public void TriggerAction(MyStringId actionName, string[] layers = null)
Parameters
Type Name Description
MyStringId actionName
System.String[] layers

Update()

Declaration
public bool Update()
Returns
Type Description
System.Boolean

UpdateInverseKinematics()

Declaration
public void UpdateInverseKinematics()

UpdateTransformations()

Declaration
public void UpdateTransformations()

Events

ActionTriggered

Declaration
public event Action<MyStringId> ActionTriggered
Event Type
Type Description
System.Action<MyStringId>

Extension Methods

MyEntityContainerEventExtensions.RegisterForEntityEvent(MyEntityComponentBase, MyStringHash, MyEntityContainerEventExtensions.EntityEventHandler)
MyEntityContainerEventExtensions.RegisterForEntityEvent(MyEntityComponentBase, MyEntity, MyStringHash, MyEntityContainerEventExtensions.EntityEventHandler)
MyEntityContainerEventExtensions.UnregisterForEntityEvent(MyEntityComponentBase, MyEntity, MyStringHash)
MyEntityContainerEventExtensions.RaiseEntityEvent(MyEntityComponentBase, MyStringHash, MyEntityContainerEventExtensions.EntityEventParams)
MyAnimationControllerComponentLoadFromDef.InitFromDefinition(MyAnimationControllerComponent, MyAnimationControllerDefinition, Boolean)
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾