Space Engineers
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Properties | Events | List of all members
Sandbox.Engine.Physics.MyPhysicsBody Class Reference

Abstract engine physics body object. More...

Inheritance diagram for Sandbox.Engine.Physics.MyPhysicsBody:
VRage.Game.Components.MyPhysicsComponentBase VRageMath.Spatial.MyClusterTree.IMyActivationHandler VRage.Game.Components.MyEntityComponentBase VRage.Game.Components.MyComponentBase Sandbox.Engine.Voxels.MyVoxelPhysicsBody Sandbox.Game.Entities.Cube.MyGridPhysics Sandbox.Game.Entities.Cube.MyGridPhysics Sandbox.Game.Entities.Debris.MyDebrisBase.MyDebrisPhysics Sandbox.Game.Entities.MyHandToolBase.MyBlockingBody Sandbox.Game.Entities.MyManipulationTool.MyCharacterVirtualPhysicsBody

Classes

class  MyWeldInfo
 

Public Member Functions

delegate void PhysicsContactHandler (ref MyPhysics.MyContactPointEvent e)
 
 MyPhysicsBody ()
 
 MyPhysicsBody (IMyEntity entity, RigidBodyFlag flags)
 Initializes a new instance of the MyPhysicsBody class. More...
 
override void Close ()
 Initializes a new instance of the MyPhysicsBody class. More...
 
override void AddForce (MyPhysicsForceType type, Vector3?force, Vector3D?position, Vector3?torque)
 Applies external force to the physics object. More...
 
override void ApplyImpulse (Vector3 impulse, Vector3D pos)
 Applies the impulse. More...
 
override void ClearSpeed ()
 Clears the speeds. More...
 
override void Clear ()
 Clear all dynamic values of physics object. More...
 
override void DebugDraw ()
 Debug draw of this physics object. More...
 
virtual void CreateFromCollisionObject (HkShape shape, Vector3 center, MatrixD worldTransform, HkMassProperties?massProperties=null, int collisionFilter=MyPhysics.CollisionLayers.DefaultCollisionLayer)
 
void PlayContactSound (HkContactPointEvent value, float volume=0)
 
override void CreateCharacterCollision (Vector3 center, float characterWidth, float characterHeight, float crouchHeight, float ladderHeight, float headSize, float headHeight, MatrixD worldTransform, float mass, ushort collisionLayer, bool isOnlyVertical, float maxSlope, float maxImpulse, float maxSpeedRelativeToShip, bool networkProxy, float?maxForce=null)
 
override void Deactivate ()
 Deactivates this rigid body in physics. More...
 
virtual void Deactivate (object world)
 Called when standalone object is removed from cluster More...
 
virtual void DeactivateBatch (object world)
 Called when multiple objects are removed from cluster. More...
 
void FinishAddBatch ()
 Called when adding multiple objects is finished. More...
 
void FinishRemoveBatch (object userData)
 Called when removing multiple objects is finished. More...
 
override void ForceActivate ()
 
virtual void OnMotion (HkRigidBody rbo, float step, bool fromParent=false)
 Called when [motion]. More...
 
void SynchronizeKeyframedRigidBody ()
 
override MatrixD GetWorldMatrix ()
 
override Vector3 GetVelocityAtPoint (Vector3D worldPos)
 
override void OnWorldPositionChanged (object source)
 Called when [world position changed]. More...
 
virtual void ChangeQualityType (HkCollidableQualityType quality)
 
void AddConstraint (HkConstraint constraint)
 
void RemoveConstraint (HkConstraint constraint)
 
override Vector3D WorldToCluster (Vector3D worldPos)
 Converts global space position to local cluster space. More...
 
override Vector3D ClusterToWorld (Vector3 clusterPos)
 Converts local cluster position to global space. More...
 
override void Activate ()
 Activates this rigid body in physics. More...
 
virtual void Activate (object world, ulong clusterObjectID)
 Called when standalone object is added to cluster More...
 
virtual void ActivateBatch (object world, ulong clusterObjectID)
 Called when multiple objects are added to cluster. More...
 
void UpdateCluster ()
 
virtual HkShape GetShape ()
 Gets shape of this physics body even if its welded with other More...
 
override void Init (MyComponentDefinitionBase definition)
 
override void OnAddedToContainer ()
 Gets called after the container of this component changes More...
 
override 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...
 
override void UpdateFromSystem ()
 
virtual void FracturedBody_AfterReplaceBody (ref HkdReplaceBodyEvent e)
 
void CloseRagdoll ()
 
void SwitchToRagdollMode (bool deadMode=true, int firstRagdollSubID=1)
 
void CloseRagdollMode ()
 
void CloseRagdollMode (HkWorld world)
 
void SetRagdollDefaults ()
 Sets default values for ragdoll bodies and constraints - useful if ragdoll model is not correct More...
 
void Weld (MyPhysicsComponentBase other, bool recreateShape=true)
 
void Weld (MyPhysicsBody other, bool recreateShape=true)
 
void RecreateWeldedShape ()
 
void UpdateMassProps ()
 
void UnweldAll (bool insertInWorld)
 
void Unweld (MyPhysicsBody other, bool insertToWorld=true, bool recreateShape=true)
 
void Unweld (bool insertInWorld=true)
 
- Public Member Functions inherited from VRage.Game.Components.MyPhysicsComponentBase
virtual MyStringHash GetMaterialAt (Vector3D worldPos)
 
void UpdateAccelerations ()
 
void SetSpeeds (Vector3 linear, Vector3 angular)
 Set the current linear and angular velocities of this physics body. More...
 
override void Init (MyComponentDefinitionBase definition)
 
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 bool IsSerialized ()
 Tells the component container serializer whether this component should be saved More...
 
override MyObjectBuilder_ComponentBase Serialize (bool copy=false)
 
override void Deserialize (MyObjectBuilder_ComponentBase baseBuilder)
 
- 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 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...
 

Static Public Member Functions

static bool IsConstraintValid (HkConstraint constraint)
 

Public Attributes

HkSolverDeactivation InitialSolverDeactivation = HkSolverDeactivation.Low
 Must be set before creating rigid body More...
 
readonly MyWeldInfo WeldInfo = new MyWeldInfo()
 
- Public Attributes inherited from VRage.Game.Components.MyPhysicsComponentBase
ushort ContactPointDelay = 0xffff
 Must be set before creating rigid body More...
 
RigidBodyFlag Flags
 
bool IsPhantom
 Use something from Havok to detect this More...
 

Protected Member Functions

override void CloseRigidBody ()
 
virtual void CreateBody (ref HkShape shape, HkMassProperties?massProperties)
 
virtual void ActivateCollision ()
 
void GetRigidBodyMatrix (out Matrix m)
 
Matrix GetRigidBodyMatrix (MatrixD worldMatrix)
 
virtual void OnWelded (MyPhysicsBody other)
 
virtual void OnUnwelded (MyPhysicsBody other)
 

Static Protected Member Functions

static void GetInfoFromFlags (HkRigidBodyCinfo rbInfo, RigidBodyFlag flags)
 

Protected Attributes

float m_angularDamping
 
float m_linearDamping
 
Vector3D Offset = Vector3D.Zero
 
Matrix m_bodyMatrix
 
HkWorld m_world
 
HkRagdoll m_ragdoll
 
- Protected Attributes inherited from VRage.Game.Components.MyPhysicsComponentBase
bool m_enabled
 

Properties

ulong ClusterObjectID [get, set]
 
new MyPhysicsBodyComponentDefinition Definition [get]
 
HkWorld HavokWorld [get]
 
virtual int HavokCollisionSystemID [get, protected set]
 
override HkRigidBody RigidBody [get, protected set]
 
override HkRigidBody RigidBody2 [get, protected set]
 
override float Mass [get]
 Gets or sets the mass. More...
 
override float Speed [get]
 Gets or sets the speed. More...
 
override float Friction [get, set]
 
override bool IsStatic [get]
 
override bool IsKinematic [get]
 
bool IsSubpart [get, set]
 
MyCharacterProxy CharacterProxy [get, set]
 
int CharacterSystemGroupCollisionFilterID [get]
 This system group id will is used to set's this character rigid bodies collision filters. More...
 
uint CharacterCollisionFilter [get]
 This is character collision filter, use this to avoid collisions with character and character holding bodies. More...
 
override bool IsInWorld [get, protected set]
 
override Vector3 LinearVelocity [get, set]
 Gets or sets the linear velocity. More...
 
override float LinearDamping [get, set]
 Gets or sets the linear damping. More...
 
override float AngularDamping [get, set]
 Gets or sets the angular damping. More...
 
override Vector3 AngularVelocity [get, set]
 Gets or sets the angular velocity. More...
 
override bool IsMoving [get]
 Returns true when linear velocity or angular velocity is non-zero. More...
 
override Vector3 Gravity [get]
 
override bool HasRigidBody [get]
 
override Vector3D CenterOfMassWorld [get]
 
HashSetReader< HkConstraint > Constraints [get]
 
virtual bool IsStaticForCluster [get, set]
 
override HkdBreakableBody BreakableBody [get, set]
 
int RagdollSystemGroupCollisionFilterID [get]
 This System Collision ID is used for ragdoll in non-dead mode to avoid collision with character's rigid body. More...
 
bool IsRagdollModeActive [get]
 Returns true when ragdoll is in world More...
 
HkRagdoll Ragdoll [get, set]
 
bool ReactivateRagdoll [get, set]
 
bool SwitchToRagdollModeOnActivate [get, set]
 
bool IsWelded [get]
 
HkRigidBody WeldedRigidBody [get, protected set]
 
- Properties inherited from VRage.Game.Components.MyPhysicsComponentBase
bool ReportAllContacts [get, set]
 
IMyEntity Entity [get, protected set]
 
bool CanUpdateAccelerations [get, set]
 
MyStringHash MaterialType [get, set]
 Gets or sets the type of the material. More...
 
virtual bool IsStatic [get]
 Gets or sets a value indicating whether this MyGameRigidBody is static. More...
 
virtual bool IsKinematic [get]
 Gets or sets a value indicating whether this MyGameRigidBody is kinematic. More...
 
virtual bool Enabled [get, set]
 Gets or sets a value indicating whether this MyPhysicsBody is enabled. More...
 
bool PlayCollisionCueEnabled [get, set]
 Gets or sets a value indicating whether [play collision cue enabled]. More...
 
abstract float Mass [get]
 Gets or sets the type of the material. More...
 
Vector3 Center [get, set]
 
abstract Vector3 LinearVelocity [get, set]
 Gets or sets the linear velocity. More...
 
virtual Vector3 LinearAcceleration [get, protected set]
 
virtual Vector3 AngularAcceleration [get, protected set]
 
abstract float LinearDamping [get, set]
 Gets or sets the linear damping. More...
 
abstract float AngularDamping [get, set]
 Gets or sets the angular damping. More...
 
abstract Vector3 AngularVelocity [get, set]
 Gets or sets the angular velocity. More...
 
abstract float Speed [get]
 Gets or sets the speed. More...
 
abstract float Friction [get, set]
 
abstract HkRigidBody RigidBody [get, protected set]
 Obtain/set (default) rigid body of this physics object. More...
 
abstract HkRigidBody RigidBody2 [get, protected set]
 Obtain/set secondary rigid body of this physics object (not used by default, it is used sometimes on grids for kinematic layer). More...
 
abstract HkdBreakableBody BreakableBody [get, set]
 
abstract bool IsMoving [get]
 
abstract Vector3 Gravity [get]
 
MyPhysicsComponentDefinitionBase Definition [get]
 
MatrixD ServerWorldMatrix [get, set]
 
abstract bool HasRigidBody [get]
 
abstract Vector3D CenterOfMassWorld [get]
 
virtual bool IsInWorld [get, protected set]
 
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...
 
- Properties inherited from VRageMath.Spatial.MyClusterTree.IMyActivationHandler
bool IsStaticForCluster [get]
 If true, than this object is not calculated into cluster division algorithm. It is just added or removed if dynamic object is in range. More...
 

Events

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

Detailed Description

Abstract engine physics body object.

Definition at line 59 of file MyPhysicsBody.cs.

Constructor & Destructor Documentation

Sandbox.Engine.Physics.MyPhysicsBody.MyPhysicsBody ( )
inline

Definition at line 450 of file MyPhysicsBody.cs.

Sandbox.Engine.Physics.MyPhysicsBody.MyPhysicsBody ( IMyEntity  entity,
RigidBodyFlag  flags 
)
inline

Initializes a new instance of the MyPhysicsBody class.

Parameters
entityThe entity.

Definition at line 458 of file MyPhysicsBody.cs.

Member Function Documentation

override void Sandbox.Engine.Physics.MyPhysicsBody.Activate ( )
inlinevirtual

Activates this rigid body in physics.

Implements VRage.Game.Components.MyPhysicsComponentBase.

Definition at line 1604 of file MyPhysicsBody.cs.

virtual void Sandbox.Engine.Physics.MyPhysicsBody.Activate ( object  userData,
ulong  clusterObjectID 
)
inlinevirtual

Called when standalone object is added to cluster

Parameters
userData
clusterObjectID

Implements VRageMath.Spatial.MyClusterTree.IMyActivationHandler.

Reimplemented in Sandbox.Engine.Voxels.MyVoxelPhysicsBody, and Sandbox.Game.Entities.Cube.MyGridPhysics.

Definition at line 1619 of file MyPhysicsBody.cs.

virtual void Sandbox.Engine.Physics.MyPhysicsBody.ActivateBatch ( object  userData,
ulong  clusterObjectID 
)
inlinevirtual

Called when multiple objects are added to cluster.

Parameters
userData
clusterObjectID

Implements VRageMath.Spatial.MyClusterTree.IMyActivationHandler.

Reimplemented in Sandbox.Engine.Voxels.MyVoxelPhysicsBody, and Sandbox.Game.Entities.Cube.MyGridPhysics.

Definition at line 1696 of file MyPhysicsBody.cs.

virtual void Sandbox.Engine.Physics.MyPhysicsBody.ActivateCollision ( )
inlineprotectedvirtual

Reimplemented in Sandbox.Game.Entities.Cube.MyGridPhysics.

Definition at line 989 of file MyPhysicsBody.cs.

void Sandbox.Engine.Physics.MyPhysicsBody.AddConstraint ( HkConstraint  constraint)
inline

Definition at line 1538 of file MyPhysicsBody.cs.

override void Sandbox.Engine.Physics.MyPhysicsBody.AddForce ( MyPhysicsForceType  type,
Vector3 force,
Vector3D position,
Vector3 torque 
)
inlinevirtual

Applies external force to the physics object.

Parameters
typeThe type.
forceThe force.
positionThe position.
torqueThe torque.

Implements VRage.Game.Components.MyPhysicsComponentBase.

Definition at line 507 of file MyPhysicsBody.cs.

override void Sandbox.Engine.Physics.MyPhysicsBody.ApplyImpulse ( Vector3  impulse,
Vector3D  pos 
)
inlinevirtual

Applies the impulse.

Parameters
impulseThe dir.
posThe pos.

Implements VRage.Game.Components.MyPhysicsComponentBase.

Definition at line 625 of file MyPhysicsBody.cs.

virtual void Sandbox.Engine.Physics.MyPhysicsBody.ChangeQualityType ( HkCollidableQualityType  quality)
inlinevirtual

Definition at line 1488 of file MyPhysicsBody.cs.

override void Sandbox.Engine.Physics.MyPhysicsBody.Clear ( )
inlinevirtual

Clear all dynamic values of physics object.

Implements VRage.Game.Components.MyPhysicsComponentBase.

Definition at line 659 of file MyPhysicsBody.cs.

override void Sandbox.Engine.Physics.MyPhysicsBody.ClearSpeed ( )
inlinevirtual

Clears the speeds.

Implements VRage.Game.Components.MyPhysicsComponentBase.

Definition at line 633 of file MyPhysicsBody.cs.

override void Sandbox.Engine.Physics.MyPhysicsBody.Close ( )
inlinevirtual

Initializes a new instance of the MyPhysicsBody class.

Parameters
entityThe entity.

Reimplemented from VRage.Game.Components.MyPhysicsComponentBase.

Reimplemented in Sandbox.Engine.Voxels.MyVoxelPhysicsBody, and Sandbox.Game.Entities.Cube.MyGridPhysics.

Definition at line 480 of file MyPhysicsBody.cs.

void Sandbox.Engine.Physics.MyPhysicsBody.CloseRagdoll ( )
inline

Definition at line 86 of file MyPhysicsBody.Ragdoll.cs.

void Sandbox.Engine.Physics.MyPhysicsBody.CloseRagdollMode ( )
inline

Definition at line 259 of file MyPhysicsBody.Ragdoll.cs.

void Sandbox.Engine.Physics.MyPhysicsBody.CloseRagdollMode ( HkWorld  world)
inline

Definition at line 264 of file MyPhysicsBody.Ragdoll.cs.

override void Sandbox.Engine.Physics.MyPhysicsBody.CloseRigidBody ( )
inlineprotectedvirtual

Implements VRage.Game.Components.MyPhysicsComponentBase.

Definition at line 238 of file MyPhysicsBody.cs.

override Vector3D Sandbox.Engine.Physics.MyPhysicsBody.ClusterToWorld ( Vector3  clusterPos)
inlinevirtual

Converts local cluster position to global space.

Implements VRage.Game.Components.MyPhysicsComponentBase.

Definition at line 1596 of file MyPhysicsBody.cs.

virtual void Sandbox.Engine.Physics.MyPhysicsBody.CreateBody ( ref HkShape  shape,
HkMassProperties?  massProperties 
)
inlineprotectedvirtual

Reimplemented in Sandbox.Game.Entities.Cube.MyGridPhysics.

Definition at line 812 of file MyPhysicsBody.cs.

override void Sandbox.Engine.Physics.MyPhysicsBody.CreateCharacterCollision ( Vector3  center,
float  characterWidth,
float  characterHeight,
float  crouchHeight,
float  ladderHeight,
float  headSize,
float  headHeight,
MatrixD  worldTransform,
float  mass,
ushort  collisionLayer,
bool  isOnlyVertical,
float  maxSlope,
float  maxImpulse,
float  maxSpeedRelativeToShip,
bool  networkProxy,
float?  maxForce = null 
)
inlinevirtual

Implements VRage.Game.Components.MyPhysicsComponentBase.

Definition at line 944 of file MyPhysicsBody.cs.

virtual void Sandbox.Engine.Physics.MyPhysicsBody.CreateFromCollisionObject ( HkShape  shape,
Vector3  center,
MatrixD  worldTransform,
HkMassProperties?  massProperties = null,
int  collisionFilter = MyPhysics.CollisionLayers.DefaultCollisionLayer 
)
inlinevirtual

Definition at line 766 of file MyPhysicsBody.cs.

override void Sandbox.Engine.Physics.MyPhysicsBody.Deactivate ( )
inlinevirtual

Deactivates this rigid body in physics.

Implements VRage.Game.Components.MyPhysicsComponentBase.

Definition at line 994 of file MyPhysicsBody.cs.

virtual void Sandbox.Engine.Physics.MyPhysicsBody.Deactivate ( object  userData)
inlinevirtual

Called when standalone object is removed from cluster

Parameters
userData

Implements VRageMath.Spatial.MyClusterTree.IMyActivationHandler.

Reimplemented in Sandbox.Engine.Voxels.MyVoxelPhysicsBody, and Sandbox.Game.Entities.Cube.MyGridPhysics.

Definition at line 1025 of file MyPhysicsBody.cs.

virtual void Sandbox.Engine.Physics.MyPhysicsBody.DeactivateBatch ( object  userData)
inlinevirtual

Called when multiple objects are removed from cluster.

Parameters
userData

Implements VRageMath.Spatial.MyClusterTree.IMyActivationHandler.

Reimplemented in Sandbox.Engine.Voxels.MyVoxelPhysicsBody, and Sandbox.Game.Entities.Cube.MyGridPhysics.

Definition at line 1080 of file MyPhysicsBody.cs.

override void Sandbox.Engine.Physics.MyPhysicsBody.DebugDraw ( )
inlinevirtual

Debug draw of this physics object.

Implements VRage.Game.Components.MyPhysicsComponentBase.

Reimplemented in Sandbox.Game.Entities.Cube.MyGridPhysics, and Sandbox.Engine.Voxels.MyVoxelPhysicsBody.

Definition at line 664 of file MyPhysicsBody.cs.

void Sandbox.Engine.Physics.MyPhysicsBody.FinishAddBatch ( )
inline

Called when adding multiple objects is finished.

Implements VRageMath.Spatial.MyClusterTree.IMyActivationHandler.

Definition at line 1119 of file MyPhysicsBody.cs.

void Sandbox.Engine.Physics.MyPhysicsBody.FinishRemoveBatch ( object  userData)
inline

Called when removing multiple objects is finished.

Implements VRageMath.Spatial.MyClusterTree.IMyActivationHandler.

Definition at line 1152 of file MyPhysicsBody.cs.

override void Sandbox.Engine.Physics.MyPhysicsBody.ForceActivate ( )
inlinevirtual

Implements VRage.Game.Components.MyPhysicsComponentBase.

Definition at line 1179 of file MyPhysicsBody.cs.

virtual void Sandbox.Engine.Physics.MyPhysicsBody.FracturedBody_AfterReplaceBody ( ref HkdReplaceBodyEvent  e)
inlinevirtual

Reimplemented in Sandbox.Game.Entities.Cube.MyGridPhysics.

Definition at line 64 of file MyPhysicsBody.Destruction.cs.

static void Sandbox.Engine.Physics.MyPhysicsBody.GetInfoFromFlags ( HkRigidBodyCinfo  rbInfo,
RigidBodyFlag  flags 
)
inlinestaticprotected

Definition at line 835 of file MyPhysicsBody.cs.

void Sandbox.Engine.Physics.MyPhysicsBody.GetRigidBodyMatrix ( out Matrix  m)
inlineprotected

Definition at line 1468 of file MyPhysicsBody.cs.

Matrix Sandbox.Engine.Physics.MyPhysicsBody.GetRigidBodyMatrix ( MatrixD  worldMatrix)
inlineprotected

Definition at line 1478 of file MyPhysicsBody.cs.

virtual HkShape Sandbox.Engine.Physics.MyPhysicsBody.GetShape ( )
inlinevirtual

Gets shape of this physics body even if its welded with other

Returns

Reimplemented in Sandbox.Game.Entities.Cube.MyGridPhysics.

Definition at line 1806 of file MyPhysicsBody.cs.

override Vector3 Sandbox.Engine.Physics.MyPhysicsBody.GetVelocityAtPoint ( Vector3D  worldPos)
inlinevirtual

Implements VRage.Game.Components.MyPhysicsComponentBase.

Definition at line 1383 of file MyPhysicsBody.cs.

override MatrixD Sandbox.Engine.Physics.MyPhysicsBody.GetWorldMatrix ( )
inlinevirtual

Implements VRage.Game.Components.MyPhysicsComponentBase.

Definition at line 1340 of file MyPhysicsBody.cs.

override void Sandbox.Engine.Physics.MyPhysicsBody.Init ( MyComponentDefinitionBase  definition)
inlinevirtual

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 1853 of file MyPhysicsBody.cs.

static bool Sandbox.Engine.Physics.MyPhysicsBody.IsConstraintValid ( HkConstraint  constraint)
inlinestatic

Definition at line 1533 of file MyPhysicsBody.cs.

override void Sandbox.Engine.Physics.MyPhysicsBody.OnAddedToContainer ( )
inlinevirtual

Gets called after the container of this component changes

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 1861 of file MyPhysicsBody.cs.

override void Sandbox.Engine.Physics.MyPhysicsBody.OnAddedToScene ( )
inlinevirtual

CH: TOOD: Be careful! This does not get called if the component is added to a container that is in the scene already!

Reimplemented from VRage.Game.Components.MyComponentBase.

Definition at line 1873 of file MyPhysicsBody.cs.

virtual void Sandbox.Engine.Physics.MyPhysicsBody.OnMotion ( HkRigidBody  rbo,
float  step,
bool  fromParent = false 
)
inlinevirtual

Called when [motion].

Parameters
rboThe rbo.
stepThe step.

Reimplemented in Sandbox.Game.Entities.MyManipulationTool.MyCharacterVirtualPhysicsBody, and Sandbox.Game.Entities.MyHandToolBase.MyBlockingBody.

Definition at line 1222 of file MyPhysicsBody.cs.

virtual void Sandbox.Engine.Physics.MyPhysicsBody.OnUnwelded ( MyPhysicsBody  other)
inlineprotectedvirtual

Reimplemented in Sandbox.Game.Entities.Cube.MyGridPhysics.

Definition at line 395 of file MyPhysicsBody.Welding.cs.

virtual void Sandbox.Engine.Physics.MyPhysicsBody.OnWelded ( MyPhysicsBody  other)
inlineprotectedvirtual

Reimplemented in Sandbox.Game.Entities.Cube.MyGridPhysics.

Definition at line 390 of file MyPhysicsBody.Welding.cs.

override void Sandbox.Engine.Physics.MyPhysicsBody.OnWorldPositionChanged ( object  source)
inlinevirtual

Called when [world position changed].

Parameters
sourceThe source object that caused this event.

Implements VRage.Game.Components.MyPhysicsComponentBase.

Reimplemented in Sandbox.Game.Entities.MyManipulationTool.MyCharacterVirtualPhysicsBody, and Sandbox.Game.Entities.MyHandToolBase.MyBlockingBody.

Definition at line 1399 of file MyPhysicsBody.cs.

delegate void Sandbox.Engine.Physics.MyPhysicsBody.PhysicsContactHandler ( ref MyPhysics.MyContactPointEvent  e)
void Sandbox.Engine.Physics.MyPhysicsBody.PlayContactSound ( HkContactPointEvent  value,
float  volume = 0 
)
inline

Definition at line 880 of file MyPhysicsBody.cs.

void Sandbox.Engine.Physics.MyPhysicsBody.RecreateWeldedShape ( )
inline

Definition at line 188 of file MyPhysicsBody.Welding.cs.

void Sandbox.Engine.Physics.MyPhysicsBody.RemoveConstraint ( HkConstraint  constraint)
inline

Definition at line 1560 of file MyPhysicsBody.cs.

void Sandbox.Engine.Physics.MyPhysicsBody.SetRagdollDefaults ( )
inline

Sets default values for ragdoll bodies and constraints - useful if ragdoll model is not correct

Definition at line 288 of file MyPhysicsBody.Ragdoll.cs.

void Sandbox.Engine.Physics.MyPhysicsBody.SwitchToRagdollMode ( bool  deadMode = true,
int  firstRagdollSubID = 1 
)
inline

Definition at line 103 of file MyPhysicsBody.Ragdoll.cs.

void Sandbox.Engine.Physics.MyPhysicsBody.SynchronizeKeyframedRigidBody ( )
inline

Definition at line 1306 of file MyPhysicsBody.cs.

void Sandbox.Engine.Physics.MyPhysicsBody.Unweld ( MyPhysicsBody  other,
bool  insertToWorld = true,
bool  recreateShape = true 
)
inline

Definition at line 305 of file MyPhysicsBody.Welding.cs.

void Sandbox.Engine.Physics.MyPhysicsBody.Unweld ( bool  insertInWorld = true)
inline

Definition at line 381 of file MyPhysicsBody.Welding.cs.

void Sandbox.Engine.Physics.MyPhysicsBody.UnweldAll ( bool  insertInWorld)
inline

Definition at line 296 of file MyPhysicsBody.Welding.cs.

void Sandbox.Engine.Physics.MyPhysicsBody.UpdateCluster ( )
inline

Definition at line 1754 of file MyPhysicsBody.cs.

override void Sandbox.Engine.Physics.MyPhysicsBody.UpdateFromSystem ( )
inlinevirtual

Implements VRage.Game.Components.MyPhysicsComponentBase.

Definition at line 1899 of file MyPhysicsBody.cs.

void Sandbox.Engine.Physics.MyPhysicsBody.UpdateMassProps ( )
inline

Definition at line 198 of file MyPhysicsBody.Welding.cs.

void Sandbox.Engine.Physics.MyPhysicsBody.Weld ( MyPhysicsComponentBase  other,
bool  recreateShape = true 
)
inline

Definition at line 90 of file MyPhysicsBody.Welding.cs.

void Sandbox.Engine.Physics.MyPhysicsBody.Weld ( MyPhysicsBody  other,
bool  recreateShape = true 
)
inline

Definition at line 95 of file MyPhysicsBody.Welding.cs.

override Vector3D Sandbox.Engine.Physics.MyPhysicsBody.WorldToCluster ( Vector3D  worldPos)
inlinevirtual

Converts global space position to local cluster space.

Implements VRage.Game.Components.MyPhysicsComponentBase.

Definition at line 1591 of file MyPhysicsBody.cs.

Member Data Documentation

HkSolverDeactivation Sandbox.Engine.Physics.MyPhysicsBody.InitialSolverDeactivation = HkSolverDeactivation.Low

Must be set before creating rigid body

Definition at line 288 of file MyPhysicsBody.cs.

float Sandbox.Engine.Physics.MyPhysicsBody.m_angularDamping
protected

Definition at line 67 of file MyPhysicsBody.cs.

Matrix Sandbox.Engine.Physics.MyPhysicsBody.m_bodyMatrix
protected

Definition at line 90 of file MyPhysicsBody.cs.

float Sandbox.Engine.Physics.MyPhysicsBody.m_linearDamping
protected

Definition at line 68 of file MyPhysicsBody.cs.

HkRagdoll Sandbox.Engine.Physics.MyPhysicsBody.m_ragdoll
protected

Definition at line 83 of file MyPhysicsBody.Ragdoll.cs.

HkWorld Sandbox.Engine.Physics.MyPhysicsBody.m_world
protected

Definition at line 94 of file MyPhysicsBody.cs.

Vector3D Sandbox.Engine.Physics.MyPhysicsBody.Offset = Vector3D.Zero
protected

Definition at line 89 of file MyPhysicsBody.cs.

readonly MyWeldInfo Sandbox.Engine.Physics.MyPhysicsBody.WeldInfo = new MyWeldInfo()

Definition at line 88 of file MyPhysicsBody.Welding.cs.

Property Documentation

override float Sandbox.Engine.Physics.MyPhysicsBody.AngularDamping
getset

Gets or sets the angular damping.

The angular damping.

Definition at line 388 of file MyPhysicsBody.cs.

override Vector3 Sandbox.Engine.Physics.MyPhysicsBody.AngularVelocity
getset

Gets or sets the angular velocity.

The angular velocity.

Definition at line 409 of file MyPhysicsBody.cs.

override HkdBreakableBody Sandbox.Engine.Physics.MyPhysicsBody.BreakableBody
getset

Definition at line 53 of file MyPhysicsBody.Destruction.cs.

override Vector3D Sandbox.Engine.Physics.MyPhysicsBody.CenterOfMassWorld
get

Definition at line 1498 of file MyPhysicsBody.cs.

uint Sandbox.Engine.Physics.MyPhysicsBody.CharacterCollisionFilter
get

This is character collision filter, use this to avoid collisions with character and character holding bodies.

Definition at line 295 of file MyPhysicsBody.cs.

MyCharacterProxy Sandbox.Engine.Physics.MyPhysicsBody.CharacterProxy
getset

Definition at line 290 of file MyPhysicsBody.cs.

int Sandbox.Engine.Physics.MyPhysicsBody.CharacterSystemGroupCollisionFilterID
get

This system group id will is used to set's this character rigid bodies collision filters.

Definition at line 293 of file MyPhysicsBody.cs.

ulong Sandbox.Engine.Physics.MyPhysicsBody.ClusterObjectID
getsetprotected

Definition at line 73 of file MyPhysicsBody.cs.

HashSetReader<HkConstraint> Sandbox.Engine.Physics.MyPhysicsBody.Constraints
get

Definition at line 1580 of file MyPhysicsBody.cs.

new MyPhysicsBodyComponentDefinition Sandbox.Engine.Physics.MyPhysicsBody.Definition
get

Definition at line 92 of file MyPhysicsBody.cs.

override float Sandbox.Engine.Physics.MyPhysicsBody.Friction
getset

Definition at line 204 of file MyPhysicsBody.cs.

override Vector3 Sandbox.Engine.Physics.MyPhysicsBody.Gravity
get

Definition at line 1200 of file MyPhysicsBody.cs.

override bool Sandbox.Engine.Physics.MyPhysicsBody.HasRigidBody
get

Definition at line 1495 of file MyPhysicsBody.cs.

virtual int Sandbox.Engine.Physics.MyPhysicsBody.HavokCollisionSystemID
getprotected set

Definition at line 105 of file MyPhysicsBody.cs.

HkWorld Sandbox.Engine.Physics.MyPhysicsBody.HavokWorld
get

Definition at line 96 of file MyPhysicsBody.cs.

override bool Sandbox.Engine.Physics.MyPhysicsBody.IsInWorld
getprotected set

Definition at line 300 of file MyPhysicsBody.cs.

override bool Sandbox.Engine.Physics.MyPhysicsBody.IsKinematic
get

Definition at line 226 of file MyPhysicsBody.cs.

override bool Sandbox.Engine.Physics.MyPhysicsBody.IsMoving
get

Returns true when linear velocity or angular velocity is non-zero.

Definition at line 1195 of file MyPhysicsBody.cs.

bool Sandbox.Engine.Physics.MyPhysicsBody.IsRagdollModeActive
get

Returns true when ragdoll is in world

Definition at line 59 of file MyPhysicsBody.Ragdoll.cs.

override bool Sandbox.Engine.Physics.MyPhysicsBody.IsStatic
get

Definition at line 216 of file MyPhysicsBody.cs.

virtual bool Sandbox.Engine.Physics.MyPhysicsBody.IsStaticForCluster
getset

Definition at line 1586 of file MyPhysicsBody.cs.

bool Sandbox.Engine.Physics.MyPhysicsBody.IsSubpart
getset

Definition at line 236 of file MyPhysicsBody.cs.

bool Sandbox.Engine.Physics.MyPhysicsBody.IsWelded
get

Definition at line 86 of file MyPhysicsBody.Welding.cs.

override float Sandbox.Engine.Physics.MyPhysicsBody.LinearDamping
getset

Gets or sets the linear damping.

The linear damping.

Definition at line 367 of file MyPhysicsBody.cs.

override Vector3 Sandbox.Engine.Physics.MyPhysicsBody.LinearVelocity
getset

Gets or sets the linear velocity.

The linear velocity.

Definition at line 320 of file MyPhysicsBody.cs.

override float Sandbox.Engine.Physics.MyPhysicsBody.Mass
get

Gets or sets the mass.

The mass.

Definition at line 170 of file MyPhysicsBody.cs.

HkRagdoll Sandbox.Engine.Physics.MyPhysicsBody.Ragdoll
getset

Definition at line 68 of file MyPhysicsBody.Ragdoll.cs.

int Sandbox.Engine.Physics.MyPhysicsBody.RagdollSystemGroupCollisionFilterID
get

This System Collision ID is used for ragdoll in non-dead mode to avoid collision with character's rigid body.

Definition at line 53 of file MyPhysicsBody.Ragdoll.cs.

bool Sandbox.Engine.Physics.MyPhysicsBody.ReactivateRagdoll
getset

Definition at line 408 of file MyPhysicsBody.Ragdoll.cs.

override HkRigidBody Sandbox.Engine.Physics.MyPhysicsBody.RigidBody
getprotected set

Definition at line 128 of file MyPhysicsBody.cs.

override HkRigidBody Sandbox.Engine.Physics.MyPhysicsBody.RigidBody2
getprotected set

Definition at line 154 of file MyPhysicsBody.cs.

override float Sandbox.Engine.Physics.MyPhysicsBody.Speed
get

Gets or sets the speed.

The speed.

Definition at line 195 of file MyPhysicsBody.cs.

bool Sandbox.Engine.Physics.MyPhysicsBody.SwitchToRagdollModeOnActivate
getset

Definition at line 411 of file MyPhysicsBody.Ragdoll.cs.

HkRigidBody Sandbox.Engine.Physics.MyPhysicsBody.WeldedRigidBody
getprotected set

Definition at line 388 of file MyPhysicsBody.Welding.cs.

Event Documentation

PhysicsContactHandler Sandbox.Engine.Physics.MyPhysicsBody.ContactPointCallback

Definition at line 157 of file MyPhysicsBody.cs.


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