Enfusion Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
TrackDecal Interface Reference
Inheritance diagram for TrackDecal:
[legend]

Public Member Functions

proto external int CanAddToTrackDecal (IEntity entity, ResourceName materialName, vector newPoint)
 Checks whether adding new point to Track decal is possible.
 
proto external bool AddPointToTrackDecal (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
 
proto external void FinalizeTrackDecal (bool addAlpha, float alphaDist)
 finalize Track adding, e.g.
 
proto external vector GetLastTrackPoint ()
 Returns last Track point or -65535.0 in all components.
 
proto external bool IsTrackFinalized ()
 Returns whether Track was finalized.
 
- Public Member Functions inherited from pointer
proto string ToString ()
 

Static Public Member Functions

static proto void SetGlobalTrackParams (float minSegmentLength, float maxSegmentLength, float degAngle)
 set global parameters for Track generation
 

Member Function Documentation

◆ AddPointToTrackDecal()

proto external bool TrackDecal.AddPointToTrackDecal ( 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
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 !

◆ CanAddToTrackDecal()

proto external int TrackDecal.CanAddToTrackDecal ( IEntity  entity,
ResourceName  materialName,
vector  newPoint 
)

Checks whether adding new point to Track decal is possible.

Parameters
entityentity to add new Track point
materialNamematerial 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

◆ FinalizeTrackDecal()

proto external void TrackDecal.FinalizeTrackDecal ( bool  addAlpha,
float  alphaDist 
)

finalize Track 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
addAlphaif to add last point with transition to zero alpha
alphaDistdistance to add last point

◆ GetLastTrackPoint()

proto external vector TrackDecal.GetLastTrackPoint ( )

Returns last Track point or -65535.0 in all components.

◆ IsTrackFinalized()

proto external bool TrackDecal.IsTrackFinalized ( )

Returns whether Track was finalized.

◆ SetGlobalTrackParams()

static proto void TrackDecal.SetGlobalTrackParams ( float  minSegmentLength,
float  maxSegmentLength,
float  degAngle 
)
static

set global parameters for Track 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

The documentation for this interface was generated from the following file: