Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
dayzphysics.c
Go to the documentation of this file.
2 {
4 
15 
18 
21 
24 
28 
29  AI,
32 
36 
39 
41 
43 };
44 
45 
50 {
51  vector begPos;
52  vector endPos;
53 
54  Object ignore;
55  Object with;
56 
57  float radius;
58 
63  CollisionFlags flags;
64 
73  int type;
74 
75  bool sorted;
76  bool groundOnly;
77 
78  void RaycastRVParams( vector vBeg, vector vEnd, Object pIgnore = null, float fRadius = 0.0 )
79  {
80  begPos = vBeg;
81  endPos = vEnd;
82  ignore = pIgnore;
83  radius = fRadius;
84 
85  // default values
86  with = null;
87  flags = CollisionFlags.NEARESTCONTACT;
88  type = ObjIntersectView;
89  sorted = false;
90  groundOnly = false;
91  }
92 };
93 
94 
99 {
100  Object obj;
101  Object parent;
102 
103  vector pos;
104  vector dir;
105 
106  int hierLevel;
107  int component;
108 
109  SurfaceInfo surface;
110 
111  bool entry;
112  bool exit;
113 };
114 
116 {
117  bool OnContact(IEntity other, Contact contact)
118  {
119  return true;
120  }
121 };
122 
124 {
125  private void DayZPhysics() {}
126  private void ~DayZPhysics() {}
127 
199  proto static bool RaycastRV(vector begPos, vector endPos, out vector contactPos, out vector contactDir, out int contactComponent, /*out*/ set<Object> results = NULL, Object with = NULL, Object ignore = NULL, bool sorted = false, bool ground_only = false, int iType = ObjIntersectView, float radius = 0.0, CollisionFlags flags = CollisionFlags.NEARESTCONTACT);
200 
201  //I am so sorry about this, I am unable to change RaycastRV above without breaking rest of DZ
202  //proto static bool RaycastRVExt(vector begPos, vector endPos, out vector contactPos, out vector contactDir, out int contactComponent, /*out*/ array<string> resultSurfaces = NULL, /*out*/ array<Object> resultObjects = NULL, Object with = NULL, Object ignore = NULL, bool sorted = false, bool ground_only = false, int iType = ObjIntersectView, float radius = 0.0, CollisionFlags flags = CollisionFlags.NEARESTCONTACT);
203 
204  proto static bool GetHitSurface(Object other, vector begPos, vector endPos, string surface);
205 
206  proto static bool GetHitSurfaceAndLiquid(Object other, vector begPos, vector endPos, string surface, out int liquidType);
207 
208  proto static bool RaycastRVProxy( notnull RaycastRVParams in, out notnull array< ref RaycastRVResult> results, array< Object > excluded = null );
209 
210 
211  proto static bool RayCastBullet(vector begPos, vector endPos, PhxInteractionLayers layerMask, Object ignoreObj, out Object hitObject, out vector hitPosition, out vector hitNormal, out float hitFraction);
212 
213  proto static bool SphereCastBullet(vector begPos, vector endPos, float radius, PhxInteractionLayers layerMask, Object ignoreObj, out Object hitObject, out vector hitPosition, out vector hitNormal, out float hitFraction);
214 
215 
216  proto static bool GeometryOverlapBullet(vector transform[4], dGeom geometry, PhxInteractionLayers layerMask, notnull CollisionOverlapCallback callback);
217 
218  proto static bool EntityOverlapBullet(vector transform[4], IEntity entity, PhxInteractionLayers layerMask, notnull CollisionOverlapCallback callback);
219 
220  proto static bool EntityOverlapSingleBullet(vector transform[4], IEntity entity, PhxInteractionLayers layerMask, notnull CollisionOverlapCallback callback);
221 
222  proto static bool SphereOverlapBullet(vector position, float radius, PhxInteractionLayers layerMask, notnull CollisionOverlapCallback callback);
223 
224  proto static bool CylinderOverlapBullet(vector transform[4], vector extents, PhxInteractionLayers layerMask, notnull CollisionOverlapCallback callback);
225 
226  proto static bool CapsuleOverlapBullet(vector transform[4], float radius, float height, PhxInteractionLayers layerMask, notnull CollisionOverlapCallback callback);
227 
228  proto static bool BoxOverlapBullet(vector transform[4], vector extents, PhxInteractionLayers layerMask, notnull CollisionOverlapCallback callback);
229 
230 }
TEMP
@ TEMP
Definition: dayzphysics.c:42
GHOST
@ GHOST
Definition: dayzphysics.c:25
DOOR
@ DOOR
Definition: dayzphysics.c:19
CollisionOverlapCallback
Definition: dayzphysics.c:115
AI_NO_COLLISION
@ AI_NO_COLLISION
Definition: dayzphysics.c:30
DYNAMICITEM_NOCHAR
@ DYNAMICITEM_NOCHAR
Definition: dayzphysics.c:10
CAMERA
@ CAMERA
Definition: dayzphysics.c:40
VEHICLE
@ VEHICLE
Definition: dayzphysics.c:8
RAGDOLL
@ RAGDOLL
Definition: dayzphysics.c:20
FIREGEOM
@ FIREGEOM
Redefinition of 'RAGDOLL_NO_CHARACTER'.
Definition: dayzphysics.c:17
SurfaceInfo
Definition: surfaceinfo.c:7
WORLDBOUNDS
@ WORLDBOUNDS
Definition: dayzphysics.c:26
FENCE
@ FENCE
Definition: dayzphysics.c:27
TRIGGER
@ TRIGGER
Definition: dayzphysics.c:34
Managed
TODO doc.
Definition: enscript.c:117
NOCOLLISION
@ NOCOLLISION
Definition: dayzphysics.c:3
dGeom
int[] dGeom
Definition: enphysics.c:6
RaycastRVResult
Definition: dayzphysics.c:98
TERRAIN
@ TERRAIN
Definition: dayzphysics.c:23
TRIGGER_NOTERRAIN
@ TRIGGER_NOTERRAIN
Definition: dayzphysics.c:35
IEntity
Definition: enentity.c:164
CollisionFlags
CollisionFlags
Definition: endebug.c:140
BUILDING
@ BUILDING
Definition: dayzphysics.c:6
RaycastRVParams
Definition: dayzphysics.c:49
DYNAMICITEM
@ DYNAMICITEM
Definition: dayzphysics.c:9
vector
Definition: enconvert.c:105
ITEM_SMALL
@ ITEM_SMALL
Definition: dayzphysics.c:37
RAGDOLL_NO_CHARACTER
@ RAGDOLL_NO_CHARACTER
Definition: dayzphysics.c:14
Object
Definition: objecttyped.c:1
Contact
Definition: enphysics.c:300
ROADWAY
@ ROADWAY
Definition: dayzphysics.c:11
AI_COMPLEX
@ AI_COMPLEX
Definition: dayzphysics.c:31
ITEM_LARGE
@ ITEM_LARGE
Definition: dayzphysics.c:38
array< ref RaycastRVResult >
WATERLAYER
@ WATERLAYER
Definition: dayzphysics.c:22
DEFAULT
@ DEFAULT
Definition: dayzphysics.c:5
DayZPhysics
Definition: dayzphysics.c:123
CHARACTER
@ CHARACTER
Definition: dayzphysics.c:7
TINYCAPSULE
@ TINYCAPSULE
Definition: dayzphysics.c:33
AI
@ AI
Definition: dayzphysics.c:29
CHARACTER_NO_GRAVITY
@ CHARACTER_NO_GRAVITY
Definition: dayzphysics.c:13
PhxInteractionLayers
PhxInteractionLayers
Definition: dayzphysics.c:1
VEHICLE_NOTERRAIN
@ VEHICLE_NOTERRAIN
Definition: dayzphysics.c:12