Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
Physics Class Reference

Private Member Functions

proto external int AddGeom (string name, PhysicsGeom geom, vector frame[4], string material, int interactionLayer)
 Adds new geometry and returns an index of the geometry or -1 when an error occurred.
proto external int AddGeom (string name, PhysicsGeom geom, vector frame[4], string material, int interactionLayer)
 Adds new geometry and returns an index of the geometry or -1 when an error occurred.
proto external void ApplyForce (vector force)
 Applies constant force on the physics body (at origin).
proto external void ApplyForce (vector force)
 Applies constant force on the physics body (at origin).
proto external void ApplyForceAt (vector pos, vector force)
 Applies constant force on the physics body at a position (world space coordinates).
proto external void ApplyForceAt (vector pos, vector force)
 Applies constant force on the physics body at a position (world space coordinates).
proto external void ApplyImpulse (vector impulse)
 Applies impulse on the physics body.
proto external void ApplyImpulse (vector impulse)
 Applies impulse on the physics body.
proto external void ApplyImpulseAt (vector pos, vector impulse)
 Applies impulse on the physics body at a position (world space coordinates).
proto external void ApplyImpulseAt (vector pos, vector impulse)
 Applies impulse on the physics body at a position (world space coordinates).
proto external void ApplyTorque (vector torque)
 Applies constant torque on the physics body.
proto external void ApplyTorque (vector torque)
 Applies constant torque on the physics body.
proto external void ChangeSimulationState (SimulationState simState)
 Changes simulation state of the physics body.
proto external void ChangeSimulationState (SimulationState simState)
 Changes simulation state of the physics body.
proto external void ClearForces ()
 Clear forces and torques on the physics body.
proto external void ClearForces ()
 Clear forces and torques on the physics body.
proto external void Destroy ()
 Destroys the physics body.
proto external void Destroy ()
 Destroys the physics body.
proto external void EnableCCD (float maxMotion, float sphereCastRadius)
 Changes state of the continuous collision detection (CCD).
proto external void EnableCCD (float maxMotion, float sphereCastRadius)
 Changes state of the continuous collision detection (CCD).
proto external bool EnableGravity (bool enable)
 Enables gravity on the physics body.
proto external bool EnableGravity (bool enable)
 Enables gravity on the physics body.
proto external vector GetAngularVelocity ()
 Returns angular velocity of the physics body.
proto external vector GetAngularVelocity ()
 Returns angular velocity of the physics body.
proto external Physics GetBone (int index)
 Returns the bone at the index.
proto external Physics GetBone (int index)
 Returns the bone at the index.
proto external vector GetCenterOfMass ()
 Returns center of mass offset of the physics body.
proto external vector GetCenterOfMass ()
 Returns center of mass offset of the physics body.
proto external void GetDirectWorldTransform (out vector mat[4])
 Returns internal world space transformation of the physics body (excluding scale).
proto external void GetDirectWorldTransform (out vector mat[4])
 Returns internal world space transformation of the physics body (excluding scale).
proto external int GetGeom (string name)
 Finds a geometry by its name and returns its index or -1 if the geometry wasn't found.
proto external int GetGeom (string name)
 Finds a geometry by its name and returns its index or -1 if the geometry wasn't found.
proto external void GetGeomDirectBounds (int index, out vector min, out vector max)
 Returns internal physics bounds of a geometry element (at scale 1).
proto external void GetGeomDirectBounds (int index, out vector min, out vector max)
 Returns internal physics bounds of a geometry element (at scale 1).
proto external vector GetGeomDirectPosition (int index)
 Returns internal physics space position of a geometry element.
proto external vector GetGeomDirectPosition (int index)
 Returns internal physics space position of a geometry element.
proto external void GetGeomDirectTransform (int index, out vector mat[4])
 Returns internal physics space transformation of a geometry element.
proto external void GetGeomDirectTransform (int index, out vector mat[4])
 Returns internal physics space transformation of a geometry element.
proto external int GetGeomInteractionLayer (int index)
 Returns interaction layer mask of the geometry element.
proto external int GetGeomInteractionLayer (int index)
 Returns interaction layer mask of the geometry element.
proto external string GetGeomName (int index)
 Returns name of a geometry element.
proto external string GetGeomName (int index)
 Returns name of a geometry element.
proto external vector GetGeomPosition (int index)
 Returns entity space position of a geometry element.
proto external vector GetGeomPosition (int index)
 Returns entity space position of a geometry element.
proto external void GetGeomSurfaces (int index, notnull out array< SurfaceProperties > surfaces)
 Returns all surface properties of a geometry element.
proto external void GetGeomSurfaces (int index, notnull out array< SurfaceProperties > surfaces)
 Returns all surface properties of a geometry element.
proto external void GetGeomTransform (int index, out vector mat[4])
 Returns entity space transformation of a geometry element.
proto external void GetGeomTransform (int index, out vector mat[4])
 Returns entity space transformation of a geometry element.
proto external void GetGeomWorldBounds (int index, out vector min, out vector max)
 Returns world bounds of a geometry element.
proto external void GetGeomWorldBounds (int index, out vector min, out vector max)
 Returns world bounds of a geometry element.
proto external vector GetGeomWorldPosition (int index)
 Returns world space position of a geometry element.
proto external vector GetGeomWorldPosition (int index)
 Returns world space position of a geometry element.
proto external void GetGeomWorldTransform (int index, out vector mat[4])
 Returns world space transformation of a geometry element.
proto external void GetGeomWorldTransform (int index, out vector mat[4])
 Returns world space transformation of a geometry element.
proto external int GetInteractionLayer ()
 Returns interaction layer mask of the physics body.
proto external int GetInteractionLayer ()
 Returns interaction layer mask of the physics body.
proto external float GetMass ()
 Returns mass of the physics body.
proto external float GetMass ()
 Returns mass of the physics body.
proto external int GetNumBones ()
 Returns the number of bones.
proto external int GetNumBones ()
 Returns the number of bones.
proto external int GetNumGeoms ()
 Returns number of geometries of the entity.
proto external int GetNumGeoms ()
 Returns number of geometries of the entity.
proto external int GetResponseIndex ()
 Returns actual index to response matrix.
proto external int GetResponseIndex ()
 Returns actual index to response matrix.
proto external SimulationState GetSimulationState ()
 Returns simulation state of the physics body.
proto external SimulationState GetSimulationState ()
 Returns simulation state of the physics body.
proto external vector GetTotalForce ()
 Returns total force currently applied to the physics body.
proto external vector GetTotalForce ()
 Returns total force currently applied to the physics body.
proto external vector GetTotalTorque ()
 Returns total torque currently applied to the physics body.
proto external vector GetTotalTorque ()
 Returns total torque currently applied to the physics body.
proto external vector GetVelocity ()
 Returns linear velocity of the physics body.
proto external vector GetVelocity ()
 Returns linear velocity of the physics body.
proto external vector GetVelocityAt (vector pos)
 Returns linear velocity of the physics body at a position (world space coordinates).
proto external vector GetVelocityAt (vector pos)
 Returns linear velocity of the physics body at a position (world space coordinates).
proto external void GetWorldTransform (out vector mat[4])
 Returns world space transformation of the physics body (including scale).
proto external void GetWorldTransform (out vector mat[4])
 Returns world space transformation of the physics body (including scale).
proto external bool HasInteractionEnabled (int mask)
 Returns true if the physics body has enabled interaction with other body's layer mask.
proto external bool HasInteractionEnabled (int mask)
 Returns true if the physics body has enabled interaction with other body's layer mask.
proto external bool IsActive ()
 Returns whether the physics body is being simulated (awake).
proto external bool IsActive ()
 Returns whether the physics body is being simulated (awake).
proto external bool IsDynamic ()
 Returns whether the physics body is dynamic (a rigid body).
proto external bool IsDynamic ()
 Returns whether the physics body is dynamic (a rigid body).
proto external bool IsKinematic ()
 Returns whether the physics body is kinematic (animated).
proto external bool IsKinematic ()
 Returns whether the physics body is kinematic (animated).
proto external void SetActive (ActiveState act)
 Changes activation state of the physics body.
proto external void SetActive (ActiveState act)
 Changes activation state of the physics body.
proto external void SetAngularVelocity (vector velocity)
 Sets angular velocity of the physics body.
proto external void SetAngularVelocity (vector velocity)
 Sets angular velocity of the physics body.
proto external void SetDamping (float linearDamping, float angularDamping)
 Changes damping parameters of the physics body.
proto external void SetDamping (float linearDamping, float angularDamping)
 Changes damping parameters of the physics body.
proto external void SetGeomInteractionLayer (int index, int mask)
 Sets interaction layer mask of the geometry element.
proto external void SetGeomInteractionLayer (int index, int mask)
 Sets interaction layer mask of the geometry element.
proto external void SetInertiaTensorV (vector v)
 Changes inertia tensor of the physics body.
proto external void SetInertiaTensorV (vector v)
 Changes inertia tensor of the physics body.
proto external void SetInteractionLayer (int mask)
 Sets interaction layer mask of the physics body.
proto external void SetInteractionLayer (int mask)
 Sets interaction layer mask of the physics body.
proto external void SetLinearFactor (vector linearFactor)
 Sets scale factor for all impulses/velocities/forces. Default is <1,1,1>. Zero any axis if you want to do 2D physics.
proto external void SetLinearFactor (vector linearFactor)
 Sets scale factor for all impulses/velocities/forces. Default is <1,1,1>. Zero any axis if you want to do 2D physics.
proto external void SetMass (float mass)
 Changes mass of the physics body.
proto external void SetMass (float mass)
 Changes mass of the physics body.
proto external void SetResponseIndex (int responseIndex)
 Changes index to response matrix, see "project settings/physics/interactions/response matrix".
proto external void SetResponseIndex (int responseIndex)
 Changes index to response matrix, see "project settings/physics/interactions/response matrix".
proto external void SetSleepingTreshold (float linearTreshold, float angularTreshold)
 Changes thresholds used to determine whether the physics body can stop simulation.
proto external void SetSleepingTreshold (float linearTreshold, float angularTreshold)
 Changes thresholds used to determine whether the physics body can stop simulation.
proto external void SetTargetMatrix (vector matrix[4], float timeslice)
 Sets target transformation.
proto external void SetTargetMatrix (vector matrix[4], float timeslice)
 Sets target transformation.
proto external void SetVelocity (vector velocity)
 Sets linear velocity of the physics body.
proto external void SetVelocity (vector velocity)
 Sets linear velocity of the physics body.
proto external bool UpdateGeometries (int interactionLayerAnd=0xffffffff, int interactionLayerOr=0)
 Returns world space transformation of a geometry element.
proto external bool UpdateGeometries (int interactionLayerAnd=0xffffffff, int interactionLayerOr=0)
 Returns world space transformation of a geometry element.

Static Private Member Functions

static proto Physics CreateDynamic (notnull IEntity ent, float mass, int layerMask=0xffffffff)
 Creates a dynamic physics body from geometry embedded in attached VObject.
static proto Physics CreateDynamic (notnull IEntity ent, float mass, int layerMask=0xffffffff)
 Creates a dynamic physics body from geometry embedded in attached VObject.
static proto Physics CreateDynamicEx (notnull IEntity ent, vector centerOfMass, float mass, PhysicsGeomDef geoms[])
 Creates a dynamic physics body from custom made geometries.
static proto Physics CreateDynamicEx (notnull IEntity ent, vector centerOfMass, float mass, PhysicsGeomDef geoms[])
 Creates a dynamic physics body from custom made geometries.
static proto Physics CreateGhostEx (notnull IEntity ent, PhysicsGeomDef geoms[])
 Creates a ghost physics body from custom made geometries.
static proto Physics CreateGhostEx (notnull IEntity ent, PhysicsGeomDef geoms[])
 Creates a ghost physics body from custom made geometries.
static proto Physics CreateStatic (notnull IEntity ent, int layerMask=0xffffffff)
 Creates a static physics body from geometry embedded in attached VObject.
static proto Physics CreateStatic (notnull IEntity ent, int layerMask=0xffffffff)
 Creates a static physics body from geometry embedded in attached VObject.
static proto Physics CreateStaticEx (notnull IEntity ent, PhysicsGeomDef geoms[])
 Creates a static physics body from custom made geometries.
static proto Physics CreateStaticEx (notnull IEntity ent, PhysicsGeomDef geoms[])
 Creates a static physics body from custom made geometries.

Static Private Attributes

static const float KMH2MS = 1 / 3.6
static const float MS2KMH = 3.6
static const float STANDARD_GRAVITY = 9.81
static const vector VGravity = "0 -9.81 0"

Detailed Description

Definition at line 16 of file physics.c.

Member Function Documentation

◆ AddGeom() [1/2]

proto external int AddGeom ( string name,
PhysicsGeom geom,
vector frame[4],
string material,
int interactionLayer )
private

Adds new geometry and returns an index of the geometry or -1 when an error occurred.

vector frame[4];
frame[3] = vector.Up;
string material = "{D745FD8FC67DB26A}Common/Materials/Game/stone.gamemat";
GetPhysics().AddGeom("Box", geom, frame, material, 0xffffffff);
static proto PhysicsGeom CreateBox(vector size)
Creates box geometry.
static const vector Up
Definition enconvert.c:120
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static void MatrixIdentity4(out vector mat[4])
Creates identity matrix.
Definition enmath3d.c:256
Parameters
nameName of the element
geomPhysics geometry shape
frameLocal transformation
materialMaterial resource name
interactionLayerBit mask of layers geometry belongs to

References name.

◆ AddGeom() [2/2]

proto external int AddGeom ( string name,
PhysicsGeom geom,
vector frame[4],
string material,
int interactionLayer )
private

Adds new geometry and returns an index of the geometry or -1 when an error occurred.

vector frame[4];
frame[3] = vector.Up;
string material = "{D745FD8FC67DB26A}Common/Materials/Game/stone.gamemat";
GetPhysics().AddGeom("Box", geom, frame, material, 0xffffffff);
Parameters
nameName of the element
geomPhysics geometry shape
frameLocal transformation
materialMaterial resource name
interactionLayerBit mask of layers geometry belongs to

◆ ApplyForce() [1/2]

proto external void ApplyForce ( vector force)
private

Applies constant force on the physics body (at origin).

◆ ApplyForce() [2/2]

proto external void ApplyForce ( vector force)
private

Applies constant force on the physics body (at origin).

◆ ApplyForceAt() [1/2]

proto external void ApplyForceAt ( vector pos,
vector force )
private

Applies constant force on the physics body at a position (world space coordinates).

◆ ApplyForceAt() [2/2]

proto external void ApplyForceAt ( vector pos,
vector force )
private

Applies constant force on the physics body at a position (world space coordinates).

◆ ApplyImpulse() [1/2]

proto external void ApplyImpulse ( vector impulse)
private

Applies impulse on the physics body.

◆ ApplyImpulse() [2/2]

proto external void ApplyImpulse ( vector impulse)
private

Applies impulse on the physics body.

◆ ApplyImpulseAt() [1/2]

proto external void ApplyImpulseAt ( vector pos,
vector impulse )
private

Applies impulse on the physics body at a position (world space coordinates).

◆ ApplyImpulseAt() [2/2]

proto external void ApplyImpulseAt ( vector pos,
vector impulse )
private

Applies impulse on the physics body at a position (world space coordinates).

◆ ApplyTorque() [1/2]

proto external void ApplyTorque ( vector torque)
private

Applies constant torque on the physics body.

◆ ApplyTorque() [2/2]

proto external void ApplyTorque ( vector torque)
private

Applies constant torque on the physics body.

◆ ChangeSimulationState() [1/2]

proto external void ChangeSimulationState ( SimulationState simState)
private

Changes simulation state of the physics body.

◆ ChangeSimulationState() [2/2]

proto external void ChangeSimulationState ( SimulationState simState)
private

Changes simulation state of the physics body.

◆ ClearForces() [1/2]

proto external void ClearForces ( )
private

Clear forces and torques on the physics body.

◆ ClearForces() [2/2]

proto external void ClearForces ( )
private

Clear forces and torques on the physics body.

◆ CreateDynamic() [1/2]

proto Physics CreateDynamic ( notnull IEntity ent,
float mass,
int layerMask = 0xffffffff )
staticprivate

Creates a dynamic physics body from geometry embedded in attached VObject.

If there is not any, false is returned.

Parameters
entEntity that will be associated with the physics body
massBody mass
layerMaskBit mask of layers that is ANDed with layers in object geometry. Use 0xffffffff if you want to keep it unmodified

◆ CreateDynamic() [2/2]

proto Physics CreateDynamic ( notnull IEntity ent,
float mass,
int layerMask = 0xffffffff )
staticprivate

Creates a dynamic physics body from geometry embedded in attached VObject.

If there is not any, false is returned.

Parameters
entEntity that will be associated with the physics body
massBody mass
layerMaskBit mask of layers that is ANDed with layers in object geometry. Use 0xffffffff if you want to keep it unmodified

◆ CreateDynamicEx() [1/2]

proto Physics CreateDynamicEx ( notnull IEntity ent,
vector centerOfMass,
float mass,
PhysicsGeomDef geoms[] )
staticprivate

Creates a dynamic physics body from custom made geometries.

The geometries are deleted when rigid body is destroyed.

string material = "{D745FD8FC67DB26A}Common/Materials/Game/stone.gamemat";
PhysicsGeomDef geoms[] = { PhysicsGeomDef("", geom, material, 0xffffffff) };
vector center = 2 * vector.Up;
Physics.CreateDynamicEx(this, center, 1.0, geoms);
Geometry element properties.
static proto Physics CreateDynamicEx(notnull IEntity ent, vector centerOfMass, float mass, PhysicsGeomDef geoms[])
Creates a dynamic physics body from custom made geometries.
Parameters
entEntity that will be associated with the physics body
centerOfMassOffset from object-pivot to center of mass
massBody mass
geomsArray of custom made geometries

◆ CreateDynamicEx() [2/2]

proto Physics CreateDynamicEx ( notnull IEntity ent,
vector centerOfMass,
float mass,
PhysicsGeomDef geoms[] )
staticprivate

Creates a dynamic physics body from custom made geometries.

The geometries are deleted when rigid body is destroyed.

string material = "{D745FD8FC67DB26A}Common/Materials/Game/stone.gamemat";
PhysicsGeomDef geoms[] = { PhysicsGeomDef("", geom, material, 0xffffffff) };
vector center = 2 * vector.Up;
Physics.CreateDynamicEx(this, center, 1.0, geoms);
Parameters
entEntity that will be associated with the physics body
centerOfMassOffset from object-pivot to center of mass
massBody mass
geomsArray of custom made geometries

◆ CreateGhostEx() [1/2]

proto Physics CreateGhostEx ( notnull IEntity ent,
PhysicsGeomDef geoms[] )
staticprivate

Creates a ghost physics body from custom made geometries.

The geometries are deleted when rigid body is destroyed.

Parameters
entEntity that will be associated with the physics body
geomsArray of custom made geometries

◆ CreateGhostEx() [2/2]

proto Physics CreateGhostEx ( notnull IEntity ent,
PhysicsGeomDef geoms[] )
staticprivate

Creates a ghost physics body from custom made geometries.

The geometries are deleted when rigid body is destroyed.

Parameters
entEntity that will be associated with the physics body
geomsArray of custom made geometries

◆ CreateStatic() [1/2]

proto Physics CreateStatic ( notnull IEntity ent,
int layerMask = 0xffffffff )
staticprivate

Creates a static physics body from geometry embedded in attached VObject.

If there is not any, false is returned.

Parameters
entEntity that will be associated with the physics body
layerMaskBit mask of layers that is ANDed with layers in object geometry. Use 0xffffffff if you want to keep it unmodified

◆ CreateStatic() [2/2]

proto Physics CreateStatic ( notnull IEntity ent,
int layerMask = 0xffffffff )
staticprivate

Creates a static physics body from geometry embedded in attached VObject.

If there is not any, false is returned.

Parameters
entEntity that will be associated with the physics body
layerMaskBit mask of layers that is ANDed with layers in object geometry. Use 0xffffffff if you want to keep it unmodified

◆ CreateStaticEx() [1/2]

proto Physics CreateStaticEx ( notnull IEntity ent,
PhysicsGeomDef geoms[] )
staticprivate

Creates a static physics body from custom made geometries.

The geometries are deleted when rigid body is destroyed.

string material = "{D745FD8FC67DB26A}Common/Materials/Game/stone.gamemat";
PhysicsGeomDef geoms[] = { PhysisGeomDef("Box", geom, material, 0xffffffff) };
Physics.CreateStaticEx(this, geoms);
static proto Physics CreateStaticEx(notnull IEntity ent, PhysicsGeomDef geoms[])
Creates a static physics body from custom made geometries.
Parameters
entEntity that will be associated with the physics body
geomsArray of custom made geometries

◆ CreateStaticEx() [2/2]

proto Physics CreateStaticEx ( notnull IEntity ent,
PhysicsGeomDef geoms[] )
staticprivate

Creates a static physics body from custom made geometries.

The geometries are deleted when rigid body is destroyed.

string material = "{D745FD8FC67DB26A}Common/Materials/Game/stone.gamemat";
PhysicsGeomDef geoms[] = { PhysisGeomDef("Box", geom, material, 0xffffffff) };
Physics.CreateStaticEx(this, geoms);
Parameters
entEntity that will be associated with the physics body
geomsArray of custom made geometries

◆ Destroy() [1/2]

proto external void Destroy ( )
private

Destroys the physics body.

◆ Destroy() [2/2]

proto external void Destroy ( )
private

Destroys the physics body.

◆ EnableCCD() [1/2]

proto external void EnableCCD ( float maxMotion,
float sphereCastRadius )
private

Changes state of the continuous collision detection (CCD).

If both maxMotion and shapeCastRadius is >=0 then the CCD is enabled. If you want to disable it, use -1.

Parameters
maxMotionMax motion threshold when sphere-cast is performed, to find time of impact. It should be little bit less than size of the geometry to catch the situation when tunneling can happen.
sphereCastRadiusThe radius of the largest possible sphere, that is completely inside the body geometry.

◆ EnableCCD() [2/2]

proto external void EnableCCD ( float maxMotion,
float sphereCastRadius )
private

Changes state of the continuous collision detection (CCD).

If both maxMotion and shapeCastRadius is >=0 then the CCD is enabled. If you want to disable it, use -1.

Parameters
maxMotionMax motion threshold when sphere-cast is performed, to find time of impact. It should be little bit less than size of the geometry to catch the situation when tunneling can happen.
sphereCastRadiusThe radius of the largest possible sphere, that is completely inside the body geometry.

◆ EnableGravity() [1/2]

proto external bool EnableGravity ( bool enable)
private

Enables gravity on the physics body.

◆ EnableGravity() [2/2]

proto external bool EnableGravity ( bool enable)
private

Enables gravity on the physics body.

◆ GetAngularVelocity() [1/2]

proto external vector GetAngularVelocity ( )
private

Returns angular velocity of the physics body.

◆ GetAngularVelocity() [2/2]

proto external vector GetAngularVelocity ( )
private

Returns angular velocity of the physics body.

◆ GetBone() [1/2]

proto external Physics GetBone ( int index)
private

Returns the bone at the index.

◆ GetBone() [2/2]

proto external Physics GetBone ( int index)
private

Returns the bone at the index.

◆ GetCenterOfMass() [1/2]

proto external vector GetCenterOfMass ( )
private

Returns center of mass offset of the physics body.

◆ GetCenterOfMass() [2/2]

proto external vector GetCenterOfMass ( )
private

Returns center of mass offset of the physics body.

◆ GetDirectWorldTransform() [1/2]

proto external void GetDirectWorldTransform ( out vector mat[4])
private

Returns internal world space transformation of the physics body (excluding scale).

◆ GetDirectWorldTransform() [2/2]

proto external void GetDirectWorldTransform ( out vector mat[4])
private

Returns internal world space transformation of the physics body (excluding scale).

◆ GetGeom() [1/2]

proto external int GetGeom ( string name)
private

Finds a geometry by its name and returns its index or -1 if the geometry wasn't found.

References name.

◆ GetGeom() [2/2]

proto external int GetGeom ( string name)
private

Finds a geometry by its name and returns its index or -1 if the geometry wasn't found.

◆ GetGeomDirectBounds() [1/2]

proto external void GetGeomDirectBounds ( int index,
out vector min,
out vector max )
private

Returns internal physics bounds of a geometry element (at scale 1).

◆ GetGeomDirectBounds() [2/2]

proto external void GetGeomDirectBounds ( int index,
out vector min,
out vector max )
private

Returns internal physics bounds of a geometry element (at scale 1).

◆ GetGeomDirectPosition() [1/2]

proto external vector GetGeomDirectPosition ( int index)
private

Returns internal physics space position of a geometry element.

◆ GetGeomDirectPosition() [2/2]

proto external vector GetGeomDirectPosition ( int index)
private

Returns internal physics space position of a geometry element.

◆ GetGeomDirectTransform() [1/2]

proto external void GetGeomDirectTransform ( int index,
out vector mat[4] )
private

Returns internal physics space transformation of a geometry element.

◆ GetGeomDirectTransform() [2/2]

proto external void GetGeomDirectTransform ( int index,
out vector mat[4] )
private

Returns internal physics space transformation of a geometry element.

◆ GetGeomInteractionLayer() [1/2]

proto external int GetGeomInteractionLayer ( int index)
private

Returns interaction layer mask of the geometry element.

◆ GetGeomInteractionLayer() [2/2]

proto external int GetGeomInteractionLayer ( int index)
private

Returns interaction layer mask of the geometry element.

◆ GetGeomName() [1/2]

proto external string GetGeomName ( int index)
private

Returns name of a geometry element.

◆ GetGeomName() [2/2]

proto external string GetGeomName ( int index)
private

Returns name of a geometry element.

◆ GetGeomPosition() [1/2]

proto external vector GetGeomPosition ( int index)
private

Returns entity space position of a geometry element.

◆ GetGeomPosition() [2/2]

proto external vector GetGeomPosition ( int index)
private

Returns entity space position of a geometry element.

◆ GetGeomSurfaces() [1/2]

proto external void GetGeomSurfaces ( int index,
notnull out array< SurfaceProperties > surfaces )
private

Returns all surface properties of a geometry element.

◆ GetGeomSurfaces() [2/2]

proto external void GetGeomSurfaces ( int index,
notnull out array< SurfaceProperties > surfaces )
private

Returns all surface properties of a geometry element.

◆ GetGeomTransform() [1/2]

proto external void GetGeomTransform ( int index,
out vector mat[4] )
private

Returns entity space transformation of a geometry element.

◆ GetGeomTransform() [2/2]

proto external void GetGeomTransform ( int index,
out vector mat[4] )
private

Returns entity space transformation of a geometry element.

◆ GetGeomWorldBounds() [1/2]

proto external void GetGeomWorldBounds ( int index,
out vector min,
out vector max )
private

Returns world bounds of a geometry element.

◆ GetGeomWorldBounds() [2/2]

proto external void GetGeomWorldBounds ( int index,
out vector min,
out vector max )
private

Returns world bounds of a geometry element.

◆ GetGeomWorldPosition() [1/2]

proto external vector GetGeomWorldPosition ( int index)
private

Returns world space position of a geometry element.

◆ GetGeomWorldPosition() [2/2]

proto external vector GetGeomWorldPosition ( int index)
private

Returns world space position of a geometry element.

◆ GetGeomWorldTransform() [1/2]

proto external void GetGeomWorldTransform ( int index,
out vector mat[4] )
private

Returns world space transformation of a geometry element.

◆ GetGeomWorldTransform() [2/2]

proto external void GetGeomWorldTransform ( int index,
out vector mat[4] )
private

Returns world space transformation of a geometry element.

◆ GetInteractionLayer() [1/2]

proto external int GetInteractionLayer ( )
private

Returns interaction layer mask of the physics body.

◆ GetInteractionLayer() [2/2]

proto external int GetInteractionLayer ( )
private

Returns interaction layer mask of the physics body.

◆ GetMass() [1/2]

proto external float GetMass ( )
private

Returns mass of the physics body.

◆ GetMass() [2/2]

proto external float GetMass ( )
private

Returns mass of the physics body.

◆ GetNumBones() [1/2]

proto external int GetNumBones ( )
private

Returns the number of bones.

◆ GetNumBones() [2/2]

proto external int GetNumBones ( )
private

Returns the number of bones.

◆ GetNumGeoms() [1/2]

proto external int GetNumGeoms ( )
private

Returns number of geometries of the entity.

◆ GetNumGeoms() [2/2]

proto external int GetNumGeoms ( )
private

Returns number of geometries of the entity.

◆ GetResponseIndex() [1/2]

proto external int GetResponseIndex ( )
private

Returns actual index to response matrix.

◆ GetResponseIndex() [2/2]

proto external int GetResponseIndex ( )
private

Returns actual index to response matrix.

◆ GetSimulationState() [1/2]

proto external SimulationState GetSimulationState ( )
private

Returns simulation state of the physics body.

◆ GetSimulationState() [2/2]

proto external SimulationState GetSimulationState ( )
private

Returns simulation state of the physics body.

◆ GetTotalForce() [1/2]

proto external vector GetTotalForce ( )
private

Returns total force currently applied to the physics body.

◆ GetTotalForce() [2/2]

proto external vector GetTotalForce ( )
private

Returns total force currently applied to the physics body.

◆ GetTotalTorque() [1/2]

proto external vector GetTotalTorque ( )
private

Returns total torque currently applied to the physics body.

◆ GetTotalTorque() [2/2]

proto external vector GetTotalTorque ( )
private

Returns total torque currently applied to the physics body.

◆ GetVelocity() [1/2]

proto external vector GetVelocity ( )
private

Returns linear velocity of the physics body.

◆ GetVelocity() [2/2]

proto external vector GetVelocity ( )
private

Returns linear velocity of the physics body.

◆ GetVelocityAt() [1/2]

proto external vector GetVelocityAt ( vector pos)
private

Returns linear velocity of the physics body at a position (world space coordinates).

◆ GetVelocityAt() [2/2]

proto external vector GetVelocityAt ( vector pos)
private

Returns linear velocity of the physics body at a position (world space coordinates).

◆ GetWorldTransform() [1/2]

proto external void GetWorldTransform ( out vector mat[4])
private

Returns world space transformation of the physics body (including scale).

◆ GetWorldTransform() [2/2]

proto external void GetWorldTransform ( out vector mat[4])
private

Returns world space transformation of the physics body (including scale).

◆ HasInteractionEnabled() [1/2]

proto external bool HasInteractionEnabled ( int mask)
private

Returns true if the physics body has enabled interaction with other body's layer mask.

◆ HasInteractionEnabled() [2/2]

proto external bool HasInteractionEnabled ( int mask)
private

Returns true if the physics body has enabled interaction with other body's layer mask.

◆ IsActive() [1/2]

proto external bool IsActive ( )
private

Returns whether the physics body is being simulated (awake).

◆ IsActive() [2/2]

proto external bool IsActive ( )
private

Returns whether the physics body is being simulated (awake).

◆ IsDynamic() [1/2]

proto external bool IsDynamic ( )
private

Returns whether the physics body is dynamic (a rigid body).

◆ IsDynamic() [2/2]

proto external bool IsDynamic ( )
private

Returns whether the physics body is dynamic (a rigid body).

◆ IsKinematic() [1/2]

proto external bool IsKinematic ( )
private

Returns whether the physics body is kinematic (animated).

◆ IsKinematic() [2/2]

proto external bool IsKinematic ( )
private

Returns whether the physics body is kinematic (animated).

◆ SetActive() [1/2]

proto external void SetActive ( ActiveState act)
private

Changes activation state of the physics body.

◆ SetActive() [2/2]

proto external void SetActive ( ActiveState act)
private

Changes activation state of the physics body.

◆ SetAngularVelocity() [1/2]

proto external void SetAngularVelocity ( vector velocity)
private

Sets angular velocity of the physics body.

◆ SetAngularVelocity() [2/2]

proto external void SetAngularVelocity ( vector velocity)
private

Sets angular velocity of the physics body.

◆ SetDamping() [1/2]

proto external void SetDamping ( float linearDamping,
float angularDamping )
private

Changes damping parameters of the physics body.

◆ SetDamping() [2/2]

proto external void SetDamping ( float linearDamping,
float angularDamping )
private

Changes damping parameters of the physics body.

◆ SetGeomInteractionLayer() [1/2]

proto external void SetGeomInteractionLayer ( int index,
int mask )
private

Sets interaction layer mask of the geometry element.

◆ SetGeomInteractionLayer() [2/2]

proto external void SetGeomInteractionLayer ( int index,
int mask )
private

Sets interaction layer mask of the geometry element.

◆ SetInertiaTensorV() [1/2]

proto external void SetInertiaTensorV ( vector v)
private

Changes inertia tensor of the physics body.

Parameters
vDiagonal elements of the inertia tensor (a rigid body is aligned with the principle axes of inertia)

◆ SetInertiaTensorV() [2/2]

proto external void SetInertiaTensorV ( vector v)
private

Changes inertia tensor of the physics body.

Parameters
vDiagonal elements of the inertia tensor (a rigid body is aligned with the principle axes of inertia)

◆ SetInteractionLayer() [1/2]

proto external void SetInteractionLayer ( int mask)
private

Sets interaction layer mask of the physics body.

Parameters
maskBit mask of layers

◆ SetInteractionLayer() [2/2]

proto external void SetInteractionLayer ( int mask)
private

Sets interaction layer mask of the physics body.

Parameters
maskBit mask of layers

◆ SetLinearFactor() [1/2]

proto external void SetLinearFactor ( vector linearFactor)
private

Sets scale factor for all impulses/velocities/forces. Default is <1,1,1>. Zero any axis if you want to do 2D physics.

◆ SetLinearFactor() [2/2]

proto external void SetLinearFactor ( vector linearFactor)
private

Sets scale factor for all impulses/velocities/forces. Default is <1,1,1>. Zero any axis if you want to do 2D physics.

◆ SetMass() [1/2]

proto external void SetMass ( float mass)
private

Changes mass of the physics body.

◆ SetMass() [2/2]

proto external void SetMass ( float mass)
private

Changes mass of the physics body.

◆ SetResponseIndex() [1/2]

proto external void SetResponseIndex ( int responseIndex)
private

Changes index to response matrix, see "project settings/physics/interactions/response matrix".

Usually this index is set by physics component property, but can be overriden at runtime.

◆ SetResponseIndex() [2/2]

proto external void SetResponseIndex ( int responseIndex)
private

Changes index to response matrix, see "project settings/physics/interactions/response matrix".

Usually this index is set by physics component property, but can be overriden at runtime.

◆ SetSleepingTreshold() [1/2]

proto external void SetSleepingTreshold ( float linearTreshold,
float angularTreshold )
private

Changes thresholds used to determine whether the physics body can stop simulation.

◆ SetSleepingTreshold() [2/2]

proto external void SetSleepingTreshold ( float linearTreshold,
float angularTreshold )
private

Changes thresholds used to determine whether the physics body can stop simulation.

◆ SetTargetMatrix() [1/2]

proto external void SetTargetMatrix ( vector matrix[4],
float timeslice )
private

Sets target transformation.

If timeslice == dt (simulation step delta time), it will happen in next step, otherwise in time = timeslice.

◆ SetTargetMatrix() [2/2]

proto external void SetTargetMatrix ( vector matrix[4],
float timeslice )
private

Sets target transformation.

If timeslice == dt (simulation step delta time), it will happen in next step, otherwise in time = timeslice.

◆ SetVelocity() [1/2]

proto external void SetVelocity ( vector velocity)
private

Sets linear velocity of the physics body.

◆ SetVelocity() [2/2]

proto external void SetVelocity ( vector velocity)
private

Sets linear velocity of the physics body.

◆ UpdateGeometries() [1/2]

proto external bool UpdateGeometries ( int interactionLayerAnd = 0xffffffff,
int interactionLayerOr = 0 )
private

Returns world space transformation of a geometry element.

◆ UpdateGeometries() [2/2]

proto external bool UpdateGeometries ( int interactionLayerAnd = 0xffffffff,
int interactionLayerOr = 0 )
private

Returns world space transformation of a geometry element.

Field Documentation

◆ KMH2MS

const float KMH2MS = 1 / 3.6
staticprivate

Definition at line 18 of file physics.c.

◆ MS2KMH

const float MS2KMH = 3.6
staticprivate

Definition at line 19 of file physics.c.

◆ STANDARD_GRAVITY

const float STANDARD_GRAVITY = 9.81
staticprivate

Definition at line 20 of file physics.c.

◆ VGravity

const vector VGravity = "0 -9.81 0"
staticprivate

Definition at line 21 of file physics.c.


The documentation for this class was generated from the following file:
  • F:/Games/Dayz/scripts/1_core/physics/physics.c