DayZ 1.24
Loading...
Searching...
No Matches
EnWorld.c
Go to the documentation of this file.
6//----------------------------------------------
12typedef int[] WorldHandle;
13
14proto native float GetWorldTime();
15
20
21//proto native void SchedulePreload(vector pos, float radius);
22
23proto native IEntity FindEntityByName(IEntity worldEnt, string name);
24proto native IEntity FindEntityByID(IEntity worldEnt, int ID);
25
27proto native int GetNumActiveEntities(IEntity worldEntity);
29proto native IEntity GetActiveEntity(IEntity worldEntity, int index);
31
32//----------------------------------------------
43
45proto native void SetListenerCamera(int camera);
46
53proto native void SetCamera(int cam, vector origin, vector angle);
54
56proto native void SetCameraEx(int cam, const vector mat[4]);
57
59proto native void GetCamera(int cam, out vector mat[4]);
60
61proto native void SetCameraVerticalFOV(int cam, float fovy);
62proto native void SetCameraFarPlane(int cam, float farplane); //default 160000 units
63proto native void SetCameraNearPlane(int cam, float nearplane); //default 5 units
64
65proto native void SetCameraType(int cam, CameraType type);
66
104proto native void SetCameraPostProcessEffect(int cam, int priority, PostProcessEffectType type, string materialPath);
105
106//ent can be NULL for world-space coords
107proto vector ProjectVector(int cam, IEntity ent, vector vec);
108proto vector UnprojectVector(int cam, float x, float y, vector dir);
109
111
112//----------------------------------------------
118
119typedef int[] HLIGHT;
120
122{
123 POINT, //< point light, all directional light
124 SPOT, //< spot light, direction is determined by owner (entity)
126 AMBIENT
128
141
145proto HLIGHT AddLight(IEntity owner, LightType type, LightFlags flags, float radius, vector color);
147proto native bool RemoveLight(HLIGHT light);
148proto native bool SetLightEx(HLIGHT light, float radius, vector color);
150proto native bool SetLightTexture(HLIGHT light, string cubemap);
151proto native int SetLightFlags(HLIGHT light, LightFlags flags);
152proto native int ClearLightFlags(HLIGHT light, LightFlags flags);
154proto native bool SetLightCone(HLIGHT light, float cone);
155
159proto native float GetSceneHDRMul(int camera);
161
162
163//----------------------------------------------
170{
171 BONES, //< tests collision geometries around bones of animated objects
172 ENTS, //< tests entities
173 WORLD, //< tests world bounding box
175 WATER, //< tests collision with water surface
176 PASSTRANSLUCENT,//< Do not intersects with entities with EntityFlags.TRANSLUCENT set
177 RAGDOLLS, //< tests ragdolls
178 VISTEST, //< performs visibility test first. Not necessary for entities receiving EntityEvent.VISIBLE, because there is a certainty that a camera will see them
182
190
206
207proto native bool TraceLineToEntity(IEntity ent, vector start, vector end, out TraceContact contact);
208
209//bool FilterCallback(Class target [, vector rayorigin, vector raydirection])
210
220
222{
223 float Radius;
224};
225
231
233{
235};
236
247proto volatile float TraceMove(TraceParam param, out IEntity cent, out float plane[4], out int surfparm, func filtercallback);
248
249
261proto native int P2PVisibilityEx(vector from, vector to, int flags);
262
264proto int SphereQuery(vector origin, float radius, out IEntity visents[], int ents, int fmask);
265
270proto native bool IsBoxVisible(vector mins, vector maxs, int flags);
271
281proto int VisEntities(vector origin, vector look, float angle, float radius, out IEntity ents[2], int maxents, int fmask);
282
287{
288 proto private void ~OcclusionQuery();
289
296 proto native int GetResult();
297
299 proto native void SetPosition(vector pos);
301 proto native void Destroy();
302};
303
305
306//----------------------------------------------
311typedef int[] hDecal;
312
325proto native hDecal CreateDecal(IEntity entity, vector origin, vector project, float nearclip, float angle, float size, string materialName, float lifetime, int flags);
326
327proto native void RemoveDecal(hDecal decal);
328
341proto native hDecal CreateLandMarkDecal(IEntity entity, vector origin, vector normal, float edgeSize, float lifeTime, string materialName, hDecal prevDecal, float alpha);
342
343
356proto native int CanAddToLandMarkDecal(hDecal lmDecal, IEntity entity, string mat, vector newPoint);
357
367proto native bool AddPointToLandMarkDecal(hDecal lmDecal, vector point, vector normal, float alpha);
368
376proto native void FinalizeLandMarkDecal(hDecal lmDecal, bool addAlpha, float alphaDist);
377
382proto native bool IsLandMarkFinalized(hDecal lmDecal);
383
388proto native vector GetLastLandMarkPoint(hDecal lmDecal);
389
396proto native void SetGlobalLandMarkParams(float minSegmentLength, float maxSegmentLength, float degAngle);
397
398
400
401
402//----------------------------------------------
411proto native bool IsOcean();
412
418proto native float GetOceanHeight(float worldX, float worldZ);
419
420
426proto native vector GetOceanHeightAndDisplace(float worldX, float worldZ);
427
428
430
431
433
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
Icon x
Icon y
TODO doc.
Definition EnScript.c:118
collision and tracing WARNING: Non-managed, needs manual delete call, should not be ref'd
Definition EnWorld.c:194
proto native void SetCamera(int cam, vector origin, vector angle)
proto native void SetCameraEx(int cam, const vector mat[4])
Changes camera matrix.
proto native void SetCameraFarPlane(int cam, float farplane)
proto vector UnprojectVector(int cam, float x, float y, vector dir)
proto native void SetCameraNearPlane(int cam, float nearplane)
proto native void SetCameraVerticalFOV(int cam, float fovy)
proto native void SetListenerCamera(int camera)
sets which camera will be a listener (for sound engine)
proto vector ProjectVector(int cam, IEntity ent, vector vec)
PostProcessEffectType
Post-process effect type.
Definition EnWorld.c:72
proto native void SetCameraType(int cam, CameraType type)
proto native void GetCamera(int cam, out vector mat[4])
Returns current camera transformation.
proto native void SetCameraPostProcessEffect(int cam, int priority, PostProcessEffectType type, string materialPath)
CameraType
Definition EnWorld.c:39
@ FXAA
Definition EnWorld.c:90
@ GaussFilter
Definition EnWorld.c:93
@ ColorGrading
Definition EnWorld.c:86
@ DynamicBlur
Definition EnWorld.c:85
@ DepthOfField
Definition EnWorld.c:76
@ Colors
Definition EnWorld.c:87
@ HBAO
Definition EnWorld.c:77
@ RotBlur
Definition EnWorld.c:78
@ SunMask
Definition EnWorld.c:92
@ RadialBlur
Definition EnWorld.c:82
@ Rain
Definition EnWorld.c:80
@ SSR
Definition EnWorld.c:94
@ ChromAber
Definition EnWorld.c:83
@ SMAA
Definition EnWorld.c:89
@ WetDistort
Definition EnWorld.c:84
@ None
Definition EnWorld.c:73
@ Glow
Definition EnWorld.c:88
@ GodRays
Definition EnWorld.c:79
@ FilmGrain
Definition EnWorld.c:81
@ UnderWater
Definition EnWorld.c:74
@ Median
Definition EnWorld.c:91
@ SSAO
Definition EnWorld.c:75
@ PERSPECTIVE
Definition EnWorld.c:40
@ ORTHOGRAPHIC
Definition EnWorld.c:41
proto native hDecal CreateDecal(IEntity entity, vector origin, vector project, float nearclip, float angle, float size, string materialName, float lifetime, int flags)
proto native void FinalizeLandMarkDecal(hDecal lmDecal, bool addAlpha, float alphaDist)
proto native void RemoveDecal(hDecal decal)
proto native bool AddPointToLandMarkDecal(hDecal lmDecal, vector point, vector normal, float alpha)
proto native bool IsLandMarkFinalized(hDecal lmDecal)
proto native hDecal CreateLandMarkDecal(IEntity entity, vector origin, vector normal, float edgeSize, float lifeTime, string materialName, hDecal prevDecal, float alpha)
proto native void SetGlobalLandMarkParams(float minSegmentLength, float maxSegmentLength, float degAngle)
proto native int CanAddToLandMarkDecal(hDecal lmDecal, IEntity entity, string mat, vector newPoint)
int[] hDecal
Definition EnWorld.c:311
proto native vector GetLastLandMarkPoint(hDecal lmDecal)
proto native int ClearLightFlags(HLIGHT light, LightFlags flags)
proto native bool RemoveLight(HLIGHT light)
removes light
int[] HLIGHT
Light handle.
Definition EnWorld.c:119
proto native int SetLightFlags(HLIGHT light, LightFlags flags)
proto native bool SetLightCone(HLIGHT light, float cone)
Sets light cone in degrees (for LightType.SPOT).
proto native bool SetLightTexture(HLIGHT light, string cubemap)
sets lookup texture for projection lights
proto native float GetSceneHDRMul(int camera)
proto native bool SetLightEx(HLIGHT light, float radius, vector color)
LightFlags
Definition EnWorld.c:130
proto HLIGHT AddLight(IEntity owner, LightType type, LightFlags flags, float radius, vector color)
LightType
Definition EnWorld.c:122
@ DYNAMIC
Dynamic objects are included in the query.
Definition EnWorld.c:136
@ CASTSHADOW
Definition EnWorld.c:137
@ CHEAP
for cheaper dynamic lights, like muzzle flashes (might use cheaper rendering method)
Definition EnWorld.c:139
@ AMBIENT
Definition EnWorld.c:126
@ SPOT
Definition EnWorld.c:124
@ POINT
Definition EnWorld.c:123
@ DIRECTIONAL
Definition EnWorld.c:125
proto native int GetResult()
int LayerMask
Definition EnWorld.c:215
vector Mat[3]
Definition EnWorld.c:234
vector End
Definition EnWorld.c:214
owned string OriginalMaterialName
Definition EnWorld.c:202
proto native bool IsOcean()
TraceFlags Flags
Definition EnWorld.c:216
proto native void Destroy()
Destroys the object.
proto native float GetOceanHeight(float worldX, float worldZ)
float Radius
Definition EnWorld.c:223
float Fraction
Definition EnWorld.c:195
int SurfaceID
Definition EnWorld.c:200
IEntity Exclude
Definition EnWorld.c:217
vector Mins
Definition EnWorld.c:228
vector Point
Definition EnWorld.c:204
float Plane[4]
Definition EnWorld.c:203
int MaterialFlags
Definition EnWorld.c:198
proto native vector GetOceanHeightAndDisplace(float worldX, float worldZ)
vector Start
Definition EnWorld.c:213
owned string MaterialName
Definition EnWorld.c:201
proto native void SetPosition(vector pos)
Sets world position.
vector Maxs
Definition EnWorld.c:229
void ~OcclusionQuery()
proto native IEntity FindEntityByName(IEntity worldEnt, string name)
proto native IEntity GetActiveEntity(IEntity worldEntity, int index)
returns active entity
int[] WorldHandle
Definition EnWorld.c:12
proto native IEntity FindEntityByID(IEntity worldEnt, int ID)
proto native int GetNumActiveEntities(IEntity worldEntity)
returns number of active (simulated) Entities in the world
proto native float GetWorldTime()
proto native WorldHandle SetCurrentWorld(WorldHandle world)
proto volatile float TraceMove(TraceParam param, out IEntity cent, out float plane[4], out int surfparm, func filtercallback)
TraceParam TraceLineToEntity
proto int SphereQuery(vector origin, float radius, out IEntity visents[], int ents, int fmask)
finds all entities in a radius
proto int VisEntities(vector origin, vector look, float angle, float radius, out IEntity ents[2], int maxents, int fmask)
proto native bool IsBoxVisible(vector mins, vector maxs, int flags)
TraceShape
Definition EnWorld.c:184
TraceFlags
Definition EnWorld.c:170
proto native int P2PVisibilityEx(vector from, vector to, int flags)
@ BOX
Definition EnWorld.c:186
@ SPHERE
Definition EnWorld.c:188
@ LINE
Definition EnWorld.c:185
@ OBB
Definition EnWorld.c:187
@ TRANSPARENT_OCCLUDERS
Definition EnWorld.c:180
@ ONLY_PHYSICS
Definition EnWorld.c:174
@ WORLD
Definition EnWorld.c:173
@ PASSTRANSLUCENT
Definition EnWorld.c:176
@ ENTS
Definition EnWorld.c:172
@ WATER
Definition EnWorld.c:175
@ VISTEST
Definition EnWorld.c:178
@ NOTRACE
Definition EnWorld.c:179
@ RAGDOLLS
Definition EnWorld.c:177
@ BONES
Definition EnWorld.c:171