Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy

Modules

 Ocean API
 

Typedefs

typedef int[] hDecal
 

Functions

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 RemoveDecal (hDecal decal)
 
proto native hDecal CreateLandMarkDecal (IEntity entity, vector origin, vector normal, float edgeSize, float lifeTime, string materialName, hDecal prevDecal, float alpha)
 
proto native int CanAddToLandMarkDecal (hDecal lmDecal, IEntity entity, string mat, vector newPoint)
 
proto native bool AddPointToLandMarkDecal (hDecal lmDecal, vector point, vector normal, float alpha)
 
proto native void FinalizeLandMarkDecal (hDecal lmDecal, bool addAlpha, float alphaDist)
 
proto native bool IsLandMarkFinalized (hDecal lmDecal)
 
proto native vector GetLastLandMarkPoint (hDecal lmDecal)
 
proto native void SetGlobalLandMarkParams (float minSegmentLength, float maxSegmentLength, float degAngle)
 

Detailed Description

Typedef Documentation

◆ hDecal

typedef int [] hDecal

Definition at line 312 of file enworld.c.

Function Documentation

◆ AddPointToLandMarkDecal()

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 angle is more than some threshold

Parameters
lmDecalentity to add new landmark point
pointcontact point
normalnormal of contact
alphatranslucency in point
Returns
true if everything was OK, false if not. In this case, the application MUST not used later the pointer to decal, it's finalized internally !

◆ CanAddToLandMarkDecal()

proto native int CanAddToLandMarkDecal ( hDecal  lmDecal,
IEntity  entity,
string  mat,
vector  newPoint 
)

is it possible to add new point to landmark decal?

Parameters
lmDecalentity to add new landmark point
entityentity to add new landmark point
matmaterial of decal
newpointnew point to add
Returns
LMD_ERROR = error when adding new point (invalid decal) LMD_VALID = can add new point LMD_DIFF_ENT = new point is on different entity LMD_TOO_FAR = new point is too far from previous point

◆ CreateDecal()

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. from shots when lifetime=0, pointer to decal is returned, that can be removed by RemoveDecal then

Parameters
entityentity where the landmark should be created
originfirst point of the decal, nothing is done now
projectprojection direction (length is far clipping distance)
nearclipnear clipping distance
materialNameMaterial used for decal
lifetimeLifetime in seconds
flagsNot used ATM
Returns
Decal pointer or null

◆ CreateLandMarkDecal()

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. from wheel when a car is moving on the ground

Parameters
entityentity where the landmark should be created (only terrain is supported ATM)
originfirst point of the decal, nothing is done now
normalnormal of surface
edgesizeEdge size of decal
lifetimeLifetime in seconds
materialNameMaterial used for decal
prevPrevious decal, we are connecting to
alphatranslucency of point
Returns
Decal pointer or null

◆ FinalizeLandMarkDecal()

proto native void FinalizeLandMarkDecal ( hDecal  lmDecal,
bool  addAlpha,
float  alphaDist 
)

finalize landmark adding, e.g. when entity lose contact with ground -> the pointer to decal should have only world and entity if it has something to render, otherwise it's destroyed here

Parameters
lmDecalentity to add new landmark point
addAlphaif to add last point with transition to zero alpha
alphaDistdistance to add last point

◆ GetLastLandMarkPoint()

proto native vector GetLastLandMarkPoint ( hDecal  lmDecal)

return last landmark point or -65535.0 in all components

Parameters
lmDecaldecal to test

◆ IsLandMarkFinalized()

proto native bool IsLandMarkFinalized ( hDecal  lmDecal)

return if landmark was finalized

Parameters
lmDecaldecal to test

◆ RemoveDecal()

proto native void RemoveDecal ( hDecal  decal)

◆ SetGlobalLandMarkParams()

proto native void SetGlobalLandMarkParams ( float  minSegmentLength,
float  maxSegmentLength,
float  degAngle 
)

set global parameters for landmark generation

Parameters
minSegmentLengthminimum length segment, when new point is added (4 default), when is less, just the end position is on the fly updated
maxSegmentLengthmaximum segment length, when length is bigger, the path is finished
degAngleangle in degrees, when is more, the path is finished