This page has been translated automatically.
Programming
Fundamentals
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
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::DecalMesh Class

Header:#include <UnigineDecals.h>
Inherits:Decal

This class describes how to create and modify mesh decals.

DecalMesh Class

Members


static DecalMeshPtr create(const Ptr<Mesh> & mesh, float radius, const char * name)

Arguments

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

static DecalMeshPtr create(const char * mesh_name, float radius, const char * name)

Arguments

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

Ptr<DecalMesh> cast(const Ptr<Node> & node)

Arguments

  • const Ptr<Node> & node

Ptr<DecalMesh> cast(const Ptr<Decal> & base)

Arguments

  • const Ptr<Decal> & base

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 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.

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.

const char * getMeshName()

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

Return value

The mesh name.

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()

int loadMesh(const char * name, int unique = 0)

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.
  • int unique

Return value

1 if the mesh is loaded 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 type()

void updateTopology()

Last update: 2017-07-03
Build: ()