Show / Hide Table of Contents

Class MyPositionComponentBase

Inheritance
System.Object
MyComponentBase
MyEntityComponentBase
MyPositionComponentBase
MyNullPositionComponent
MyPositionComponent
Inherited Members
MyEntityComponentBase.Container
MyEntityComponentBase.Entity
MyEntityComponentBase.AttachSyncToEntity
MyEntityComponentBase.OnAfterAddedToContainer
MyEntityComponentBase.BeforeRemovedFromContainer
MyComponentBase.SetContainer(IMyComponentContainer)
MyComponentBase.GetAs<T>()
MyComponentBase.OnAddedToScene()
MyComponentBase.OnRemovedFromScene()
MyComponentBase.Serialize(Boolean)
MyComponentBase.Deserialize(MyObjectBuilder_ComponentBase)
MyComponentBase.Init(MyComponentDefinitionBase)
MyComponentBase.IsSerialized()
MyComponentBase.RemoveExistingComponentOnNewInsert
MyComponentBase.ContainerBase
Namespace: VRage.Game.Components
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
Type Description
BoundingBox

m_localMatrix

Declaration
protected Matrix m_localMatrix
Field Value
Type Description
Matrix

m_localVolume

Declaration
protected BoundingSphere m_localVolume
Field Value
Type Description
BoundingSphere

m_localVolumeOffset

Declaration
protected Vector3 m_localVolumeOffset
Field Value
Type Description
Vector3

m_normalizedInvMatrixDirty

Declaration
protected bool m_normalizedInvMatrixDirty
Field Value
Type Description
System.Boolean

m_worldAABB

Declaration
protected BoundingBoxD m_worldAABB
Field Value
Type Description
BoundingBoxD

m_worldAABBDirty

Declaration
protected bool m_worldAABBDirty
Field Value
Type Description
System.Boolean

m_worldMatrix

Declaration
protected MatrixD m_worldMatrix
Field Value
Type Description
MatrixD

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
Type Description
BoundingSphereD

m_worldVolumeDirty

Declaration
protected bool m_worldVolumeDirty
Field Value
Type Description
System.Boolean

OnReportInvalidMatrix

Declaration
public static Action<IMyEntity> OnReportInvalidMatrix
Field Value
Type Description
System.Action<IMyEntity>

Properties

ComponentTypeDebugString

Declaration
public override string ComponentTypeDebugString { get; }
Property Value
Type Description
System.String
Overrides
MyEntityComponentBase.ComponentTypeDebugString

LocalAABB

Sets the local aabb.

Declaration
public virtual BoundingBox LocalAABB { get; set; }
Property Value
Type Description
BoundingBox

The local aabb.

LocalMatrix

Declaration
public Matrix LocalMatrix { get; set; }
Property Value
Type Description
Matrix

LocalMatrixRef

Gets or sets the local matrix.

Declaration
public ref readonly Matrix LocalMatrixRef { get; }
Property Value
Type Description
Matrix

The local matrix.

LocalVolume

Sets the local volume.

Declaration
public BoundingSphere LocalVolume { get; set; }
Property Value
Type Description
BoundingSphere

The local volume.

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

Gets the world aabb.

Declaration
public BoundingBoxD WorldAABB { get; set; }
Property Value
Type Description
BoundingBoxD

WorldMatrix

Declaration
public MatrixD WorldMatrix { get; set; }
Property Value
Type Description
MatrixD

WorldMatrixInvScaled

Declaration
public ref readonly MatrixD WorldMatrixInvScaled { get; }
Property Value
Type Description
MatrixD

WorldMatrixNormalizedInv

Declaration
public ref readonly MatrixD WorldMatrixNormalizedInv { get; }
Property Value
Type Description
MatrixD

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
Type Description
MatrixD

WorldVolume

Gets the world volume.

Declaration
public BoundingSphereD WorldVolume { get; set; }
Property Value
Type Description
BoundingSphereD

Methods

GetOrientation()

Gets the entity orientation.

Declaration
public MatrixD GetOrientation()
Returns
Type Description
MatrixD

GetPosition()

Gets the entity position.

Declaration
public Vector3D GetPosition()
Returns
Type Description
Vector3D

GetViewMatrix()

Declaration
public virtual MatrixD GetViewMatrix()
Returns
Type Description
MatrixD

OnAddedToContainer()

Declaration
public override void OnAddedToContainer()
Overrides
MyEntityComponentBase.OnAddedToContainer()

OnBeforeRemovedFromContainer()

Declaration
public override void OnBeforeRemovedFromContainer()
Overrides
MyEntityComponentBase.OnBeforeRemovedFromContainer()

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
Type Name Description
MyPositionComponentBase component

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)

Sets the position.

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)

Sets the world matrix.

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
Type Description
System.Action<MyPositionComponentBase>

OnPositionChanged

Declaration
public event Action<MyPositionComponentBase> OnPositionChanged
Event Type
Type Description
System.Action<MyPositionComponentBase>

Extension Methods

MyEntityContainerEventExtensions.RegisterForEntityEvent(MyEntityComponentBase, MyStringHash, MyEntityContainerEventExtensions.EntityEventHandler)
MyEntityContainerEventExtensions.RegisterForEntityEvent(MyEntityComponentBase, MyEntity, MyStringHash, MyEntityContainerEventExtensions.EntityEventHandler)
MyEntityContainerEventExtensions.UnregisterForEntityEvent(MyEntityComponentBase, MyEntity, MyStringHash)
MyEntityContainerEventExtensions.RaiseEntityEvent(MyEntityComponentBase, MyStringHash, MyEntityContainerEventExtensions.EntityEventParams)
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾