Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено

Topics

 Ocean API
 

Определения типов

typedef int[] hDecal
 

Функции

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)
 

Подробное описание

Типы

◆ hDecal

Функции

◆ 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

Аргументы
lmDecalentity to add new landmark point
pointcontact point
normalnormal of contact
alphatranslucency in point
Возвращает
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?

Аргументы
lmDecalentity to add new landmark point
entityentity to add new landmark point
matmaterial of decal
newpointnew point to add
Возвращает
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

Аргументы
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
Возвращает
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

Аргументы
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
Возвращает
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

Аргументы
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

Аргументы
lmDecaldecal to test

◆ IsLandMarkFinalized()

proto native bool IsLandMarkFinalized ( hDecal lmDecal)

return if landmark was finalized

Аргументы
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

Аргументы
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