Dayz Explorer 1.29.162510
Loading...
Searching...
No Matches
physics.c
Go to the documentation of this file.
1
5
15typedef int[] Physics;
17{
18 static const float KMH2MS = 1 / 3.6; //<! Constant for converting km/h to m/s
19 static const float MS2KMH = 3.6; //<! Constant for converting m/s to km/h
20 static const float STANDARD_GRAVITY = 9.81;
21 static const vector VGravity = "0 -9.81 0";
22
24 proto external void Destroy();
29 proto external void SetInteractionLayer(int mask);
31 proto external void GetWorldTransform(out vector mat[4]);
33 proto external void GetDirectWorldTransform(out vector mat[4]);
35 proto external void SetGeomInteractionLayer(int index, int mask);
37 proto external int GetInteractionLayer();
39 proto external bool HasInteractionEnabled(int mask);
41 proto external int GetGeomInteractionLayer(int index);
49 proto external void EnableCCD(float maxMotion, float sphereCastRadius);
51 proto external void ChangeSimulationState(SimulationState simState);
53 proto external SimulationState GetSimulationState();
55 proto external vector GetCenterOfMass();
57 proto external void SetActive(ActiveState act);
59 proto external bool IsActive();
61 proto external bool IsDynamic();
63 proto external bool IsKinematic();
65 proto external bool EnableGravity(bool enable);
67 proto external void SetDamping(float linearDamping, float angularDamping);
69 proto external float GetMass();
71 proto external void SetMass(float mass);
76 proto external void SetInertiaTensorV(vector v);
78 proto external vector GetAngularVelocity();
80 proto external vector GetVelocityAt(vector pos);
82 proto external void SetSleepingTreshold(float linearTreshold, float angularTreshold);
84 proto external void SetLinearFactor(vector linearFactor);
86 proto external vector GetVelocity();
88 proto external void SetVelocity(vector velocity);
90 proto external void SetAngularVelocity(vector velocity);
94 proto external void SetTargetMatrix(vector matrix[4], float timeslice);
96 proto external void ApplyImpulse(vector impulse);
98 proto external void ApplyImpulseAt(vector pos, vector impulse);
100 proto external void ApplyForce(vector force);
102 proto external void ApplyForceAt(vector pos, vector force);
104 proto external void ApplyTorque(vector torque);
106 proto external void ClearForces();
108 proto external vector GetTotalForce();
110 proto external vector GetTotalTorque();
115 proto external void SetResponseIndex(int responseIndex);
117 proto external int GetResponseIndex();
134 proto external int AddGeom(string name, PhysicsGeom geom, vector frame[4], string material, int interactionLayer);
136 proto external int GetGeom(string name);
138 proto external int GetNumGeoms();
140 proto external bool UpdateGeometries(int interactionLayerAnd = 0xffffffff, int interactionLayerOr = 0);
142 proto external string GetGeomName(int index);
144 proto external void GetGeomWorldTransform(int index, out vector mat[4]);
146 proto external void GetGeomTransform(int index, out vector mat[4]);
148 proto external void GetGeomDirectTransform(int index, out vector mat[4]);
150 proto external vector GetGeomWorldPosition(int index);
152 proto external vector GetGeomPosition(int index);
154 proto external vector GetGeomDirectPosition(int index);
156 proto external void GetGeomWorldBounds(int index, out vector min, out vector max);
158 proto external void GetGeomDirectBounds(int index, out vector min, out vector max);
160 proto external void GetGeomSurfaces(int index, notnull out array<SurfaceProperties> surfaces);
162 proto external int GetNumBones();
164 proto external Physics GetBone(int index);
170 static proto Physics CreateStatic(notnull IEntity ent, int layerMask = 0xffffffff);
182 static proto Physics CreateStaticEx(notnull IEntity ent, PhysicsGeomDef geoms[]);
189 static proto Physics CreateDynamic(notnull IEntity ent, float mass, int layerMask = 0xffffffff);
204 static proto Physics CreateDynamicEx(notnull IEntity ent, vector centerOfMass, float mass, PhysicsGeomDef geoms[]);
210 static proto Physics CreateGhostEx(notnull IEntity ent, PhysicsGeomDef geoms[]);
211}
212
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native void Destroy()
Cleans up the Effect, including unregistering if needed.
Definition effect.c:216
SimulationState
ActiveState
Definition activestate.c:10
bool IsActive()
void SetActive()
Definition trapbase.c:404