Space Engineers
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Properties | List of all members
VRage.Game.Components.MyPositionComponent Class Reference
Inheritance diagram for VRage.Game.Components.MyPositionComponent:
VRage.Game.Components.MyPositionComponentBase VRage.Game.Components.MyEntityComponentBase VRage.Game.Components.MyComponentBase Sandbox.Game.Components.MyFracturePiecePositionComponent Sandbox.Game.Entities.MyCubeBlock.MyBlockPosComponent

Public Member Functions

override void OnAddedToContainer ()
 Gets called after the container of this component changes More...
 
override void OnBeforeRemovedFromContainer ()
 Gets called before the removal of this component from a container More...
 
override void SetWorldMatrix (MatrixD worldMatrix, object source=null, bool forceUpdate=false, bool updateChildren=true)
 Sets the world matrix. More...
 
- Public Member Functions inherited from VRage.Game.Components.MyPositionComponentBase
void SetLocalMatrix (MatrixD localMatrix, object source=null)
 Sets the local matrix. More...
 
Vector3D GetPosition ()
 Gets the entity position. More...
 
void SetPosition (Vector3D pos)
 Sets the position. More...
 
virtual MatrixD GetViewMatrix ()
 
virtual void UpdateWorldMatrix (ref MatrixD parentWorldMatrix, object source=null)
 Updates the world matrix (change caused by parent) More...
 
- Public Member Functions inherited from VRage.Game.Components.MyComponentBase
virtual void SetContainer (MyComponentContainer container)
 Sets the container of this component. Note that the component is not added to the container here! Therefore, use MyComponentContainer.Add(...) method and it will in turn call this method. Actually, you should seldom have the need to call this method yourself. More...
 
virtual T GetAs< T > ()
 
virtual void OnAddedToScene ()
 CH: TOOD: Be careful! This does not get called if the component is added to a container that is in the scene already! More...
 
virtual void OnRemovedFromScene ()
 CH: TOOD: Be careful! This does not get called if the component is removed from a container that is still in the scene! More...
 
virtual MyObjectBuilder_ComponentBase Serialize (bool copy=false)
 
virtual void Deserialize (MyObjectBuilder_ComponentBase builder)
 
virtual void Init (MyComponentDefinitionBase definition)
 
virtual bool IsSerialized ()
 Tells the component container serializer whether this component should be saved More...
 

Public Attributes

Action< object > WorldPositionChanged
 

Static Public Attributes

static bool SynchronizationEnabled = true
 

Protected Member Functions

virtual void UpdateChildren (object source)
 Updates the childs of this entity. More...
 
override void OnWorldPositionChanged (object source, bool updateChildren=true)
 Called when [world position changed]. More...
 
- Protected Member Functions inherited from VRage.Game.Components.MyPositionComponentBase
void RaiseOnPositionChanged (MyPositionComponentBase component)
 
virtual void UpdateWorldMatrix (object source=null)
 Updates the world matrix (change caused by this entity) More...
 

Properties

override BoundingBox LocalAABB [get, set]
 Sets the local aabb. More...
 
override bool ShouldSync [get]
 
- Properties inherited from VRage.Game.Components.MyPositionComponentBase
MatrixD WorldMatrix [get, set]
 World matrix of this physic object. Use it whenever you want to do world-matrix transformations with this physic objects. More...
 
Matrix LocalMatrix [get, set]
 Gets or sets the local matrix. More...
 
BoundingBoxD WorldAABB [get, set]
 Gets the world aabb. More...
 
BoundingSphereD WorldVolume [get, set]
 Gets the world volume. More...
 
virtual BoundingBox LocalAABB [get, set]
 Sets the local aabb. More...
 
BoundingSphere LocalVolume [get, set]
 Sets the local volume. More...
 
Vector3 LocalVolumeOffset [get, set]
 Gets or sets the local volume offset. More...
 
virtual bool ShouldSync [get]
 
float Scale [get, set]
 
MatrixD WorldMatrixNormalizedInv [get]
 
MatrixD WorldMatrixInvScaled [get]
 
override string ComponentTypeDebugString [get]
 
- Properties inherited from VRage.Game.Components.MyEntityComponentBase
MyEntityComponentContainer Container [get]
 
IMyEntity Entity [get]
 
abstract string ComponentTypeDebugString [get]
 Name of the base component type for debug purposes (e.g.: "Position") More...
 
- Properties inherited from VRage.Game.Components.MyComponentBase
MyComponentContainer ContainerBase [get]
 This cannot be named Container to not conflict with the definition of Container in MyEntityComponentBase. More...
 

Additional Inherited Members

- Protected Attributes inherited from VRage.Game.Components.MyPositionComponentBase
MatrixD m_worldMatrix = MatrixD.Identity
 
MatrixD m_localMatrix = MatrixD.Identity
 Internal local matrix relative to parent of entity. More...
 
BoundingBox m_localAABB
 
BoundingSphere m_localVolume
 
Vector3 m_localVolumeOffset
 
BoundingBoxD m_worldAABB
 
BoundingSphereD m_worldVolume
 
bool m_worldVolumeDirty = false
 
bool m_worldAABBDirty = false
 
bool m_normalizedInvMatrixDirty = true
 
bool m_invScaledMatrixDirty = true
 
- Events inherited from VRage.Game.Components.MyPositionComponentBase
Action< MyPositionComponentBaseOnPositionChanged
 
- Events inherited from VRage.Game.Components.MyEntityComponentBase
static Action< MyEntityComponentBaseOnAfterAddedToContainer
 
Action< MyEntityComponentBaseBeforeRemovedFromContainer
 

Detailed Description

Definition at line 11 of file MyPositionComponent.cs.

Member Function Documentation

override void VRage.Game.Components.MyPositionComponent.OnAddedToContainer ( )
inlinevirtual

Gets called after the container of this component changes

Reimplemented from VRage.Game.Components.MyEntityComponentBase.

Definition at line 43 of file MyPositionComponent.cs.

override void VRage.Game.Components.MyPositionComponent.OnBeforeRemovedFromContainer ( )
inlinevirtual

Gets called before the removal of this component from a container

Reimplemented from VRage.Game.Components.MyEntityComponentBase.

Definition at line 53 of file MyPositionComponent.cs.

override void VRage.Game.Components.MyPositionComponent.OnWorldPositionChanged ( object  source,
bool  updateChildren = true 
)
inlineprotectedvirtual

Called when [world position changed].

Parameters
sourceThe source object that caused this event.

Reimplemented from VRage.Game.Components.MyPositionComponentBase.

Definition at line 140 of file MyPositionComponent.cs.

override void VRage.Game.Components.MyPositionComponent.SetWorldMatrix ( MatrixD  worldMatrix,
object  source = null,
bool  forceUpdate = false,
bool  updateChildren = true 
)
inlinevirtual

Sets the world matrix.

Parameters
worldMatrixThe world matrix.
sourceThe source object that caused this change or null when not important.

Reimplemented from VRage.Game.Components.MyPositionComponentBase.

Definition at line 95 of file MyPositionComponent.cs.

virtual void VRage.Game.Components.MyPositionComponent.UpdateChildren ( object  source)
inlineprotectedvirtual

Updates the childs of this entity.

Reimplemented in Sandbox.Game.Components.MyFracturePiecePositionComponent.

Definition at line 126 of file MyPositionComponent.cs.

Member Data Documentation

bool VRage.Game.Components.MyPositionComponent.SynchronizationEnabled = true
static

Definition at line 41 of file MyPositionComponent.cs.

Action<object> VRage.Game.Components.MyPositionComponent.WorldPositionChanged

Definition at line 14 of file MyPositionComponent.cs.

Property Documentation

override BoundingBox VRage.Game.Components.MyPositionComponent.LocalAABB
getset

Sets the local aabb.

The local aabb.

Definition at line 23 of file MyPositionComponent.cs.

override bool VRage.Game.Components.MyPositionComponent.ShouldSync
getprotected

Definition at line 83 of file MyPositionComponent.cs.


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