This page has been translated automatically.
Programming
Fundamentials
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Core Library
Containers
Engine Classes
Node-Related Classes
Rendering-Related Classes
Physics-Related Classes
Bounds-Related Classes
GUI-Related Classes
Controls-Related Classes
Pathfinding-Related Classes
Utility Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

DecalMesh Class

Interface for mesh decals handling.

To use this class, include the UnigineDecalMesh.h file.

DecalMesh Class

Members


DecalMesh (const Ptr<Mesh> & mesh, float radius, const char * name)

Arguments

  • const Ptr<Mesh> & mesh
  • float radius
  • const char * name

DecalMesh (const char * mesh_name, float radius, const char * name)

Arguments

  • const char * mesh_name
  • float radius
  • const char * name

int setMesh (const Ptr<Mesh> & mesh)

Copies a given mesh into the current decal mesh.

Arguments

  • const Ptr<Mesh> & mesh - The mesh smart pointer.

Return value

1 if the mesh is copied successfully; otherwise, 0.

int saveMesh (const char * name)

Saves the decal mesh into a file.

Arguments

  • const char * name - A name of the mesh file.

Return value

1 if the mesh is saved successfully; otherwise, 0.

int loadMesh (const char * name)

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

Arguments

  • const char * name - The name of the mesh file.

Return value

1 if the mesh is loaded 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.

const char * getMeshName ()

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

Return value

The mesh name.

void setMeshName (const char * name)

Sets a new name for the mesh.

Arguments

  • const char * name - A new name to be set for the mesh.

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 getMesh (const Ptr<Mesh> & mesh)

Copies the current decal mesh into the received mesh.

Arguments

  • const Ptr<Mesh> & mesh - The mesh smart pointer.

Return value

1 if the mesh is copied successfully; otherwise, 0.
Last update: 2017-07-03
Build: ()