Class MySkinnedEntity
Inheritance
System.Object
MySkinnedEntity
Assembly: Sandbox.Game.dll
Syntax
public class MySkinnedEntity : MyEntity, IMySkinnedEntity, IMyParallelUpdateable, IMyEntity, IMyEntity
Constructors
MySkinnedEntity()
Declaration
Fields
m_actualDrawFrame
Declaration
protected ulong m_actualDrawFrame
Field Value
Type |
Description |
System.UInt64 |
|
m_actualUpdateFrame
Declaration
protected ulong m_actualUpdateFrame
Field Value
Type |
Description |
System.UInt64 |
|
m_additionalRotations
Declaration
protected Dictionary<string, Quaternion> m_additionalRotations
Field Value
Type |
Description |
System.Collections.Generic.Dictionary<System.String, Quaternion> |
|
UseNewAnimationSystem
VRAGE TODO: THIS IS TEMPORARY! Remove when by the time we use only the new animation system.
Declaration
public bool UseNewAnimationSystem
Field Value
Type |
Description |
System.Boolean |
|
Properties
AnimationController
Declaration
public MyAnimationControllerComponent AnimationController { get; }
Property Value
Declaration
public Matrix[] BoneAbsoluteTransforms { get; }
Property Value
Declaration
public Matrix[] BoneRelativeTransforms { get; }
Property Value
DecalBoneUpdates
Declaration
public List<MyBoneDecalUpdate> DecalBoneUpdates { get; }
Property Value
Type |
Description |
System.Collections.Generic.List<VRageRender.Messages.MyBoneDecalUpdate> |
|
UpdateFlags
Declaration
public MyParallelUpdateFlags UpdateFlags { get; }
Property Value
Methods
AddBoneDecal(UInt32, Int32)
Declaration
protected void AddBoneDecal(uint decalId, int boneIndex)
Parameters
Type |
Name |
Description |
System.UInt32 |
decalId |
|
System.Int32 |
boneIndex |
|
AddCommand(MyAnimationCommand, Boolean)
Enqueue animation command. Parameter sync is used in child classes.
Declaration
public virtual void AddCommand(MyAnimationCommand command, bool sync = false)
Parameters
Declaration
protected virtual void CalculateTransforms(float distance)
Parameters
Type |
Name |
Description |
System.Single |
distance |
|
FlushAnimationQueue()
Process all commands in the animation queue at once. If any command is generated during flushing, it is processed as well.
Declaration
protected void FlushAnimationQueue()
GetAdditionalRotation(String)
Declaration
public Quaternion GetAdditionalRotation(string bone)
Parameters
Type |
Name |
Description |
System.String |
bone |
|
Returns
Init(StringBuilder, String, MyEntity, Nullable<Single>, String)
Declaration
public override void Init(StringBuilder displayName, string model, MyEntity parentObject, Nullable<float> scale, string modelCollision = null)
Parameters
Type |
Name |
Description |
System.Text.StringBuilder |
displayName |
|
System.String |
model |
|
MyEntity |
parentObject |
|
System.Nullable<System.Single> |
scale |
|
System.String |
modelCollision |
|
Overrides
InitBones()
Declaration
protected void InitBones()
ObtainBones()
Get the bones from the model and create a bone class object for
each bone. We use our bone class to do the real animated bone work.
Declaration
public virtual void ObtainBones()
OnAnimationPlay(MyAnimationDefinition, MyAnimationCommand, ref String, ref MyFrameOption, ref Boolean)
Virtual method called when animation is started, used in MyCharacter.
Declaration
protected virtual void OnAnimationPlay(MyAnimationDefinition animDefinition, MyAnimationCommand command, ref string bonesArea, ref MyFrameOption frameOption, ref bool useFirstPersonVersion)
Parameters
Type |
Name |
Description |
VRage.Game.Definitions.Animation.MyAnimationDefinition |
animDefinition |
|
MyAnimationCommand |
command |
|
System.String |
bonesArea |
|
MyFrameOption |
frameOption |
|
System.Boolean |
useFirstPersonVersion |
|
ProcessCommands()
Process all commands in the animation queue at once.
If any command is generated during flushing, it will be processed later.
Declaration
protected bool ProcessCommands()
Returns
Type |
Description |
System.Boolean |
|
SetBoneLODs(Dictionary<Single, String[]>)
Declaration
public void SetBoneLODs(Dictionary<float, string[]> boneLODs)
Parameters
Type |
Name |
Description |
System.Collections.Generic.Dictionary<System.Single, System.String[]> |
boneLODs |
|
TryGetAnimationDefinition(String, out MyAnimationDefinition)
Try getting animation definition matching given subtype name.
VRage TODO: dependency on MyDefinitionManager, do we really need it here?
backward compatibility is for modders?
move backward compatibility to MyDefinitionManager.TryGetAnimationDefinition? then we do not need this method
marked as obsolete, needs to be resolved
Declaration
protected bool TryGetAnimationDefinition(string animationSubtypeName, out MyAnimationDefinition animDefinition)
Parameters
Type |
Name |
Description |
System.String |
animationSubtypeName |
|
VRage.Game.Definitions.Animation.MyAnimationDefinition |
animDefinition |
|
Returns
Type |
Description |
System.Boolean |
|
UpdateAfterSimulationParallel()
Declaration
public virtual void UpdateAfterSimulationParallel()
UpdateAnimation(Single)
Declaration
public virtual void UpdateAnimation(float distance)
Parameters
Type |
Name |
Description |
System.Single |
distance |
|
UpdateBeforeSimulationParallel()
Declaration
public virtual void UpdateBeforeSimulationParallel()
UpdateControl(Single)
Declaration
public virtual void UpdateControl(float distance)
Parameters
Type |
Name |
Description |
System.Single |
distance |
|
UpdateRenderObject()
Declaration
protected void UpdateRenderObject()
Implements
Extension Methods