Class MyPositionComponentBase
Inheritance
System.Object
MyPositionComponentBase
Assembly: VRage.Game.dll
Syntax
public abstract class MyPositionComponentBase : MyEntityComponentBase, IMyEntityComponentBase, IMyComponentBase
Constructors
MyPositionComponentBase()
Declaration
protected MyPositionComponentBase()
Fields
m_invScaledMatrixDirty
Declaration
protected bool m_invScaledMatrixDirty
Field Value
Type |
Description |
System.Boolean |
|
m_lastParentWorldMatrixCounter
Declaration
public uint m_lastParentWorldMatrixCounter
Field Value
Type |
Description |
System.UInt32 |
|
m_localAABB
Declaration
protected BoundingBox m_localAABB
Field Value
m_localMatrix
Declaration
protected Matrix m_localMatrix
Field Value
m_localVolume
Declaration
protected BoundingSphere m_localVolume
Field Value
m_localVolumeOffset
Declaration
protected Vector3 m_localVolumeOffset
Field Value
m_normalizedInvMatrixDirty
Declaration
protected bool m_normalizedInvMatrixDirty
Field Value
Type |
Description |
System.Boolean |
|
m_worldAABB
Declaration
protected BoundingBoxD m_worldAABB
Field Value
m_worldAABBDirty
Declaration
protected bool m_worldAABBDirty
Field Value
Type |
Description |
System.Boolean |
|
m_worldMatrix
Declaration
protected MatrixD m_worldMatrix
Field Value
m_worldMatrixCounter
Declaration
public uint m_worldMatrixCounter
Field Value
Type |
Description |
System.UInt32 |
|
m_worldMatrixDirty
Declaration
public bool m_worldMatrixDirty
Field Value
Type |
Description |
System.Boolean |
|
m_worldVolume
Declaration
protected BoundingSphereD m_worldVolume
Field Value
m_worldVolumeDirty
Declaration
protected bool m_worldVolumeDirty
Field Value
Type |
Description |
System.Boolean |
|
OnReportInvalidMatrix
Declaration
public static Action<IMyEntity> OnReportInvalidMatrix
Field Value
Properties
ComponentTypeDebugString
Declaration
public override string ComponentTypeDebugString { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
LocalAABB
Declaration
public virtual BoundingBox LocalAABB { get; set; }
Property Value
LocalMatrix
Declaration
public Matrix LocalMatrix { get; set; }
Property Value
LocalMatrixRef
Gets or sets the local matrix.
Declaration
public ref readonly Matrix LocalMatrixRef { get; }
Property Value
Type |
Description |
Matrix |
The local matrix.
|
LocalVolume
Declaration
public BoundingSphere LocalVolume { get; set; }
Property Value
LocalVolumeOffset
Gets or sets the local volume offset.
Declaration
public Vector3 LocalVolumeOffset { get; set; }
Property Value
Type |
Description |
Vector3 |
The local volume offset.
|
NeedsRecalculateWorldMatrix
Declaration
public bool NeedsRecalculateWorldMatrix { get; }
Property Value
Type |
Description |
System.Boolean |
|
Scale
Declaration
public Nullable<float> Scale { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Single> |
|
ShouldSync
Declaration
protected virtual bool ShouldSync { get; }
Property Value
Type |
Description |
System.Boolean |
|
WorldAABB
Declaration
public BoundingBoxD WorldAABB { get; set; }
Property Value
WorldMatrix
Declaration
public MatrixD WorldMatrix { get; set; }
Property Value
WorldMatrixInvScaled
Declaration
public ref readonly MatrixD WorldMatrixInvScaled { get; }
Property Value
WorldMatrixNormalizedInv
Declaration
public ref readonly MatrixD WorldMatrixNormalizedInv { get; }
Property Value
WorldMatrixRef
World matrix of this physic object. Use it whenever you want to do world-matrix transformations with this physic objects.
Declaration
public ref readonly MatrixD WorldMatrixRef { get; }
Property Value
WorldVolume
Declaration
public BoundingSphereD WorldVolume { get; set; }
Property Value
Methods
GetOrientation()
Gets the entity orientation.
Declaration
public MatrixD GetOrientation()
Returns
GetPosition()
Gets the entity position.
Declaration
public Vector3D GetPosition()
Returns
GetViewMatrix()
Declaration
public virtual MatrixD GetViewMatrix()
Returns
OnAddedToContainer()
Declaration
public override void OnAddedToContainer()
Overrides
OnBeforeRemovedFromContainer()
Declaration
public override void OnBeforeRemovedFromContainer()
Overrides
OnWorldPositionChanged(Object, Boolean, Boolean)
Called when [world position changed].
Declaration
protected virtual void OnWorldPositionChanged(object source, bool updateChildren = true, bool forceUpdateAllChildren = false)
Parameters
Type |
Name |
Description |
System.Object |
source |
The source object that caused this event.
|
System.Boolean |
updateChildren |
|
System.Boolean |
forceUpdateAllChildren |
|
RaiseOnPositionChanged(MyPositionComponentBase)
Declaration
protected void RaiseOnPositionChanged(MyPositionComponentBase component)
Parameters
RecalculateWorldMatrixHRIfNeeded(Boolean)
Recursively recalculate world matrices for this entity and it's parents.
Declaration
protected bool RecalculateWorldMatrixHRIfNeeded(bool updateChildren = false)
Parameters
Type |
Name |
Description |
System.Boolean |
updateChildren |
|
Returns
Type |
Description |
System.Boolean |
True if the world matrix has changed.
|
SetLocalMatrix(ref Matrix, Object, Boolean)
Declaration
public bool SetLocalMatrix(ref Matrix localMatrix, object source = null, bool updateWorld = true)
Parameters
Type |
Name |
Description |
Matrix |
localMatrix |
|
System.Object |
source |
|
System.Boolean |
updateWorld |
|
Returns
Type |
Description |
System.Boolean |
true when World matrix needed recalculations as it got changed in here
|
SetLocalMatrix(ref Matrix, Object, Boolean, ref Matrix, Boolean)
Declaration
public void SetLocalMatrix(ref Matrix localMatrix, object source, bool updateWorld, ref Matrix renderLocal, bool forceUpdateRender = false)
Parameters
Type |
Name |
Description |
Matrix |
localMatrix |
|
System.Object |
source |
|
System.Boolean |
updateWorld |
|
Matrix |
renderLocal |
|
System.Boolean |
forceUpdateRender |
|
SetPosition(Vector3D, Object, Boolean, Boolean)
Declaration
public void SetPosition(Vector3D pos, object source = null, bool forceUpdate = false, bool updateChildren = true)
Parameters
Type |
Name |
Description |
Vector3D |
pos |
The position
|
System.Object |
source |
|
System.Boolean |
forceUpdate |
|
System.Boolean |
updateChildren |
|
SetWorldMatrix(MatrixD, Object, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean)
Declaration
public void SetWorldMatrix(MatrixD worldMatrix, object source = null, bool forceUpdate = false, bool updateChildren = true, bool updateLocal = true, bool skipTeleportCheck = false, bool forceUpdateAllChildren = false, bool ignoreAssert = false)
Parameters
Type |
Name |
Description |
MatrixD |
worldMatrix |
|
System.Object |
source |
|
System.Boolean |
forceUpdate |
|
System.Boolean |
updateChildren |
|
System.Boolean |
updateLocal |
|
System.Boolean |
skipTeleportCheck |
|
System.Boolean |
forceUpdateAllChildren |
|
System.Boolean |
ignoreAssert |
|
SetWorldMatrix(ref MatrixD, Object, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean)
Declaration
public void SetWorldMatrix(ref MatrixD worldMatrix, object source = null, bool forceUpdate = false, bool updateChildren = true, bool updateLocal = true, bool skipTeleportCheck = false, bool forceUpdateAllChildren = false, bool ignoreAssert = false)
Parameters
Type |
Name |
Description |
MatrixD |
worldMatrix |
The world matrix.
|
System.Object |
source |
The source object that caused this change or null when not important.
|
System.Boolean |
forceUpdate |
|
System.Boolean |
updateChildren |
|
System.Boolean |
updateLocal |
|
System.Boolean |
skipTeleportCheck |
|
System.Boolean |
forceUpdateAllChildren |
|
System.Boolean |
ignoreAssert |
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
UpdateWorldMatrix(Object, Boolean, Boolean)
Updates the world matrix (change caused by this entity)
Declaration
protected virtual void UpdateWorldMatrix(object source = null, bool updateChildren = true, bool forceUpdateAllChildren = false)
Parameters
Type |
Name |
Description |
System.Object |
source |
|
System.Boolean |
updateChildren |
|
System.Boolean |
forceUpdateAllChildren |
|
UpdateWorldMatrix(ref MatrixD, Object, Boolean, Boolean)
Updates the world matrix (change caused by parent)
Declaration
public virtual void UpdateWorldMatrix(ref MatrixD parentWorldMatrix, object source = null, bool updateChildren = true, bool forceUpdateAllChildren = false)
Parameters
Type |
Name |
Description |
MatrixD |
parentWorldMatrix |
|
System.Object |
source |
|
System.Boolean |
updateChildren |
|
System.Boolean |
forceUpdateAllChildren |
|
Events
OnLocalAABBChanged
Declaration
public event Action<MyPositionComponentBase> OnLocalAABBChanged
Event Type
OnPositionChanged
Declaration
public event Action<MyPositionComponentBase> OnPositionChanged
Event Type
Extension Methods