UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1

DecalMesh Class

This class describes how to create and modify mesh decals.

See Also

DecalMesh Class

This class inherits from Decal

Members


DecalMesh (variable v, float radius, string material)

Constructor. Creates a new DecalMesh object with the given properties. Depending on the first variable passed as an argument, the DecalMesh object creates as follows:
  • Mesh - Mesh to be used as a base for a decal.
  • string - Name of the mesh to be used as a base for a decal.

Arguments

  • variable v - Mesh object or mesh name.
  • float radius - Height of the decal projection box along the Z axis, in units.
  • string material - Material of the decal.

string getMeshName ()

Returns a name of the mesh used as a base for the decal.

Return value

Name of the mesh.

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.

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.

int loadMesh (string name)

Loads a mesh for the current mesh from the file. This function doesn't change the mesh name.

Arguments

  • string name - Mesh file name.

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.

void setMeshName (string name)

Sets a new name for the mesh.

Arguments

  • string name - Name to be set for the mesh.

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.

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.
Last update: 2017-07-03