|
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) | |
| 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).
| material | material of the track decal |
| size | width of the decal |
| lifetime | the time between the track decal is finalized and it is removed |
| 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.
| entity | contact point entity |
| pointWS | world space position of the point |
| normalWS | world space normal vector of the point |
| alpha | alpha value of the decal |
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.
| fadeoutLength | length of the newly added track segment, fading to the zero alpha value. |
| proto external bool TrackDecalFactory.HasActiveDecal | ( | ) |
Returns true if this instance has a unfinalized decal.