Loading...
Searching...
No Matches
TrackDecalFactory Interface Reference
Inheritance diagram for TrackDecalFactory:
Managed

Public Member Functions

proto void TrackDecalFactory (ResourceName material, float size, float lifetime,)
 Create a new instance of the factory.
 
proto external bool HasActiveDecal ()
 Returns true if this instance has a unfinalized decal.
 
proto external bool AddPoint (IEntity entity, vector pointWS, vector normalWS, float alpha)
 Add a new point to the track decal.
 
proto external bool FinalizeDecal (float fadeoutLength)
 Mark the decal as final.
 
- Public Member Functions inherited from Managed
proto external ref Managed Clone ()
 Return shallow copy of object, or null if it is not allowed (not public constructor)
 

Constructor & Destructor Documentation

◆ TrackDecalFactory()

proto void TrackDecalFactory.TrackDecalFactory ( ResourceName material,
float size,
float lifetime )

Create a new instance of the factory.

Each instance is intended for a single wheel (i.e. 4 wheel car should has 4 factory instances).

Parameters
materialmaterial of the track decal
sizewidth of the decal
lifetimethe time between the track decal is finalized and it is removed

Member Function Documentation

◆ AddPoint()

proto external bool TrackDecalFactory.AddPoint ( IEntity entity,
vector pointWS,
vector normalWS,
float alpha )

Add a new point to the track decal.

The new track decal will be created if needed.

This function is suitable to be called each frame, point deduplication and track segment merging are done internally.

Parameters
entitycontact point entity
pointWSworld space position of the point
normalWSworld space normal vector of the point
alphaalpha value of the decal
Returns
false if there was some error

◆ FinalizeDecal()

proto external bool TrackDecalFactory.FinalizeDecal ( float fadeoutLength)

Mark the decal as final.

The track decal instance starts to be immutable. New points added after calling this function will create a new track decal that will not be connected with the previous one.

Parameters
fadeoutLengthlength of the newly added track segment, fading to the zero alpha value.

◆ HasActiveDecal()

proto external bool TrackDecalFactory.HasActiveDecal ( )

Returns true if this instance has a unfinalized decal.


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