![]() |
|
DecalData Class Reference
[Decals, Special Effects]
A datablock describing an individual decal. More...

Public Member Functions | |
void | postApply () |
Recompute the imagemap sub-texture rectangles for this DecalData. | |
Public Attributes | |
Rendering | |
float | clippingAngle |
The angle in degrees used to clip geometry that faces away from the decal projection direction. | |
float | fadeEndPixelSize |
LOD value - size in pixels at which decals of this type are fully faded out. | |
float | fadeStartPixelSize |
LOD value - size in pixels at which decals of this type begin to fade out. | |
char | renderPriority |
Default renderPriority for decals of this type (determines draw order when decals overlap). | |
Decal | |
int | fadeTime |
Time (in milliseconds) over which to fade out the decal before deleting it at the end of its lifetime. | |
int | lifeSpan |
Time (in milliseconds) before this decal will be automatically deleted. | |
string | Material |
Material to use for this decal. | |
float | size |
Width and height of the decal in meters before scale is applied. | |
Texturing | |
int | frame |
Index of the texture rectangle within the imagemap to use for this decal. | |
bool | randomize |
If true, a random frame from the imagemap is selected for each instance of the decal. | |
int | texCols |
Number of columns in the supplied imagemap. | |
int | texRows |
Number of rows in the supplied imagemap. | |
int | textureCoordCount |
Number of individual frames in the imagemap (maximum 16). | |
RectF | textureCoords [16] |
An array of RectFs (topleft.x topleft.y extent.x extent.y) representing the UV coordinates for each frame in the imagemap. |
Detailed Description
A datablock describing an individual decal.
The textures defined by the decal Material can be divided into multiple rectangular sub-textures as shown below, with a different sub-texture selected by all decals using the same DecalData (via frame) or each decal instance (via randomize).

Example of a Decal imagemap
- Example:
- See also:
- Decals
Member Function Documentation
void DecalData::postApply | ( | ) |
Recompute the imagemap sub-texture rectangles for this DecalData.
- Example:
// Inform the decal object to reload its imagemap and frame data. %decalData.texRows = 4; %decalData.postApply();
Member Data Documentation
float DecalData::clippingAngle |
The angle in degrees used to clip geometry that faces away from the decal projection direction.
LOD value - size in pixels at which decals of this type are fully faded out.
This should be a smaller value than fadeStartPixelSize.
LOD value - size in pixels at which decals of this type begin to fade out.
This should be a larger value than fadeEndPixelSize. However, you may also set this to a negative value to disable lod-based fading.
Time (in milliseconds) over which to fade out the decal before deleting it at the end of its lifetime.
- See also:
- lifeSpan
int DecalData::frame |
Index of the texture rectangle within the imagemap to use for this decal.
Time (in milliseconds) before this decal will be automatically deleted.
string DecalData::Material |
Material to use for this decal.
bool DecalData::randomize |
If true, a random frame from the imagemap is selected for each instance of the decal.
Default renderPriority for decals of this type (determines draw order when decals overlap).
float DecalData::size |
Width and height of the decal in meters before scale is applied.
Number of columns in the supplied imagemap.
Use texRows and texCols if the imagemap frames are arranged in a grid; use textureCoords to manually specify UV coordinates for irregular sized frames.
Number of rows in the supplied imagemap.
Use texRows and texCols if the imagemap frames are arranged in a grid; use textureCoords to manually specify UV coordinates for irregular sized frames.
Number of individual frames in the imagemap (maximum 16).
RectF DecalData::textureCoords[16] |
An array of RectFs (topleft.x topleft.y extent.x extent.y) representing the UV coordinates for each frame in the imagemap.