DecalMesh Class
Inherits: | Decal |
This class describes how to create and modify mesh decals.
DecalMesh Class
Members
DecalMesh cast(Node node)
Casts a mesh decal out of the Node instance.Arguments
- Node node - Node instance.
Return value
DecalMesh instance.DecalMesh cast(Decal base)
Casts a DecalMesh out of the Decal instance.Arguments
- Decal base - Decal instance.
Return value
DecalMesh instance.int setMesh(Mesh mesh)
Allows for reinitialization of the decal mesh: it copies a given mesh into the current decal mesh.Arguments
- Mesh mesh - Mesh.
Return value
1 if the mesh is copied successfully; otherwise, 0.int getMesh(Mesh mesh)
Copies the current decal mesh into the received mesh.Arguments
- Mesh mesh - Mesh.
Return value
1 if the mesh is copied successfully; otherwise, 0.void setMeshName(string name)
Sets a new name for the mesh.Arguments
- string name - Name to be set for the mesh.
string getMeshName()
Returns a name of the mesh used as a base for the decal.Return value
Name of the mesh.void setRadius(float radius)
Sets the new height of the decal projection box along the Z axis.Arguments
- float radius - The height of the decal projection box along the Z axis, in units.
float getRadius()
Returns the current height of the decal projection box along the Z axis.Return value
The height of the decal projection box along the Z axis, in units.void clearTopology()
Reverts a curved geometry back to flat.int loadMesh(string name, int unique = 0)
Loads a mesh for the current mesh from the file. This function doesn't change the mesh name.Arguments
- string name - Mesh file name.
- int unique - When you create several objects out of a single .mesh file, the instance of the mesh geometry is created. If you then change the source geometry, its instances will be changed as well. To avoid this, set the unique flag to 1, so a copy of the mesh geometry will be created and changes won't be applied.
Return value
1 if the mesh is loaded successfully; otherwise, 0.int saveMesh(string name)
Saves the decal mesh into a file.Arguments
- string name - Mesh file name.
Return value
1 if the mesh is saved successfully; otherwise, 0.int type()
Returns a DecalMesh type identifier.Return value
Type identifier.void updateTopology()
Bends the decals geometry if it is a child of GeodeticPivot.Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)