Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
enworld.c
Go to the documentation of this file.
6//----------------------------------------------
11
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//----------------------------------------------
37
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
99
107proto native void SetCameraPostProcessEffect(int cam, int priority, PostProcessEffectType type, string materialPath);
108
109//ent can be NULL for world-space coords
110proto vector ProjectVector(int cam, IEntity ent, vector vec);
111proto vector UnprojectVector(int cam, float x, float y, vector dir);
112
114
115//----------------------------------------------
120
122typedef int[] HLIGHT;
123
125{
126 POINT, //< point light, all directional light
127 SPOT, //< spot light, direction is determined by owner (entity)
130};
131
144
148proto HLIGHT AddLight(IEntity owner, LightType type, LightFlags flags, float radius, vector color);
150proto native bool RemoveLight(HLIGHT light);
151proto native bool SetLightEx(HLIGHT light, float radius, vector color);
153proto native bool SetLightTexture(HLIGHT light, string cubemap);
154proto native int SetLightFlags(HLIGHT light, LightFlags flags);
155proto native int ClearLightFlags(HLIGHT light, LightFlags flags);
157proto native bool SetLightCone(HLIGHT light, float cone);
158
162proto native float GetSceneHDRMul(int camera);
164
165
166
167//----------------------------------------------
172
174{
175 BONES, //< tests collision geometries around bones of animated objects
176 ENTS, //< tests entities
177 WORLD, //< tests world bounding box
179 WATER, //< tests collision with water surface
180 PASSTRANSLUCENT,//< Do not intersects with entities with EntityFlags.TRANSLUCENT set
181 RAGDOLLS, //< tests ragdolls
182 VISTEST, //< performs visibility test first. Not necessary for entities receiving EntityEvent.VISIBLE, because there is a certainty that a camera will see them
185};
186
194
210
211proto native bool TraceLineToEntity(IEntity ent, vector start, vector end, out TraceContact contact);
212
213//bool FilterCallback(Class target [, vector rayorigin, vector raydirection])
214
224
226{
227 float Radius;
228};
229
235
237{
239};
240
251proto volatile float TraceMove(TraceParam param, out IEntity cent, out float plane[4], out int surfparm, func filtercallback);
252
253
265proto native int P2PVisibilityEx(vector from, vector to,int flags);
266
268proto int SphereQuery(vector origin, float radius, out IEntity visents[], int ents, int fmask);
269
274proto native bool IsBoxVisible(vector mins, vector maxs, int flags);
275
285proto int VisEntities(vector origin, vector look, float angle, float radius, out IEntity ents[2], int maxents, int fmask);
286
291{
292 proto private void ~OcclusionQuery();
293
300 proto native int GetResult();
301
303 proto native void SetPosition(vector pos);
305 proto native void Destroy();
306};
307
309
310//----------------------------------------------
315typedef int[] hDecal;
316
329proto native hDecal CreateDecal(IEntity entity, vector origin, vector project, float nearclip, float angle, float size, string materialName, float lifetime, int flags);
330
331proto native void RemoveDecal(hDecal decal);
332
345proto native hDecal CreateLandMarkDecal(IEntity entity, vector origin, vector normal, float edgeSize, float lifeTime, string materialName, hDecal prevDecal, float alpha);
346
347
360proto native int CanAddToLandMarkDecal(hDecal lmDecal, IEntity entity, string mat, vector newPoint);
361
371proto native bool AddPointToLandMarkDecal(hDecal lmDecal, vector point, vector normal, float alpha);
372
380proto native void FinalizeLandMarkDecal(hDecal lmDecal, bool addAlpha, float alphaDist);
381
386proto native bool IsLandMarkFinalized(hDecal lmDecal);
387
392proto native vector GetLastLandMarkPoint(hDecal lmDecal);
393
400proto native void SetGlobalLandMarkParams(float minSegmentLength, float maxSegmentLength, float degAngle);
401
402
404
405
406//----------------------------------------------
411
415proto native bool IsOcean();
416
422proto native float GetOceanHeight(float worldX, float worldZ);
423
424
430proto native vector GetOceanHeightAndDisplace(float worldX, float worldZ);
431
432
433
435
436
437
439
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
Definition colors.c:4
Internal ancestor of all Entity implementations.
Definition enentity.c:165
TODO doc.
Definition enscript.c:118
Object that handles visibility on GPU.
Definition enworld.c:291
collision and tracing WARNING: Non-managed, needs manual delete call, should not be ref'd
Definition enworld.c:198
proto native void SetCamera(int cam, vector origin, vector angle)
Changes camera position.
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)
set postprocess effect to camera To disable effect in some prioroty ppEffect, just set effectName or ...
CameraType
Definition enworld.c:39
@ FXAA
Definition enworld.c:91
@ GaussFilter
Definition enworld.c:94
@ ColorGrading
Definition enworld.c:87
@ DynamicBlur
Definition enworld.c:86
@ DepthOfField
Definition enworld.c:76
@ HBAO
Definition enworld.c:77
@ RotBlur
Definition enworld.c:78
@ Distort
Definition enworld.c:96
@ SunMask
Definition enworld.c:93
@ RadialBlur
Definition enworld.c:83
@ SSR
Definition enworld.c:95
@ ChromAber
Definition enworld.c:84
@ SMAA
Definition enworld.c:90
@ WetDistort
Definition enworld.c:85
@ Ghost
Definition enworld.c:97
@ None
Definition enworld.c:73
@ Glow
Definition enworld.c:89
@ GodRays
Definition enworld.c:79
@ FilmGrain
Definition enworld.c:82
@ UnderWater
Definition enworld.c:74
@ Median
Definition enworld.c:92
@ SSAO
Definition enworld.c:75
@ PERSPECTIVE
Definition enworld.c:40
@ ORTHOGRAPHIC
Definition enworld.c:41
@ SPHERE
Definition endebug.c:119
@ LINE
Definition endebug.c:118
proto native hDecal CreateDecal(IEntity entity, vector origin, vector project, float nearclip, float angle, float size, string materialName, float lifetime, int flags)
Creates single visual mark, e.g.
proto native void FinalizeLandMarkDecal(hDecal lmDecal, bool addAlpha, float alphaDist)
finalize landmark adding, e.g.
proto native bool AddPointToLandMarkDecal(hDecal lmDecal, vector point, vector normal, float alpha)
add new point to decal, internally, new point is added when previous point is in some distance or the...
proto native bool IsLandMarkFinalized(hDecal lmDecal)
return if landmark was finalized
proto native hDecal CreateLandMarkDecal(IEntity entity, vector origin, vector normal, float edgeSize, float lifeTime, string materialName, hDecal prevDecal, float alpha)
Creates continous visual mark, e.g.
proto native void SetGlobalLandMarkParams(float minSegmentLength, float maxSegmentLength, float degAngle)
set global parameters for landmark generation
proto native int CanAddToLandMarkDecal(hDecal lmDecal, IEntity entity, string mat, vector newPoint)
is it possible to add new point to landmark decal?
int[] hDecal
Definition enworld.c:315
proto native vector GetLastLandMarkPoint(hDecal lmDecal)
return last landmark point or -65535.0 in all components
@ WATER
Used by tracing methods. Traceable only with flag TraceFlags.WATER.
Definition enentity.c:136
proto native int ClearLightFlags(HLIGHT light, LightFlags flags)
proto native bool RemoveLight(HLIGHT light)
removes light
int[] HLIGHT
Light handle.
Definition enworld.c:122
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)
scene light multiplier (based on measured scene light levels) - pre-exposure of light
proto native bool SetLightEx(HLIGHT light, float radius, vector color)
LightFlags
Definition enworld.c:133
proto HLIGHT AddLight(IEntity owner, LightType type, LightFlags flags, float radius, vector color)
creates light
LightType
Definition enworld.c:125
@ DYNAMIC
Dynamic light.
Definition enworld.c:139
@ CASTSHADOW
Definition enworld.c:140
@ CHEAP
for cheaper dynamic lights, like muzzle flashes (might use cheaper rendering method)
Definition enworld.c:142
@ AMBIENT
Definition enworld.c:129
@ SPOT
Definition enworld.c:127
@ POINT
Definition enworld.c:126
@ DIRECTIONAL
Definition enworld.c:128
owned string MaterialName
Definition enworld.c:205
float Radius
Definition enworld.c:227
owned string OriginalMaterialName
Definition enworld.c:206
vector Start
Definition enworld.c:217
vector Point
Definition enworld.c:208
vector Maxs
Definition enworld.c:233
proto native bool IsOcean()
Is ocean availabled.
proto native void Destroy()
Destroys the object.
IEntity Exclude
Definition enworld.c:221
vector End
Definition enworld.c:218
proto native float GetOceanHeight(float worldX, float worldZ)
Get water ocean height at given point.
proto native void SetPosition(vector pos)
Sets world position.
vector Mins
Definition enworld.c:232
int SurfaceID
Definition enworld.c:204
float Plane[4]
Definition enworld.c:207
proto native int GetResult()
return Query result
proto native vector GetOceanHeightAndDisplace(float worldX, float worldZ)
Get water ocean height and displacement at given point, returns vector(displaceX, height,...
void ~OcclusionQuery()
int MaterialFlags
Definition enworld.c:202
TraceFlags Flags
Definition enworld.c:220
float Fraction
Definition enworld.c:199
vector Mat[3]
Definition enworld.c:238
int LayerMask
Definition enworld.c:219
@ WORLD
4_World
Definition enprofiler.c:30
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)
Sets current world.
proto volatile float TraceMove(TraceParam param, out IEntity cent, out float plane[4], out int surfparm, func filtercallback)
traces line start->end, return 0..1 if trace was sucessfull.
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)
finds all visible entities (rought, according to a visibility.
proto native bool IsBoxVisible(vector mins, vector maxs, int flags)
tests if bbox is visible according to view-frustum and PVS
TraceShape
Definition enworld.c:188
TraceFlags
Definition enworld.c:174
proto native int P2PVisibilityEx(vector from, vector to, int flags)
tests visibility
@ BOX
Definition enworld.c:190
@ OBB
Definition enworld.c:191
@ TRANSPARENT_OCCLUDERS
Definition enworld.c:184
@ ONLY_PHYSICS
Definition enworld.c:178
@ PASSTRANSLUCENT
Definition enworld.c:180
@ ENTS
Definition enworld.c:176
@ VISTEST
Definition enworld.c:182
@ NOTRACE
Definition enworld.c:183
@ RAGDOLLS
Definition enworld.c:181
@ BONES
Definition enworld.c:175
Icon x
Icon y
WeatherPhenomenon Rain
Definition weather.c:155
WeatherPhenomenon Snowfall
Definition weather.c:156