This page has been translated automatically.
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
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::ObjectMesh Class

The ObjectMesh class has been renamed into the ObjectMeshStatic.

UNIGINEUNIGINE 2.0Comments
-Ptr< ObjectMeshStatic > create(const MeshPtr & mesh) An ObjectMeshStatic constructor that receives a mesh smart pointer.
Ptr< ObjectMesh > create(const char * name)Ptr< ObjectMeshStatic > create(const char * name, int dynamic) An ObjectMeshStatic that receives a mesh dynamic flag.
int createMesh(const char * name, int dynamic) Initializes a mesh with the dynamic flag and an arbitrary name.
int loadMesh(const char * name) Loads the mesh for the current mesh from the .mesh file. This function doesn't change the mesh name. So, you should use it together with void setMeshName().
int save(const char * name)int saveMesh(const char * name) Saves the mesh into the .mesh format.
int setMesh() Copies the source mesh into the current mesh.
int getMesh() Copies the current mesh into the source mesh.
void flushMesh()
void setMeshName()
const char * getMeshName()
void updateSurfaceBounds(int surface)
void setSurfaceTransform(const mat4 & transform, int surface)void setSurfaceTransform(const mat4 & transform, int surface, int target) The new function receives the number of the surface morph target as the 3rd argument.
int addMeshSurface(const char * name, Ptr< ObjectMesh > mesh, int surface)int addMeshSurface(const char * name, const Ptr< ObjectMeshStatic > & mesh, int surface, int target) The new function receives the number of the surface morph target as the 4th argument.
int addMeshSurface(int dest_surface, Ptr< ObjectMesh > mesh, int surface)int addMeshSurface(int dest_surface, const Ptr< ObjectMeshStatic > & mesh, int surface, int target) The new function receives the number of the surface morph target as the 4th argument.
-int addMeshSurface(const char * name, const MeshPtr & mesh, int surface, int target)
-int getMeshSurface(const MeshPtr & mesh, int surface, int target)
-int addSurfaceTarget(int surface, const char * name)
void updateSurfaces()-
void setVertex(int num, const vec3 & xyz, int surface)void setVertex(int num, const vec3 & vertex, int surface, int target) The new function receives the number of the surface morph target as the 4th argument.
vec3 getVertex(int num, int surface)vec3 getVertex(int num, int surface, int target) The new function receives the number of the surface morph target as the 3rd argument.
-int getNumTangents(int surface)
void setNormal(int num, const vec3 & normal, int surface)- Removed. Use void setTangent(int num, const quat & tangent, int surface, int target).
vec3 getNormal(int num, int surface)- Removed. Use quat getTangent(int num, int surface, int target).
void setTangent(int num, const vec4 & tangent, int surface)void setTangent(int num, const quat & tangent, int surface, int target) Now the tangent basis is stored as quaternion. So, the type of the second function argument has been changed.
vec4 getTangent(int num, int surface)quat getTangent(int num, int surface, int target) Now the tangent basis is stored as quaternion. So, the type of the return value has been changed.
void setTexCoord(int num, const vec4 & texcoord, int surface)- Removed. Use void setTexCoord0(int num, const vec2 & texcoord, int surface) for the 1st UV map and void setTexCoord1(int num, const vec2 & texcoord, int surface) for the 2nd UV map.
vec4 getTexCoord(int num, int surface)- Removed. Use vec2 getTexCoord0(int num, int surface) for the 1st UV map and vec2 getTexCoord1(int num, int surface) for the 2nd UV map.
-int getNumTexCoords0(int surface)
-int getNumTexCoords1(int surface)
int getNumColors(int surface)
void setColor(int num, const vec4 & color, int surface)
vec4 getColor(int num, int surface)
int getNumIndices(int surface)- Now each vertex has indices of 2 types: coordinate and triangle indices. Related functions are:
void setIndex(int num, int index, int surface)- Now each vertex has indices of 2 types: coordinate and triangle indices. Related functions are:
int getIndex(int num, int surface)- Now each vertex has indices of 2 types: coordinate and triangle indices. Related functions are:
-int getNumSurfaceTargets(int surface)
-const char * getSurfaceTargetName(int surface, int target)
-int findSurfaceTarget(const char * name, int surface)
Last update: 2017-07-03
Build: ()