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
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials
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::MeshSkinned Class

Interface for mesh skinned manipulation.

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

Related classes:
Unigine::MeshSkinned::Frame
Unigine::MeshSkinned::Vertex
Unigine::MeshSkinned::Weight

Unigine::MeshSkinned Class

Members


virtual ~MeshSkinned ()

Virtual destructor.

static Ptr< MeshSkinned > create ()

MeshSkinned constructor.

Return value

Pointer to the created mesh.

virtual int info (const char * name) const =0

Info the mesh.

Arguments

  • const char * name - Mesh name.

Return value

Returns 1 if the operation was a success; otherwise, 0 is returned.

virtual int load (const char * name) const =0

Load the mesh.

Arguments

  • const char * name - MeshSkinned name.

Return value

Returns 1 if the operation was a success; otherwise, 0 is returned.

virtual int save (const char * name) const =0

Save the mesh.

Arguments

  • const char * name - MeshSkinned name.

Return value

Returns 1 if the operation was a success; otherwise, 0 is returned.

virtual void clear () const =0

Clear the mesh.

virtual int getNumFrames () const =0

Return the number of mesh frames.

Return value

The number of frames.

virtual int getNumBones () const =0

Return the number of bones.

Return value

The number of bones.

virtual int findBone (const char * name) const =0

Find a bone by its name.

Arguments

  • const char * name - Bone name.

Return value

Bone number.

virtual const char * getBoneName (int bone) const =0

Return the bone name.

Arguments

  • int bone - Bone number.

Return value

Bone name.

virtual int getBoneParent (int bone) const =0

Return the bone parent.

Arguments

  • int bone - Bone number.

Return value

Bone parent.

virtual int getNumBoneChilds (int bone) const =0

Return the number of children bones.

Arguments

  • int bone - Bone number.

Return value

The number of children.

virtual int getBoneChild (int bone, int child) const =0

Return a given child bone.

Arguments

  • int bone - Bone number.
  • int child - Child bone number.

Return value

The child bone.

virtual int getNumSurfaces () const =0

Return the number of object surfaces.

Return value

The number of surfaces.

virtual int findSurface (const char * name) const =0

Find an object surface by its name.

Arguments

  • const char * name - Surface name.

Return value

Surface number.

virtual const char * getSurfaceName (int surface) const =0

Return the object surface name.

Arguments

  • int surface - Surface number.

Return value

Surface name.

virtual int addBone (const char * name, int parent) const =0

Append a new bone.

Arguments

  • const char * name - Bone name.
  • int parent - Bone parent number.

Return value

Bone number.

virtual int addFrame (const Frame * frame) const =0

Append a new frame.

Arguments

  • const Frame * frame - Frame pointer.

Return value

Frame number.

virtual int addMeshFrame (Ptr< MeshSkinned > mesh, int frame) const =0

Append a new frame.

Arguments

  • Ptr< MeshSkinned > mesh - MeshSkinned pointer.
  • int frame - MeshSkinned frame number.

Return value

Frame number.

virtual void setSurfaceTransform (const mat4 & transform, int surface) const =0

Transform the mesh surface.

Arguments

  • const mat4 & transform - Transformation matrix.
  • int surface - The surface number.

virtual int addMeshSurface (const char * name, Ptr< MeshSkinned > mesh, int surface) const =0

Append a new mesh surface into the mesh.

Arguments

  • const char * name - New surface name.
  • Ptr< MeshSkinned > mesh - Pointer to the source MeshSkinned.
  • int surface - Surface number in the source MeshSkinned.

Return value

New surface number.

virtual int addMeshSurface (int dest_surface, Ptr< MeshSkinned > mesh, int surface) const =0

Append a mesh surface geometry into the mesh.

Arguments

  • int dest_surface - Destination surface number.
  • Ptr< MeshSkinned > mesh - MeshSkinned pointer.
  • int surface - MeshSkinned surface number.

Return value

Mesh surface number.

virtual int addEmptySurface (const char * name, int num_vertex, int num_indices) const =0

Append a new surface into the mesh.

Arguments

  • const char * name - New surface name.
  • int num_vertex - Vertex number.
  • int num_indices - Indices number.

Return value

Mesh surface number.

virtual int addTriangleSurface (const char * name, const Vertex * vertex, int num_vertex, int cache) const =0

Append a new surface into the mesh.

Arguments

  • const char * name - New surface name.
  • const Vertex * vertex - Vertex pointer.
  • int num_vertex - Vertex number.
  • int cache - Vertex cache optimization.

Return value

Mesh surface number.

virtual int addTriangleSurface (const char * name, const Vertex * vertex, int num_vertex, const int * indices, int num_indices) const =0

Append a new surface into the mesh.

Arguments

  • const char * name - New surface name.
  • const Vertex * vertex - Vertex pointer.
  • int num_vertex - Vertex number.
  • const int * indices - Index pointer.
  • int num_indices - Index number.

Return value

Mesh surface number.

virtual int getNumVertex (int surface) const =0

Return the number of mesh vertices.

Arguments

  • int surface - The surface number.

Return value

The number of vertices.

virtual void setVertex (int num, const vec3 & xyz, int surface) const =0

Update the vertex coordinates of the given vertex.

Arguments

  • int num - Vertex number.
  • const vec3 & xyz - Vertex coordinates.
  • int surface - Surface number.

virtual vec3 getVertex (int num, int surface) const =0

Return the vertex coordinates.

Arguments

  • int num - Vertex number.
  • int surface - Surface number.

Return value

Vertex coordinates.

virtual void setNormal (int num, const vec3 & normal, int surface) const =0

Update the vertex normal of the given vertex.

Arguments

  • int num - Vertex number.
  • const vec3 & normal - Vertex normal.
  • int surface - Surface number.

virtual vec3 getNormal (int num, int surface) const =0

Return the vertex normal.

Arguments

  • int num - Vertex number.
  • int surface - Surface number.

Return value

Vertex normal.

virtual void setTangent (int num, const vec4 & tangent, int surface) const =0

Update the vertex tangent of the given vertex.

Arguments

  • int num - Vertex number.
  • const vec4 & tangent - Vertex tangent.
  • int surface - Surface number.

virtual vec4 getTangent (int num, int surface) const =0

Return the vertex tangent.

Arguments

  • int num - Vertex number.
  • int surface - Surface number.

Return value

Vertex tangent.

virtual void setTexCoord (int num, const vec4 & texcoord, int surface) const =0

Update the vertex texture coordinates of the given vertex.

Arguments

  • int num - Vertex number.
  • const vec4 & texcoord - Vertex texture coordinates.
  • int surface - Surface number.

virtual vec4 getTexCoord (int num, int surface) const =0

Return the vertex texture coordinates.

Arguments

  • int num - Vertex number.
  • int surface - Surface number.

Return value

Vertex texture coordinates.

virtual void setNumWeights (int num, int num_weights, int surface) const =0

Update the vertex number of weights of the given vertex.

Arguments

  • int num - Vertex number.
  • int num_weights - Number of weights.
  • int surface - Surface number.

virtual int getNumWeights (int num, int surface) const =0

Return the vertex bone number of weights.

Arguments

  • int num - Vertex number.
  • int surface - Surface number.

Return value

The number of weights.

virtual void setWeights (int num, const vec4 & weights, int surface) const =0

Update the vertex bone weights of the given vertex.

Arguments

  • int num - Vertex number.
  • const vec4 & weights - Vertex bone weights.
  • int surface - Surface number.

virtual vec4 getWeights (int num, int surface) const =0

Return the vertex bone weights.

Arguments

  • int num - Vertex number.
  • int surface - Surface number.

Return value

Vertex bone weights.

virtual void setBones (int num, const ivec4 & bones, int surface) const =0

Update the vertex bone indices of the given vertex.

Arguments

  • int num - Vertex number.
  • const ivec4 & bones - Vertex bone indices.
  • int surface - Surface number.

virtual ivec4 getBones (int num, int surface) const =0

Return the vertex bone indices.

Arguments

  • int num - Vertex number.
  • int surface - Surface number.

Return value

Vertex bone indices.

virtual int getNumIndices (int surface) const =0

Return the number of vertex indices in the mesh.

Arguments

  • int surface - Vertex number.

Return value

The number of indices.

virtual void setIndex (int num, int index, int surface) const =0

Update an index of the given vertex in the index buffer.

Arguments

  • int num - Vertex number.
  • int index - Index of the vertex in the vertex buffer.
  • int surface - Surface number.

virtual int getIndex (int num, int surface) const =0

Return an index of the given vertex from the index buffer.

Arguments

  • int num - Vertex number.
  • int surface - Surface number.

Return value

Index of the vertex in the vertex buffer.
Last update: 2017-07-03
Build: ()