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

Public Member Functions

virtual void SetWorldMatrix (MatrixD worldMatrix, object source=null, bool forceUpdate=false, bool updateChildren=true)
 Sets the world matrix. More...
 
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.MyEntityComponentBase
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...
 
- 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...
 

Protected Member Functions

void RaiseOnPositionChanged (MyPositionComponentBase component)
 
virtual void UpdateWorldMatrix (object source=null)
 Updates the world matrix (change caused by this entity) More...
 
virtual void OnWorldPositionChanged (object source, bool updateChildren=true)
 Called when [world position changed]. More...
 

Protected Attributes

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
 

Properties

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...
 

Events

Action< MyPositionComponentBaseOnPositionChanged
 
- Events inherited from VRage.Game.Components.MyEntityComponentBase
static Action< MyEntityComponentBaseOnAfterAddedToContainer
 
Action< MyEntityComponentBaseBeforeRemovedFromContainer
 

Detailed Description

Definition at line 9 of file MyPositionComponentBase.cs.

Member Function Documentation

Vector3D VRage.Game.Components.MyPositionComponentBase.GetPosition ( )
inline

Gets the entity position.

Returns

Definition at line 294 of file MyPositionComponentBase.cs.

virtual MatrixD VRage.Game.Components.MyPositionComponentBase.GetViewMatrix ( )
inlinevirtual

Definition at line 391 of file MyPositionComponentBase.cs.

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

Called when [world position changed].

Parameters
sourceThe source object that caused this event.

Reimplemented in Sandbox.Game.Entities.MyCubeBlock.MyBlockPosComponent, VRage.Game.Components.MyPositionComponent, and Sandbox.Game.Components.MyFracturePiecePositionComponent.

Definition at line 425 of file MyPositionComponentBase.cs.

void VRage.Game.Components.MyPositionComponentBase.RaiseOnPositionChanged ( MyPositionComponentBase  component)
inlineprotected

Definition at line 176 of file MyPositionComponentBase.cs.

void VRage.Game.Components.MyPositionComponentBase.SetLocalMatrix ( MatrixD  localMatrix,
object  source = null 
)
inline

Sets the local matrix.

Parameters
localMatrixThe local matrix.
sourceThe source object that caused this change or null when not important.

Definition at line 279 of file MyPositionComponentBase.cs.

void VRage.Game.Components.MyPositionComponentBase.SetPosition ( Vector3D  pos)
inline

Sets the position.

Parameters
posThe pos.

Definition at line 304 of file MyPositionComponentBase.cs.

virtual void VRage.Game.Components.MyPositionComponentBase.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 in VRage.Game.Components.MyPositionComponent.

Definition at line 238 of file MyPositionComponentBase.cs.

virtual void VRage.Game.Components.MyPositionComponentBase.UpdateWorldMatrix ( object  source = null)
inlineprotectedvirtual

Updates the world matrix (change caused by this entity)

Definition at line 399 of file MyPositionComponentBase.cs.

virtual void VRage.Game.Components.MyPositionComponentBase.UpdateWorldMatrix ( ref MatrixD  parentWorldMatrix,
object  source = null 
)
inlinevirtual

Updates the world matrix (change caused by parent)

Definition at line 414 of file MyPositionComponentBase.cs.

Member Data Documentation

bool VRage.Game.Components.MyPositionComponentBase.m_invScaledMatrixDirty = true
protected

Definition at line 352 of file MyPositionComponentBase.cs.

BoundingBox VRage.Game.Components.MyPositionComponentBase.m_localAABB
protected

Definition at line 24 of file MyPositionComponentBase.cs.

MatrixD VRage.Game.Components.MyPositionComponentBase.m_localMatrix = MatrixD.Identity
protected

Internal local matrix relative to parent of entity.

Definition at line 21 of file MyPositionComponentBase.cs.

BoundingSphere VRage.Game.Components.MyPositionComponentBase.m_localVolume
protected

Definition at line 25 of file MyPositionComponentBase.cs.

Vector3 VRage.Game.Components.MyPositionComponentBase.m_localVolumeOffset
protected

Definition at line 26 of file MyPositionComponentBase.cs.

bool VRage.Game.Components.MyPositionComponentBase.m_normalizedInvMatrixDirty = true
protected

Definition at line 316 of file MyPositionComponentBase.cs.

BoundingBoxD VRage.Game.Components.MyPositionComponentBase.m_worldAABB
protected

Definition at line 27 of file MyPositionComponentBase.cs.

bool VRage.Game.Components.MyPositionComponentBase.m_worldAABBDirty = false
protected

Definition at line 30 of file MyPositionComponentBase.cs.

MatrixD VRage.Game.Components.MyPositionComponentBase.m_worldMatrix = MatrixD.Identity
protected

Definition at line 16 of file MyPositionComponentBase.cs.

BoundingSphereD VRage.Game.Components.MyPositionComponentBase.m_worldVolume
protected

Definition at line 28 of file MyPositionComponentBase.cs.

bool VRage.Game.Components.MyPositionComponentBase.m_worldVolumeDirty = false
protected

Definition at line 29 of file MyPositionComponentBase.cs.

Property Documentation

override string VRage.Game.Components.MyPositionComponentBase.ComponentTypeDebugString
get

Definition at line 441 of file MyPositionComponentBase.cs.

virtual BoundingBox VRage.Game.Components.MyPositionComponentBase.LocalAABB
getset

Sets the local aabb.

The local aabb.

Definition at line 118 of file MyPositionComponentBase.cs.

Matrix VRage.Game.Components.MyPositionComponentBase.LocalMatrix
getset

Gets or sets the local matrix.

The local matrix.

Definition at line 53 of file MyPositionComponentBase.cs.

BoundingSphere VRage.Game.Components.MyPositionComponentBase.LocalVolume
getset

Sets the local volume.

The local volume.

Definition at line 139 of file MyPositionComponentBase.cs.

Vector3 VRage.Game.Components.MyPositionComponentBase.LocalVolumeOffset
getset

Gets or sets the local volume offset.

The local volume offset.

Definition at line 162 of file MyPositionComponentBase.cs.

float VRage.Game.Components.MyPositionComponentBase.Scale
getset

Definition at line 194 of file MyPositionComponentBase.cs.

virtual bool VRage.Game.Components.MyPositionComponentBase.ShouldSync
getprotected

Definition at line 186 of file MyPositionComponentBase.cs.

BoundingBoxD VRage.Game.Components.MyPositionComponentBase.WorldAABB
getset

Gets the world aabb.

Definition at line 62 of file MyPositionComponentBase.cs.

MatrixD VRage.Game.Components.MyPositionComponentBase.WorldMatrix
getset

World matrix of this physic object. Use it whenever you want to do world-matrix transformations with this physic objects.

Definition at line 38 of file MyPositionComponentBase.cs.

MatrixD VRage.Game.Components.MyPositionComponentBase.WorldMatrixInvScaled
get

Definition at line 356 of file MyPositionComponentBase.cs.

MatrixD VRage.Game.Components.MyPositionComponentBase.WorldMatrixNormalizedInv
get

Definition at line 320 of file MyPositionComponentBase.cs.

BoundingSphereD VRage.Game.Components.MyPositionComponentBase.WorldVolume
getset

Gets the world volume.

Definition at line 88 of file MyPositionComponentBase.cs.

Event Documentation

Action<MyPositionComponentBase> VRage.Game.Components.MyPositionComponentBase.OnPositionChanged

Definition at line 174 of file MyPositionComponentBase.cs.


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