Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
enphysics.c File Reference

Go to the source code of this file.

Data Structures

class  PhysicsGeomDef
 
class  Contact
 

Typedefs

typedef int[] dGeom
 
typedef int[] dJoint
 
typedef int[] dBlock
 
typedef int[] dMaterial
 

Enumerations

enum  ActiveState { ACTIVE, INACTIVE, ALWAYS_ACTIVE }
 state of a rigidbody More...
 

Functions

proto native int dGetNumDynamicBodies (notnull IEntity worldEnt)
 
proto native IEntity dGetDynamicBody (notnull IEntity worldEnt, int index)
 
proto native void dSetInteractionLayer (notnull IEntity worldEntity, int mask1, int mask2, bool enable)
 
proto native bool dGetInteractionLayer (notnull IEntity worldEntity, int mask1, int mask2)
 
proto native vector dGetGravity (notnull IEntity worldEntity)
 Gets global gravity. More...
 
proto native void dSetGravity (notnull IEntity worldEntity, vector g)
 Changes global gravity. More...
 
proto native void dSetTimeSlice (notnull IEntity worldEntity, float timeSlice)
 Changes fixed time-slice. Default is 1/40, thus simulation runs on 40fps. With smaller values, there is more precise simulation. More...
 
proto bool dBodyCreateStaticEx (notnull IEntity ent, PhysicsGeomDef geoms[])
 
proto bool dBodyCreateGhostEx (notnull IEntity ent, PhysicsGeomDef geoms[])
 
proto bool dBodyCreateDynamicEx (notnull IEntity ent, vector centerOfMass, float mass, PhysicsGeomDef geoms[])
 
proto native void dBodyDestroy (notnull IEntity ent)
 Destroys attached physics body. More...
 
proto native bool dBodyIsSet (notnull IEntity ent)
 Has the entity attached physics body? More...
 
proto native void dBodySetInteractionLayer (notnull IEntity ent, int mask)
 
proto native int dBodyGetInteractionLayer (notnull IEntity ent)
 
proto native void dBodySetGeomInteractionLayer (notnull IEntity ent, int index, int mask)
 
proto native int dBodyGetGeomInteractionLayer (notnull IEntity ent, int index)
 
proto native void dBodyActive (notnull IEntity ent, ActiveState activeState)
 
proto native void dBodyDynamic (notnull IEntity ent, bool dynamic)
 
proto native bool dBodyIsDynamic (notnull IEntity ent)
 
proto native bool dBodyIsActive (notnull IEntity ent)
 
proto native bool dBodyEnableGravity (notnull IEntity ent, bool enable)
 
proto native void dBodySetDamping (notnull IEntity ent, float linearDamping, float angularDamping)
 
proto native void dBodySetSleepingTreshold (notnull IEntity body, float linearTreshold, float angularTreshold)
 
proto native bool dBodyIsSolid (notnull IEntity ent)
 
proto native void dBodySetSolid (notnull IEntity ent, bool solid)
 
proto native void dBodyEnableCCD (notnull IEntity body, float maxMotion, float sphereCastRadius)
 
proto native void dBodySetLinearFactor (notnull IEntity body, vector linearFactor)
 
proto native vector dBodyGetCenterOfMass (notnull IEntity body)
 returns center of mass offset More...
 
proto native vector GetVelocity (notnull IEntity ent)
 Returns linear velocity. More...
 
proto native void SetVelocity (notnull IEntity ent, vector vel)
 Sets linear velocity (for Rigid bodies) More...
 
proto native dBlock dBodyCollisionBlock (notnull IEntity ent1, notnull IEntity ent2)
 Disables collisions between two entities. More...
 
proto native void dBodyRemoveBlock (notnull IEntity worldEntity, dBlock block)
 
proto native void dBodySetInertiaTensorV (notnull IEntity body, vector v)
 
proto native void dBodySetInertiaTensorM (notnull IEntity body, vector m[3])
 
proto native float dBodyGetMass (notnull IEntity ent)
 
proto native void dBodySetMass (notnull IEntity body, float mass)
 
proto native void dBodyApplyTorqueImpulse (notnull IEntity ent, vector torqueImpulse)
 
proto native vector dBodyGetInvInertiaDiagLocal (notnull IEntity ent)
 
proto native float dBodyComputeImpulseDenominator (notnull IEntity ent, vector position, vector normal)
 
proto native float dBodyComputeAngularImpulseDenominator (notnull IEntity ent, vector axis)
 
proto native vector dBodyGetLocalInertia (notnull IEntity ent)
 
proto void dBodyGetInvInertiaTensorWorld (notnull IEntity body, out vector inertiaTensorWS[3])
 
proto void dBodyApplyImpulseAt (notnull IEntity body, vector impulse, vector pos)
 Applies impuls on a pos position in world coordinates. More...
 
proto void dBodyApplyImpulse (notnull IEntity body, vector impulse)
 Applies impuls on a rigidbody (origin) More...
 
proto void dBodyApplyForce (notnull IEntity body, vector force)
 Applies constant force on a rigidbody (origin) More...
 
proto void dBodyApplyForceAt (notnull IEntity body, vector pos, vector force)
 Applies constant force on a position. More...
 
proto native void dBodyApplyTorque (notnull IEntity body, vector torque)
 
proto vector dBodyGetAngularVelocity (notnull IEntity body)
 Gets angular velocity for a rigidbody. More...
 
proto void dBodySetAngularVelocity (notnull IEntity body, vector angvel)
 Changed an angular velocity. More...
 
proto native void dBodySetTargetMatrix (notnull IEntity body, vector matrix[4], float timeslice)
 Sets target transformation. If timeslice == dt (simulation step delta time), it will happen in next step, otherwise in time = timeslice. More...
 
proto native float dBodyGetKineticEnergy (notnull IEntity body)
 
proto native vector dBodyGetVelocityAt (notnull IEntity body, vector globalpos)
 
proto native dGeom dGeomCreateBox (vector size)
 Creates box geometry. More...
 
proto native dGeom dGeomCreateSphere (float radius)
 Creates sphere geometry. More...
 
proto native dGeom dGeomCreateCapsule (float radius, vector extent)
 Creates capsule geometry. More...
 
proto native dGeom dGeomCreateCylinder (float radius, vector extent)
 Creates cylinder geometry. More...
 
proto native void dGeomDestroy (dGeom geom)
 Destroys geometry. More...
 
proto native int dBodyGetGeom (notnull IEntity ent, string name)
 
proto native int dBodyGetNumGeoms (notnull IEntity ent)
 
proto native dJoint dJointCreateHinge (notnull IEntity ent1, notnull IEntity ent2, vector point1, vector axis1, vector point2, vector axis2, bool block, float breakThreshold)
 
proto native dJoint dJointCreateHinge2 (notnull IEntity ent1, notnull IEntity ent2, vector matrix1[4], vector matrix2[4], bool block, float breakThreshold)
 
proto native dJoint dJointCreateSlider (notnull IEntity ent1, notnull IEntity ent2, vector matrix1[4], vector matrix2[4], bool block, float breakThreshold)
 
proto native dJoint dJointCreateBallSocket (notnull IEntity ent1, notnull IEntity ent2, vector point1, vector point2, bool block, float breakThreshold)
 
proto native dJoint dJointCreateFixed (notnull IEntity ent1, notnull IEntity ent2, vector point1, vector point2, bool block, float breakThreshold)
 
proto native dJoint dJointCreateConeTwist (notnull IEntity ent1, notnull IEntity ent2, vector matrix1[4], vector matrix2[4], bool block, float breakThreshold)
 
proto native dJoint dJointCreate6DOF (notnull IEntity ent1, notnull IEntity ent2, vector matrix1[4], vector matrix2[4], bool block, float breakThreshold)
 
proto native dJoint dJointCreate6DOFSpring (notnull IEntity ent1, notnull IEntity ent2, vector matrix1[4], vector matrix2[4], bool block, float breakThreshold)
 
proto native void dJointDestroy (dJoint joint)
 
proto native void dJointHingeSetLimits (dJoint joint, float low, float high, float softness, float biasFactor, float relaxationFactor)
 
proto native void dJointHingeSetAxis (dJoint joint, vector axis)
 
proto native void dJointHingeSetMotorTargetAngle (dJoint joint, float angle, float dt, float maxImpulse)
 
proto native void dJointConeTwistSetAngularOnly (dJoint joint, bool angularOnly)
 
proto native void dJointConeTwistSetLimit (dJoint joint, int limitIndex, float limitValue)
 
proto native void dJointConeTwistSetLimits (dJoint joint, float _swingSpan1, float _swingSpan2, float _twistSpan, float _softness, float _biasFactor, float _relaxationFactor)
 
proto native void dJoint6DOFSetLinearLimits (dJoint joint, vector linearLower, vector linearUpper)
 
proto native void dJoint6DOFSetAngularLimits (dJoint joint, vector angularLower, vector angularUpper)
 
proto native void dJoint6DOFSetLimit (dJoint joint, int axis, float lo, float hi)
 
proto native void dJoint6DOFSpringSetSpring (dJoint joint, int axis, float stiffness, float damping)
 
proto native void dJointSliderSetLinearLimits (dJoint joint, float lowerLimit, float upperLimit)
 
proto native void dJointSliderSetAngularLimits (dJoint joint, float lowerLimit, float upperLimit)
 
proto native void dJointSliderSetDirLinear (dJoint joint, float softness, float restitution, float damping)
 
proto native void dJointSliderSetDirAngular (dJoint joint, float softness, float restitution, float damping)
 
proto native void dJointSliderSetLimLinear (dJoint joint, float softness, float restitution, float damping)
 
proto native void dJointSliderSetLimAngular (dJoint joint, float softness, float restitution, float damping)
 
proto native void dJointSliderSetOrthoLinear (dJoint joint, float softness, float restitution, float damping)
 
proto native void dJointSliderSetOrthoAngular (dJoint joint, float softness, float restitution, float damping)
 
proto native void dJointSliderSetLinearMotor (dJoint joint, float velocity, float force)
 
proto native void dJointSliderSetAngularMotor (dJoint joint, float velocity, float force)
 
proto native float dJointSliderGetLinearPos (dJoint joint)
 
proto native float dJointSliderGetAngularPos (dJoint joint)