Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
dayzphysics.c
Go to the documentation of this file.
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, IEntity other, 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}
TODO doc.
Definition enscript.c:118
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
PhxInteractionLayers
Definition dayzphysics.c:2
@ ITEM_LARGE
Definition dayzphysics.c:38
@ AI_COMPLEX
Definition dayzphysics.c:31
@ TRIGGER_NOTERRAIN
Definition dayzphysics.c:35
@ DYNAMICITEM_NOCHAR
Definition dayzphysics.c:10
@ TRIGGER
Definition dayzphysics.c:34
@ BUILDING
Definition dayzphysics.c:6
@ ITEM_SMALL
Definition dayzphysics.c:37
@ DYNAMICITEM
Definition dayzphysics.c:9
@ CHARACTER_NO_GRAVITY
Definition dayzphysics.c:13
@ WATERLAYER
Definition dayzphysics.c:22
@ TERRAIN
Definition dayzphysics.c:23
@ TEMP
Definition dayzphysics.c:42
@ GHOST
Definition dayzphysics.c:25
@ AI_NO_COLLISION
Definition dayzphysics.c:30
@ RAGDOLL
Definition dayzphysics.c:20
@ CHARACTER
Definition dayzphysics.c:7
@ DEFAULT
Definition dayzphysics.c:5
@ FIREGEOM
Redefinition of 'RAGDOLL_NO_CHARACTER'.
Definition dayzphysics.c:17
@ AI
Definition dayzphysics.c:29
@ RAGDOLL_NO_CHARACTER
Definition dayzphysics.c:14
@ ROADWAY
Definition dayzphysics.c:11
@ TINYCAPSULE
Definition dayzphysics.c:33
@ WORLDBOUNDS
Definition dayzphysics.c:26
@ VEHICLE_NOTERRAIN
Definition dayzphysics.c:12
@ FENCE
Definition dayzphysics.c:27
@ VEHICLE
Definition dayzphysics.c:8
@ CAMERA
Definition dayzphysics.c:40
@ DOOR
Definition dayzphysics.c:19
@ NOCOLLISION
Definition dayzphysics.c:3
CollisionFlags
Definition endebug.c:141
int[] dGeom
Definition enphysics.c:6