DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
EnPhysics.c
См. документацию.
1
5
6typedef int[] dJoint;
7typedef int[] dBlock;
8
9proto native int dGetNumDynamicBodies(notnull IEntity worldEnt);
10proto native IEntity dGetDynamicBody(notnull IEntity worldEnt, int index);
11proto native void dSetInteractionLayer(notnull IEntity worldEntity, int mask1, int mask2, bool enable);
12proto native bool dGetInteractionLayer(notnull IEntity worldEntity, int mask1, int mask2);
13
15proto native vector dGetGravity(notnull IEntity worldEntity);
17proto native void dSetGravity(notnull IEntity worldEntity, vector g);
19proto native void dSetTimeSlice(notnull IEntity worldEntity, float timeSlice);
20
25
26//proto native int dMaterialClone(string target, string source, int material_index)
27//proto native int dMaterialGetType(string source)
28//proto native int dMaterialSetType(string source, int material_index)
29
38proto bool dBodyCreateStaticEx(notnull IEntity ent, PhysicsGeomDef geoms[]);
39proto bool dBodyCreateGhostEx(notnull IEntity ent, PhysicsGeomDef geoms[]);
40
51proto bool dBodyCreateDynamicEx(notnull IEntity ent, vector centerOfMass, float mass, PhysicsGeomDef geoms[]);
52
54proto native void dBodyDestroy(notnull IEntity ent);
55
57proto native bool dBodyIsSet(notnull IEntity ent);
58
59proto native void dBodySetInteractionLayer(notnull IEntity ent, int mask);
60proto native int dBodyGetInteractionLayer(notnull IEntity ent);
61proto native void dBodySetGeomInteractionLayer(notnull IEntity ent, int index, int mask);
62proto native int dBodyGetGeomInteractionLayer(notnull IEntity ent, int index);
63
64proto native void dBodyActive(notnull IEntity ent, ActiveState activeState);
65proto native void dBodyDynamic(notnull IEntity ent, bool dynamic);
66proto native bool dBodyIsDynamic(notnull IEntity ent);
67
68proto native bool dBodyIsActive(notnull IEntity ent);
69proto native bool dBodyEnableGravity(notnull IEntity ent, bool enable);
70proto native void dBodySetDamping(notnull IEntity ent, float linearDamping, float angularDamping);
71proto native void dBodySetSleepingTreshold(notnull IEntity body, float linearTreshold, float angularTreshold);
72
73proto native bool dBodyIsSolid(notnull IEntity ent);
74proto native void dBodySetSolid(notnull IEntity ent, bool solid);
75
83proto native void dBodyEnableCCD(notnull IEntity body, float maxMotion, float sphereCastRadius);
87proto native void dBodySetLinearFactor(notnull IEntity body, vector linearFactor);
88
90proto native vector dBodyGetCenterOfMass(notnull IEntity body);
91
104proto native vector GetVelocity(notnull IEntity ent);
105
111proto native void SetVelocity(notnull IEntity ent, vector vel);
112
116proto native dBlock dBodyCollisionBlock(notnull IEntity ent1, notnull IEntity ent2);
117proto native void dBodyRemoveBlock(notnull IEntity worldEntity, dBlock block);
118
119proto native void dBodySetInertiaTensorV(notnull IEntity body, vector v);
120proto native void dBodySetInertiaTensorM(notnull IEntity body, vector m[3]);
121
122proto native float dBodyGetMass(notnull IEntity ent);
123proto native void dBodySetMass(notnull IEntity body, float mass);
124
125proto native void dBodyApplyTorqueImpulse(notnull IEntity ent, vector torqueImpulse);
127proto native float dBodyComputeImpulseDenominator(notnull IEntity ent, vector position, vector normal);
128proto native float dBodyComputeAngularImpulseDenominator(notnull IEntity ent, vector axis);
129proto native vector dBodyGetLocalInertia(notnull IEntity ent);
130
131proto void dBodyGetInvInertiaTensorWorld(notnull IEntity body, out vector inertiaTensorWS[3]);
132
136proto void dBodyApplyImpulseAt(notnull IEntity body, vector impulse, vector pos);
137
141proto void dBodyApplyImpulse(notnull IEntity body, vector impulse);
142
146proto void dBodyApplyForce(notnull IEntity body, vector force);
147
151proto void dBodyApplyForceAt(notnull IEntity body, vector pos, vector force);
152
153proto native void dBodyApplyTorque(notnull IEntity body, vector torque);
154
159
165proto void dBodySetAngularVelocity(notnull IEntity body, vector angvel);
166
170proto native void dBodySetTargetMatrix(notnull IEntity body, vector matrix[4], float timeslice);
171
172proto native void dBodyGetWorldTransform(notnull IEntity body, out vector matrix[4]);
173proto native void dBodyGetDirectWorldTransform(notnull IEntity body, out vector matrix[4]);
174
175proto native float dBodyGetKineticEnergy(notnull IEntity body);
176
177proto native vector dBodyGetVelocityAt(notnull IEntity body, vector globalpos);
179
184
186proto native dGeom dGeomCreateBox(vector size);
187
189proto native dGeom dGeomCreateSphere(float radius);
190
192proto native dGeom dGeomCreateCapsule(float radius, vector extent);
193
195proto native dGeom dGeomCreateCylinder(float radius, vector extent);
196
198proto native void dGeomDestroy(dGeom geom);
199
200//proto native int dBodyAddGeom(notnull IEntity body, dGeom geom, vector frame[4], string material, int interactionLayer);
201// find a geometry by its name and returns its index or -1 if the geometry wasn't found
202proto native int dBodyGetGeom(notnull IEntity ent, string name);
203// returns number of geometries of the entity
204proto native int dBodyGetNumGeoms(notnull IEntity ent);
206
211
212proto native dJoint dJointCreateHinge(notnull IEntity ent1, notnull IEntity ent2, vector point1, vector axis1, vector point2, vector axis2, bool block, float breakThreshold);
213proto native dJoint dJointCreateHinge2(notnull IEntity ent1, notnull IEntity ent2, vector matrix1[4], vector matrix2[4], bool block, float breakThreshold);
214proto native dJoint dJointCreateSlider(notnull IEntity ent1, notnull IEntity ent2, vector matrix1[4], vector matrix2[4], bool block, float breakThreshold);
215proto native dJoint dJointCreateBallSocket(notnull IEntity ent1, notnull IEntity ent2, vector point1, vector point2, bool block, float breakThreshold);
216proto native dJoint dJointCreateFixed(notnull IEntity ent1, notnull IEntity ent2, vector point1, vector point2, bool block, float breakThreshold);
217proto native dJoint dJointCreateConeTwist(notnull IEntity ent1, notnull IEntity ent2, vector matrix1[4], vector matrix2[4], bool block, float breakThreshold);
218proto native dJoint dJointCreate6DOF(notnull IEntity ent1, notnull IEntity ent2, vector matrix1[4], vector matrix2[4], bool block, float breakThreshold);
219proto native dJoint dJointCreate6DOFSpring(notnull IEntity ent1, notnull IEntity ent2, vector matrix1[4], vector matrix2[4], bool block, float breakThreshold);
220proto native void dJointDestroy(dJoint joint);
221
222//only hinge joint
223proto native void dJointHingeSetLimits(dJoint joint, float low, float high, float softness, float biasFactor, float relaxationFactor);
224proto native void dJointHingeSetAxis(dJoint joint, vector axis);
225proto native void dJointHingeSetMotorTargetAngle(dJoint joint, float angle, float dt, float maxImpulse);
226
227//only cone-twist joint
228proto native void dJointConeTwistSetAngularOnly(dJoint joint, bool angularOnly);
229// setLimit(), a few notes:
230// _softness:
231// 0->1, recommend ~0.8->1.
232// describes % of limits where movement is free.
233// beyond this softness %, the limit is gradually enforced until the "hard" (1.0) limit is reached.
234// _biasFactor:
235// 0->1?, recommend 0.3 +/-0.3 or so.
236// strength with which constraint resists zeroth order (angular, not angular velocity) limit violation.
237// __relaxationFactor:
238// 0->1, recommend to stay near 1.
239// the lower the value, the less the constraint will fight velocities which violate the angular limits.
240proto native void dJointConeTwistSetLimit(dJoint joint, int limitIndex, float limitValue);
241proto native void dJointConeTwistSetLimits(dJoint joint, float _swingSpan1, float _swingSpan2, float _twistSpan, float _softness, float _biasFactor, float _relaxationFactor);
242
243//only 6DOF & 6DOFSpring.
250proto native void dJoint6DOFSetLinearLimits(dJoint joint, vector linearLower, vector linearUpper);
251proto native void dJoint6DOFSetAngularLimits(dJoint joint, vector angularLower, vector angularUpper);
252proto native void dJoint6DOFSetLimit(dJoint joint, int axis, float lo, float hi);
253
254//when stiffness == -1 && damping == -1, spring is disabled
255proto native void dJoint6DOFSpringSetSpring(dJoint joint, int axis, float stiffness, float damping);
256
257//only slider joint
258proto native void dJointSliderSetLinearLimits(dJoint joint, float lowerLimit, float upperLimit);
259proto native void dJointSliderSetAngularLimits(dJoint joint, float lowerLimit, float upperLimit);
260proto native void dJointSliderSetDirLinear(dJoint joint, float softness, float restitution, float damping);
261proto native void dJointSliderSetDirAngular(dJoint joint, float softness, float restitution, float damping);
262proto native void dJointSliderSetLimLinear(dJoint joint, float softness, float restitution, float damping);
263proto native void dJointSliderSetLimAngular(dJoint joint, float softness, float restitution, float damping);
264proto native void dJointSliderSetOrthoLinear(dJoint joint, float softness, float restitution, float damping);
265proto native void dJointSliderSetOrthoAngular(dJoint joint, float softness, float restitution, float damping);
266//if force == 0, motor is off
267proto native void dJointSliderSetLinearMotor(dJoint joint, float velocity, float force);
268proto native void dJointSliderSetAngularMotor(dJoint joint, float velocity, float force);
269proto native float dJointSliderGetLinearPos(dJoint joint);
270proto native float dJointSliderGetAngularPos(dJoint joint);
272
273//-----------------------------------------------------------------
274typedef int[] dMaterial;
275
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
Определения EnEntity.c:165
Определения PhysicsGeomDef.c:10
Определения EnConvert.c:119
proto native void dJointSliderSetDirAngular(dJoint joint, float softness, float restitution, float damping)
proto native void dJointSliderSetAngularLimits(dJoint joint, float lowerLimit, float upperLimit)
proto native void dJointSliderSetLinearMotor(dJoint joint, float velocity, float force)
int[] dMaterial
Определения EnPhysics.c:274
proto native void dJointSliderSetLimLinear(dJoint joint, float softness, float restitution, float damping)
proto native dJoint dJointCreateBallSocket(notnull IEntity ent1, notnull IEntity ent2, vector point1, vector point2, 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 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 dJointHingeSetMotorTargetAngle(dJoint joint, float angle, float dt, float maxImpulse)
proto native void dJoint6DOFSetAngularLimits(dJoint joint, vector angularLower, vector angularUpper)
proto native void dJointSliderSetOrthoLinear(dJoint joint, float softness, float restitution, float damping)
proto native float dJointSliderGetAngularPos(dJoint joint)
proto native void dJointConeTwistSetAngularOnly(dJoint joint, bool angularOnly)
proto native void dJointSliderSetDirLinear(dJoint joint, float softness, float restitution, float damping)
proto native float dJointSliderGetLinearPos(dJoint joint)
proto native void dJointSliderSetLimAngular(dJoint joint, float softness, float restitution, float damping)
proto native dJoint dJointCreateConeTwist(notnull IEntity ent1, notnull IEntity ent2, vector matrix1[4], vector matrix2[4], bool block, float breakThreshold)
proto native dJoint dJointCreateFixed(notnull IEntity ent1, notnull IEntity ent2, vector point1, vector point2, bool block, float breakThreshold)
proto native void dJointHingeSetLimits(dJoint joint, float low, float high, float softness, float biasFactor, float relaxationFactor)
proto native void dJointConeTwistSetLimit(dJoint joint, int limitIndex, float limitValue)
proto native void dJointDestroy(dJoint joint)
proto native void dJointSliderSetOrthoAngular(dJoint joint, float softness, float restitution, float damping)
proto native void dJoint6DOFSetLinearLimits(dJoint joint, vector linearLower, vector linearUpper)
proto native void dJointHingeSetAxis(dJoint joint, vector axis)
proto native void dJoint6DOFSetLimit(dJoint joint, int axis, float lo, float hi)
proto native void dJointConeTwistSetLimits(dJoint joint, float _swingSpan1, float _swingSpan2, float _twistSpan, float _softness, float _biasFactor, float _relaxationFactor)
proto native void dJoint6DOFSpringSetSpring(dJoint joint, int axis, float stiffness, float damping)
proto native dJoint dJointCreateHinge(notnull IEntity ent1, notnull IEntity ent2, vector point1, vector axis1, vector point2, vector axis2, bool block, float breakThreshold)
proto native void dJointSliderSetLinearLimits(dJoint joint, float lowerLimit, float upperLimit)
proto native void dJointSliderSetAngularMotor(dJoint joint, float velocity, float force)
proto native dJoint dJointCreateHinge2(notnull IEntity ent1, notnull IEntity ent2, vector matrix1[4], vector matrix2[4], bool block, float breakThreshold)
proto native dGeom dGeomCreateCylinder(float radius, vector extent)
Creates cylinder geometry.
proto native dGeom dGeomCreateSphere(float radius)
Creates sphere geometry.
proto native dGeom dGeomCreateCapsule(float radius, vector extent)
Creates capsule geometry.
proto native int dBodyGetNumGeoms(notnull IEntity ent)
proto native int dBodyGetGeom(notnull IEntity ent, string name)
proto native void dGeomDestroy(dGeom geom)
Destroys geometry.
proto native dGeom dGeomCreateBox(vector size)
Creates box geometry.
proto native void dSetInteractionLayer(notnull IEntity worldEntity, int mask1, int mask2, bool enable)
int[] dJoint
Определения EnPhysics.c:6
proto native IEntity dGetDynamicBody(notnull IEntity worldEnt, int index)
proto native int dGetNumDynamicBodies(notnull IEntity worldEnt)
PhysicsGeom dGeom
Определения PhysicsGeom.c:9
proto native vector dGetGravity(notnull IEntity worldEntity)
Gets global gravity.
proto native bool dGetInteractionLayer(notnull IEntity worldEntity, int mask1, int mask2)
int[] dBlock
Определения EnPhysics.c:7
ActiveState
Определения ActiveState.c:10
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,...
proto native void dSetGravity(notnull IEntity worldEntity, vector g)
Changes global gravity.
proto native bool dBodyEnableGravity(notnull IEntity ent, bool enable)
proto native vector dBodyGetVelocityAt(notnull IEntity body, vector globalpos)
proto native void dBodyEnableCCD(notnull IEntity body, float maxMotion, float sphereCastRadius)
proto native void dBodyApplyTorque(notnull IEntity body, vector torque)
proto native void dBodyApplyTorqueImpulse(notnull IEntity ent, vector torqueImpulse)
proto bool dBodyCreateGhostEx(notnull IEntity ent, PhysicsGeomDef geoms[])
proto native vector GetVelocity(notnull IEntity ent)
Returns linear velocity.
proto native void dBodySetSleepingTreshold(notnull IEntity body, float linearTreshold, float angularTreshold)
proto native int dBodyGetGeomInteractionLayer(notnull IEntity ent, int index)
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 s...
proto native void dBodyDestroy(notnull IEntity ent)
Destroys attached physics body.
proto native void dBodyActive(notnull IEntity ent, ActiveState activeState)
proto native bool dBodyIsActive(notnull IEntity ent)
proto native void dBodySetDamping(notnull IEntity ent, float linearDamping, float angularDamping)
proto void dBodyGetInvInertiaTensorWorld(notnull IEntity body, out vector inertiaTensorWS[3])
proto void dBodyApplyImpulse(notnull IEntity body, vector impulse)
Applies impuls on a rigidbody (origin)
proto native void dBodyDynamic(notnull IEntity ent, bool dynamic)
proto native void dBodySetSolid(notnull IEntity ent, bool solid)
proto native float dBodyComputeImpulseDenominator(notnull IEntity ent, vector position, vector normal)
proto bool dBodyCreateStaticEx(notnull IEntity ent, PhysicsGeomDef geoms[])
proto void dBodyApplyImpulseAt(notnull IEntity body, vector impulse, vector pos)
Applies impuls on a pos position in world coordinates.
proto native void dBodySetInteractionLayer(notnull IEntity ent, int mask)
proto bool dBodyCreateDynamicEx(notnull IEntity ent, vector centerOfMass, float mass, PhysicsGeomDef geoms[])
proto native void dBodySetInertiaTensorV(notnull IEntity body, vector v)
proto native float dBodyGetKineticEnergy(notnull IEntity body)
proto native vector dBodyGetLocalInertia(notnull IEntity ent)
proto native void dBodySetMass(notnull IEntity body, float mass)
proto native vector dBodyGetCenterOfMass(notnull IEntity body)
returns center of mass offset
proto native void SetVelocity(notnull IEntity ent, vector vel)
Sets linear velocity (for Rigid bodies)
proto native void dBodySetLinearFactor(notnull IEntity body, vector linearFactor)
proto native void dBodySetInertiaTensorM(notnull IEntity body, vector m[3])
proto native vector dBodyGetInvInertiaDiagLocal(notnull IEntity ent)
proto native float dBodyGetMass(notnull IEntity ent)
proto void dBodySetAngularVelocity(notnull IEntity body, vector angvel)
Changed an angular velocity.
proto native float dBodyComputeAngularImpulseDenominator(notnull IEntity ent, vector axis)
proto native void dBodySetGeomInteractionLayer(notnull IEntity ent, int index, int mask)
proto native bool dBodyIsDynamic(notnull IEntity ent)
proto vector dBodyGetAngularVelocity(notnull IEntity body)
Gets angular velocity for a rigidbody.
proto native void dBodyGetDirectWorldTransform(notnull IEntity body, out vector matrix[4])
proto native bool dBodyIsSet(notnull IEntity ent)
Has the entity attached physics body?
proto void dBodyApplyForce(notnull IEntity body, vector force)
Applies constant force on a rigidbody (origin)
proto native void dBodyGetWorldTransform(notnull IEntity body, out vector matrix[4])
proto native dBlock dBodyCollisionBlock(notnull IEntity ent1, notnull IEntity ent2)
Disables collisions between two entities.
proto native void dBodyRemoveBlock(notnull IEntity worldEntity, dBlock block)
proto void dBodyApplyForceAt(notnull IEntity body, vector pos, vector force)
Applies constant force on a position.
proto native bool dBodyIsSolid(notnull IEntity ent)
proto native int dBodyGetInteractionLayer(notnull IEntity ent)