This page has been translated automatically.
Getting Started
Migrating to UNIGINE 2.0
C++ API Migration
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
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine::ObjectMeshDynamic Class

UNIGINEUNIGINE 2.0Comments
-IMMUTABLE_VERTEX Enumeration member has been added.
-IMMUTABLE_INDICES Enumeration member has been added.
-DYNAMIC_VERTEX Enumeration member has been added.
-DYNAMIC_INDICES Enumeration member has been added.
-IMMUTABLE_ALL Enumeration member has been added.
-DYNAMIC_ALL Enumeration member has been added.
-Ptr< ObjectMeshDynamic > create(const MeshPtr & mesh, int flags) An ObjectMeshDynamic constructor that receives a mesh smart point as the argument.
Ptr< ObjectMeshDynamic > create(int dynamic) Ptr< ObjectMeshDynamic > create(int flags) ObjectMeshDynamic constructor.
-static int type() ObjectMeshDynamic type.
-virtual void removeVertex(int num, int size, int indices) const =0 Removes the specified number of vertices.
-virtual void removeIndices(int num, int size) const =0 Removes the specified number of indices.
-virtual void setSurfaceName(const char * name, int surface) const =0 Sets the name for the specified surface.
int save(const char * name)int saveMesh(const char * name) Saves the dynamic mesh into a file.
int save(const char * name)int saveMesh(const char * name) Saves the dynamic mesh into a file.
-virtual int setMesh(const MeshPtr & mesh) const =0 Allows for reinitialization of the ObjectMeshDynamic: it copies a given mesh into the current dynamic mesh.
-virtual int getMesh(const MeshPtr & mesh) const =0 Copies the current dynamic mesh into the received mesh.
-virtual void setMeshName(const char * name) const =0 Sets the mesh name.
-virtual const char * getMeshName() const =0 Gets the mesh name.
void addMeshSurface(const Ptr< ObjectMeshDynamic > & mesh, int surface)- Removed. Use functions of the Unigine::Mesh class.
-void setNumVertex(int num) Sets the number of mesh vertices.
void addNormal(const vec3 & normal)- Removed. Use virtual void addTangent (const quat & tangent) const =0
void setNormal(int num, const vec3 & normal)- Removed. Use void setTangent(int num, const quat & tangent)
void addTangent(const vec4 & tangent)void addTangent(const quat & tangent) Now the tangent basis is stored as a quaternion. So, the type of the first function argument has been changed.
void setTangent(int num, const vec4 & tangent)void setTangent(int num, const quat & tangent) Now the tangent basis is stored as a quaternion. So, the type of the second function argument has been changed.
vec4 getTangent(int num)quat getTangent(int num) Now the tangent basis is stored as a quaternion. So, the type of the return value has been changed.
-void addColor(const vec4 & color) Adds a color with given coordinates to the last added vertex.
-void setColor(int num, const vec4 & color) Updates the color of a given vertex.
-vec4 getColor(int num) Returns the color of a given vertex.
-void setNumIndices(int num) Sets the number of vertex indices.
void addIndex(unsigned short index)void addIndex(int index) Adds an index to the index buffer.
void setIndex(int num, unsigned short index)void setIndex(int num, int index) Updates an index in the index buffer (replaces the index with the given number with the specified index of the vertex).
void addIndicesArray(const unsigned short * indices, int num_indices)void addIndicesArray(const int * indices, int num_indices) Adds an array of indices.
void setIndicesArray(const unsigned short * indices, int num_indices)void setIndicesArray(const int * indices, int num_indices) Updates an array of indices.
const unsigned short * getIndicesArray()const int * getIndicesArray() Returns an array of indices of the dynamic mesh.
unsigned short getIndex(int num)int getIndex(int num) Returns the index of the vertex by the index number.
void addQuads(int num_quads)- Renamed. See void addTriangleQuads(int num_quads)
void setBoundBox(const vec3 & min, const vec3 & max, int surface)void setBoundBox(const BoundBox & bb, int surface) The new function receives an instance of the Unigine::BoundBox class as the argument.
void setBoundBox(const vec3 & min, const vec3 & max)void setBoundBox(const BoundBox & bb) The new function receives an instance of the Unigine::BoundBox class as the argument.
void updateNormals()- Removed. Use virtual void updateTangents() const =0.
void updateNormals(float angle)- Removed. Use virtual void updateTangents() const =0.
void flush()void flushVertex() and void flushIndices()
-virtual void updateIndices() const =0 Updates indices.
Last update: 2017-07-03
Build: ()