Space Engineers
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
Sandbox.Game.Entities.MySkinnedEntity Class Reference
Inheritance diagram for Sandbox.Game.Entities.MySkinnedEntity:
VRage.Game.Entity.MyEntity VRage.ModAPI.IMyEntity VRage.Game.ModAPI.Ingame.IMyEntity Sandbox.Game.Entities.Character.MyCharacter Sandbox.Game.Entities.Character.MyCharacter

Public Member Functions

 MySkinnedEntity ()
 
override void Init (StringBuilder displayName, string model, MyEntity parentObject, float?scale, string modelCollision=null)
 
void SetBoneLODs (Dictionary< float, string[]> boneLODs)
 
virtual void UpdateAnimation (float distance)
 
virtual void 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. More...
 
Quaternion GetAdditionalRotation (string bone)
 
virtual void AddCommand (MyAnimationCommand command, bool sync=false)
 Enqueue animation command. Parameter sync is used in child classes. More...
 
- Public Member Functions inherited from VRage.Game.Entity.MyEntity
void DebugDraw ()
 
void DebugDrawInvalidTriangles ()
 
void AddDebugRenderComponent (MyDebugRenderComponentBase render)
 
void ClearDebugRenderComponents ()
 
MyEntity GetTopMostParent (Type type=null)
 Return top most parent of this entity More...
 
virtual List< MyHudEntityParamsGetHudParams (bool allowBlink)
 
 MyEntity ()
 
 MyEntity (bool initComponents=true)
 Initializes a new instance of the MyEntity class. More...
 
void CreateSync ()
 
MyEntitySubpart GetSubpart (string name)
 
bool TryGetSubpart (string name, out MyEntitySubpart subpart)
 
virtual void UpdateOnceBeforeFrame ()
 
virtual void UpdateBeforeSimulation ()
 
virtual void UpdateAfterSimulation ()
 
virtual void UpdatingStopped ()
 
virtual void UpdateBeforeSimulation10 ()
 Called each 10th frame if registered for update10 More...
 
virtual void UpdateAfterSimulation10 ()
 
virtual void UpdateBeforeSimulation100 ()
 Called each 100th frame if registered for update100 More...
 
virtual void UpdateAfterSimulation100 ()
 
virtual string GetFriendlyName ()
 
virtual MatrixD GetViewMatrix ()
 
void SetSpeedsAccordingToServerValues ()
 
virtual void SetWorldMatrix (MatrixD worldMatrix, bool forceUpdate=false, bool updateChildren=true)
 
virtual void DebugDrawPhysics ()
 Draw physical representation of entity More...
 
virtual bool GetIntersectionWithLine (ref LineD line, out Vector3D?v, bool useCollisionModel=true, IntersectionFlags flags=IntersectionFlags.ALL_TRIANGLES)
 
virtual bool GetIntersectionWithLine (ref LineD line, out VRage.Game.Models.MyIntersectionResultLineTriangleEx?t, IntersectionFlags flags=IntersectionFlags.ALL_TRIANGLES)
 
virtual Vector3D GetIntersectionWithLineAndBoundingSphere (ref LineD line, float boundingSphereRadiusMultiplier)
 
virtual bool GetIntersectionWithSphere (ref BoundingSphereD sphere)
 
void GetTrianglesIntersectingSphere (ref BoundingSphereD sphere, Vector3?referenceNormalVector, float?maxAngle, List< MyTriangle_Vertex_Normals > retTriangles, int maxNeighbourTriangles)
 
virtual bool DoOverlapSphereTest (float sphereRadius, Vector3D spherePos)
 
double GetSmallestDistanceBetweenCameraAndBoundingSphere ()
 
double GetLargestDistanceBetweenCameraAndBoundingSphere ()
 
double GetDistanceBetweenCameraAndBoundingSphere ()
 
double GetDistanceBetweenPlayerPositionAndBoundingSphere ()
 
double GetDistanceBetweenCameraAndPosition ()
 
virtual MyEntity GetBaseEntity ()
 
virtual void OnAddedToScene (object source)
 Called when [activated] which for entity means that was added to scene. More...
 
virtual void OnRemovedFromScene (object source)
 
void AddToGamePruningStructure ()
 
void RemoveFromGamePruningStructure ()
 
void UpdateGamePruningStructure ()
 
void RaisePhysicsChanged ()
 
void HackyComponentInitByMiroPleaseDontUseEver (MyDefinitionId id)
 DONT USE THIS METHOD, EVER! More...
 
virtual void Init (MyObjectBuilder_EntityBase objectBuilder)
 
virtual void RefreshModels (string model, string modelCollision)
 
void Delete ()
 Every object must have this method, but not every phys object must necessarily have something to cleanup More...
 
void Close ()
 This method marks this entity for close which means, that Close will be called after all entities are updated More...
 
virtual MyObjectBuilder_EntityBase GetObjectBuilder (bool copy=false)
 Gets object builder from object. More...
 
virtual void BeforeSave ()
 Called before method GetObjectBuilder, when saving sector More...
 
virtual void PrepareForDraw ()
 Method is called defacto from Update, preparation fo Draw More...
 
virtual void BeforePaste ()
 
virtual void AfterPaste ()
 
void SetEmissiveParts (string emissiveName, Color emissivePartColor, float emissivity)
 Sets the emissive value of a specific emissive material on entity. More...
 
void SetEmissivePartsForSubparts (string emissiveName, Color emissivePartColor, float emissivity)
 Sets the emissive value of a specific emissive material on all entity subparts. More...
 
override string ToString ()
 
virtual MyInventoryBase GetInventoryBase (int index)
 Search for inventory component with maching index. More...
 
MyInventoryBase GetInventoryBase ()
 Simply get the MyInventoryBase component stored in this entity. More...
 
delegate MyObjectBuilder_EntityBase MyEntityFactoryCreateObjectBuilderDelegate (MyEntity entity)
 
delegate MySyncComponentBase CreateDefaultSyncEntityDelegate (MyEntity thisEntity)
 
delegate bool MyWeldingGroupsGroupExistsDelegate (MyEntity entity)
 
virtual void SerializeControls (BitStream stream)
 
virtual void DeserializeControls (BitStream stream, bool outOfOrder)
 
virtual void ApplyLastControls ()
 
- Public Member Functions inherited from VRage.ModAPI.IMyEntity
bool GetIntersectionWithLine (ref LineD line, out VRage.Game.Models.MyIntersectionResultLineTriangleEx?tri, IntersectionFlags flags)
 
void GetTrianglesIntersectingSphere (ref BoundingSphereD sphere, Vector3?referenceNormalVector, float?maxAngle, System.Collections.Generic.List< MyTriangle_Vertex_Normals > retTriangles, int maxNeighbourTriangles)
 

Public Attributes

bool UseNewAnimationSystem = false
 VRAGE TODO: THIS IS TEMPORARY! Remove when by the time we use only the new animation system. More...
 
- Public Attributes inherited from VRage.Game.Entity.MyEntity
MyDefinitionId DefinitionId = null
 
string Name
 
bool DebugAsyncLoading
 
DebugCreatedBy DebugCreatedBy
 
float m_massChangeForCollisions = 1f
 
Vector3D m_serverPosition = new Vector3D()
 
Quaternion m_serverOrientation = new Quaternion()
 
MatrixD m_serverWorldMatrix = new MatrixD()
 
Vector3 m_serverLinearVelocity
 
Vector3 m_serverAngularVelocity
 
bool m_positionResetFromServer
 
bool SentFromServer
 
int GamePruningProxyId = MyVRageConstants.PRUNING_PROXY_ID_UNITIALIZED
 
int TopMostPruningProxyId = MyVRageConstants.PRUNING_PROXY_ID_UNITIALIZED
 
bool StaticForPruningStructure = false
 
int TargetPruningProxyId = MyVRageConstants.PRUNING_PROXY_ID_UNITIALIZED
 
Dictionary< IMyReplicable, Action > ReadyForReplicationAction = new Dictionary<IMyReplicable, Action>()
 

Protected Member Functions

void InitBones ()
 
virtual void CalculateTransforms (float distance)
 
bool TryGetAnimationDefinition (string animationSubtypeName, out MyAnimationDefinition animDefinition)
 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 More...
 
bool ProcessCommands ()
 Process all commands in the animation queue at once. If any command is generated during flushing, it will be processed later. More...
 
void AddBoneDecal (uint decalId, int boneIndex)
 
Parameters
positionPosition of the decal in the binding pose
More...
 
void FlushAnimationQueue ()
 Process all commands in the animation queue at once. If any command is generated during flushing, it is processed as well. More...
 
virtual void OnAnimationPlay (MyAnimationDefinition animDefinition, MyAnimationCommand command, ref string bonesArea, ref MyFrameOption frameOption, ref bool useFirstPersonVersion)
 Virtual method called when animation is started, used in MyCharacter. More...
 
void UpdateRenderObject ()
 
- Protected Member Functions inherited from VRage.Game.Entity.MyEntity
virtual bool CanBeAddedToRender ()
 
virtual MySyncComponentBase OnCreateSync ()
 
virtual void ClampToWorld ()
 
virtual void BeforeDelete ()
 
virtual void Closing ()
 
virtual void OnInventoryComponentAdded (MyInventoryBase inventory)
 
virtual void OnInventoryComponentRemoved (MyInventoryBase inventory)
 

Protected Attributes

ulong m_actualUpdateFrame = 0
 
ulong m_actualDrawFrame = 0
 
Dictionary< string, Quaternionm_additionalRotations = new Dictionary<string, Quaternion>()
 
- Protected Attributes inherited from VRage.Game.Entity.MyEntity
List< MyHudEntityParamsm_hudParams
 
MyModel m_modelCollision
 

Properties

MyAnimationControllerComponent AnimationController [get]
 
Matrix[] BoneAbsoluteTransforms [get]
 
Matrix[] BoneRelativeTransforms [get]
 
List< MyBoneDecalUpdateDecalBoneUpdates [get]
 
- Properties inherited from VRage.Game.Entity.MyEntity
MyEntityComponentContainer Components [get]
 
MyPositionComponentBase PositionComp [get, set]
 
MyRenderComponentBase Render [get, set]
 
MyGameLogicComponent GameLogic [get, set]
 
long EntityId [get, set]
 Entity id, can be set by subclasses (for example when using pool...) More...
 
MySyncComponentBase SyncObject [get, protected set]
 
MyModStorageComponentBase Storage [get, set]
 
bool Closed [get, protected set]
 
bool MarkedForClose [get, protected set]
 
virtual float MaxGlassDistSq [get]
 
bool Save [get, set]
 
bool IsPreview [get, set]
 
bool IsReadyForReplication [get, set]
 
MyEntityUpdateEnum NeedsUpdate [get, set]
 
MatrixD WorldMatrix [get, set]
 
MyEntity Parent [get]
 Gets or sets the parent. More...
 
MyHierarchyComponent< MyEntityHierarchy [get, set]
 
MyPhysicsComponentBase Physics [get, set]
 Gets the physic component of the entity. More...
 
bool InvalidateOnMove [get, set]
 
bool SyncFlag [get, set]
 
bool InScene [get, set]
 
virtual bool IsVolumetric [get]
 
virtual Vector3D LocationForHudMarker [get]
 
MyModel Model [get]
 
MyModel ModelCollision [get]
 
string DisplayName [get, set]
 
string DebugName [get]
 
Dictionary< string, MyEntitySubpartSubparts [get]
 
virtual bool IsCCDForProjectiles [get]
 
int InventoryCount [get]
 Iterate through inventories and return their count. More...
 
bool HasInventory [get]
 Returns true if this entity has got at least one inventory. Note that one aggregate inventory can contain zero simple inventories => zero will be returned even if GetInventoryBase() != null. More...
 
virtual String DisplayNameText [get, set]
 Display Name for GUI etc. Override in descendant classes. Usually used to display in terminal or inventory controls. More...
 
EntityFlags Flags [get, set]
 
- Properties inherited from VRage.ModAPI.IMyEntity
MyEntityComponentContainer Components [get]
 
MyPhysicsComponentBase Physics [get, set]
 
MyPositionComponentBase PositionComp [get, set]
 
MyRenderComponentBase Render [get, set]
 
MyEntityComponentBase GameLogic [get, set]
 
MyHierarchyComponentBase Hierarchy [get, set]
 
MySyncComponentBase SyncObject [get]
 
MyModStorageComponentBase Storage [get, set]
 Custom storage for mods. Shared with all mods. More...
 
EntityFlags Flags [get, set]
 
long EntityId [get, set]
 
string Name [get, set]
 
bool MarkedForClose [get]
 
bool Closed [get]
 
bool DebugAsyncLoading [get]
 
bool Save [get, set]
 
MyPersistentEntityFlags2 PersistentFlags [get, set]
 
MyEntityUpdateEnum NeedsUpdate [get, set]
 
IMyEntity Parent [get]
 
Matrix LocalMatrix [get, set]
 
bool NearFlag [get, set]
 
bool CastShadows [get, set]
 
bool FastCastShadowResolve [get, set]
 
bool NeedsResolveCastShadow [get, set]
 
float MaxGlassDistSq [get]
 
bool NeedsDraw [get, set]
 
bool NeedsDrawFromParent [get, set]
 
bool Transparent [get, set]
 
bool ShadowBoxLod [get, set]
 
bool SkipIfTooSmall [get, set]
 
bool Visible [get, set]
 
bool InScene [get, set]
 
bool InvalidateOnMove [get]
 
new VRageMath.MatrixD WorldMatrix [get, set]
 
VRageMath.MatrixD WorldMatrixInvScaled [get]
 
VRageMath.MatrixD WorldMatrixNormalizedInv [get]
 
bool IsVolumetric [get]
 
BoundingBox LocalAABB [get, set]
 
BoundingBox LocalAABBHr [get]
 
BoundingSphere LocalVolume [get, set]
 
Vector3 LocalVolumeOffset [get, set]
 
Vector3 LocationForHudMarker [get]
 
bool IsCCDForProjectiles [get]
 
string DisplayName [get, set]
 
- Properties inherited from VRage.Game.ModAPI.Ingame.IMyEntity
MyEntityComponentContainer Components [get]
 
long EntityId [get]
 
VRageMath.BoundingBoxD WorldAABB [get]
 
VRageMath.BoundingBoxD WorldAABBHr [get]
 
VRageMath.MatrixD WorldMatrix [get]
 
VRageMath.BoundingSphereD WorldVolume [get]
 
VRageMath.BoundingSphereD WorldVolumeHr [get]
 

Additional Inherited Members

- Static Public Attributes inherited from VRage.Game.Entity.MyEntity
static Action< MyEntityAddToGamePruningStructureExtCallBack = null
 
static Action< MyEntityRemoveFromGamePruningStructureExtCallBack = null
 
static Action< MyEntityUpdateGamePruningStructureExtCallBack = null
 
static MyEntityFactoryCreateObjectBuilderDelegate MyEntityFactoryCreateObjectBuilderExtCallback = null
 
static CreateDefaultSyncEntityDelegate CreateDefaultSyncEntityExtCallback
 
static Action< MyEntityMyWeldingGroupsAddNodeExtCallback = null
 
static Action< MyEntityMyWeldingGroupsRemoveNodeExtCallback = null
 
static Action< MyEntity, List< MyEntity > > MyWeldingGroupsGetGroupNodesExtCallback = null
 
static MyWeldingGroupsGroupExistsDelegate MyWeldingGroupsGroupExistsExtCallback = null
 
static Action< MyEntityMyProceduralWorldGeneratorTrackEntityExtCallback = null
 
static Action< MyEntityCreateStandardRenderComponentsExtCallback = null
 
static Action< MyComponentContainer, MyObjectBuilderType, MyStringHash, MyObjectBuilder_ComponentContainerInitComponentsExtCallback = null
 
static Func< MyObjectBuilder_EntityBase, bool, MyEntityMyEntitiesCreateFromObjectBuilderExtCallback = null
 
- Static Protected Member Functions inherited from VRage.Game.Entity.MyEntity
static void UpdateNamedEmissiveParts (uint renderObjectId, string emissiveName, Color emissivePartColor, float emissivity)
 
- Events inherited from VRage.Game.Entity.MyEntity
Action< MyEntityOnMarkForClose
 This event may not be invoked at all, when calling MyEntities.CloseAll, marking is bypassed More...
 
Action< MyEntityOnClose
 
Action< MyEntityOnClosing
 
Action< MyEntityOnPhysicsChanged
 
- Events inherited from VRage.ModAPI.IMyEntity
Action< IMyEntityOnClose
 
Action< IMyEntityOnClosing
 
Action< IMyEntityOnMarkForClose
 
Action< IMyEntityOnPhysicsChanged
 

Detailed Description

Definition at line 66 of file MySkinnedEntity.cs.

Constructor & Destructor Documentation

Sandbox.Game.Entities.MySkinnedEntity.MySkinnedEntity ( )
inline

Definition at line 116 of file MySkinnedEntity.cs.

Member Function Documentation

void Sandbox.Game.Entities.MySkinnedEntity.AddBoneDecal ( uint  decalId,
int  boneIndex 
)
inlineprotected

Parameters
positionPosition of the decal in the binding pose

Definition at line 460 of file MySkinnedEntity.cs.

virtual void Sandbox.Game.Entities.MySkinnedEntity.AddCommand ( MyAnimationCommand  command,
bool  sync = false 
)
inlinevirtual

Enqueue animation command. Parameter sync is used in child classes.

Reimplemented in Sandbox.Game.Entities.Character.MyCharacter.

Definition at line 568 of file MySkinnedEntity.cs.

virtual void Sandbox.Game.Entities.MySkinnedEntity.CalculateTransforms ( float  distance)
inlineprotectedvirtual

Reimplemented in Sandbox.Game.Entities.Character.MyCharacter.

Definition at line 376 of file MySkinnedEntity.cs.

void Sandbox.Game.Entities.MySkinnedEntity.FlushAnimationQueue ( )
inlineprotected

Process all commands in the animation queue at once. If any command is generated during flushing, it is processed as well.

Definition at line 492 of file MySkinnedEntity.cs.

Quaternion Sandbox.Game.Entities.MySkinnedEntity.GetAdditionalRotation ( string  bone)
inline

Definition at line 244 of file MySkinnedEntity.cs.

override void Sandbox.Game.Entities.MySkinnedEntity.Init ( StringBuilder  displayName,
string  model,
MyEntity  parentObject,
float?  scale,
string  modelCollision = null 
)
inlinevirtual

Reimplemented from VRage.Game.Entity.MyEntity.

Definition at line 134 of file MySkinnedEntity.cs.

void Sandbox.Game.Entities.MySkinnedEntity.InitBones ( )
inlineprotected

Definition at line 145 of file MySkinnedEntity.cs.

virtual void Sandbox.Game.Entities.MySkinnedEntity.ObtainBones ( )
inlinevirtual

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.

Definition at line 223 of file MySkinnedEntity.cs.

virtual void Sandbox.Game.Entities.MySkinnedEntity.OnAnimationPlay ( MyAnimationDefinition  animDefinition,
MyAnimationCommand  command,
ref string  bonesArea,
ref MyFrameOption  frameOption,
ref bool  useFirstPersonVersion 
)
inlineprotectedvirtual

Virtual method called when animation is started, used in MyCharacter.

Reimplemented in Sandbox.Game.Entities.Character.MyCharacter.

Definition at line 581 of file MySkinnedEntity.cs.

bool Sandbox.Game.Entities.MySkinnedEntity.ProcessCommands ( )
inlineprotected

Process all commands in the animation queue at once. If any command is generated during flushing, it will be processed later.

Definition at line 445 of file MySkinnedEntity.cs.

void Sandbox.Game.Entities.MySkinnedEntity.SetBoneLODs ( Dictionary< float, string[]>  boneLODs)
inline

Definition at line 154 of file MySkinnedEntity.cs.

bool Sandbox.Game.Entities.MySkinnedEntity.TryGetAnimationDefinition ( string  animationSubtypeName,
out MyAnimationDefinition  animDefinition 
)
inlineprotected

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

Definition at line 410 of file MySkinnedEntity.cs.

virtual void Sandbox.Game.Entities.MySkinnedEntity.UpdateAnimation ( float  distance)
inlinevirtual

Reimplemented in Sandbox.Game.Entities.Character.MyCharacter.

Definition at line 162 of file MySkinnedEntity.cs.

void Sandbox.Game.Entities.MySkinnedEntity.UpdateRenderObject ( )
inlineprotected

Definition at line 585 of file MySkinnedEntity.cs.

Member Data Documentation

ulong Sandbox.Game.Entities.MySkinnedEntity.m_actualDrawFrame = 0
protected

Definition at line 98 of file MySkinnedEntity.cs.

ulong Sandbox.Game.Entities.MySkinnedEntity.m_actualUpdateFrame = 0
protected

Definition at line 96 of file MySkinnedEntity.cs.

Dictionary<string, Quaternion> Sandbox.Game.Entities.MySkinnedEntity.m_additionalRotations = new Dictionary<string, Quaternion>()
protected

Definition at line 100 of file MySkinnedEntity.cs.

bool Sandbox.Game.Entities.MySkinnedEntity.UseNewAnimationSystem = false

VRAGE TODO: THIS IS TEMPORARY! Remove when by the time we use only the new animation system.

Definition at line 71 of file MySkinnedEntity.cs.

Property Documentation

MyAnimationControllerComponent Sandbox.Game.Entities.MySkinnedEntity.AnimationController
get

Definition at line 88 of file MySkinnedEntity.cs.

Matrix [] Sandbox.Game.Entities.MySkinnedEntity.BoneAbsoluteTransforms
get

Definition at line 90 of file MySkinnedEntity.cs.

Matrix [] Sandbox.Game.Entities.MySkinnedEntity.BoneRelativeTransforms
get

Definition at line 91 of file MySkinnedEntity.cs.

List<MyBoneDecalUpdate> Sandbox.Game.Entities.MySkinnedEntity.DecalBoneUpdates
get

Definition at line 94 of file MySkinnedEntity.cs.


The documentation for this class was generated from the following file: