![]() |
Public API Reference |
![]() |
Helper class to generate new CS::Mesh::iAnimatedMesh's. More...
#include <cstool/animeshtools.h>
Static Public Member Functions | |
static csPtr < iAnimatedMeshFactory > | ImportGeneralMesh (iObjectRegistry *object_reg, iGeneralFactoryState *genmesh, bool deleteMesh=true) |
Create a new animesh from a genmesh. | |
static bool | ImportMorphMesh (iObjectRegistry *object_reg, iAnimatedMeshFactory *baseMesh, iAnimatedMeshFactory *morphMesh, const char *morphName, bool deleteMesh=true) |
Create a new morph target in an animesh by importing the vertices from another animesh. | |
static csPtr < iAnimatedMeshFactory > | ImportSplitMorphMesh (iObjectRegistry *object_reg, const char *path, const char *baseMesh, const char *factoryName, const char *meshMask="") |
Import a mesh with its morph targets split in several different model files. |
Helper class to generate new CS::Mesh::iAnimatedMesh's.
Definition at line 45 of file animeshtools.h.
static csPtr<iAnimatedMeshFactory> CS::Mesh::AnimatedMeshTools::ImportGeneralMesh | ( | iObjectRegistry * | object_reg, |
iGeneralFactoryState * | genmesh, | ||
bool | deleteMesh = true |
||
) | [static] |
Create a new animesh from a genmesh.
It imports only the mesh part of the genmesh (ie vertices, indices, etc), not the animations.
object_reg | The object registry |
genmesh | The genmesh to be imported |
deleteMesh | Whether or not the genmesh will be deleted after the call to this method. If true, then it allows to reuse the render buffers of this mesh, this is therefore more optimal. |
static bool CS::Mesh::AnimatedMeshTools::ImportMorphMesh | ( | iObjectRegistry * | object_reg, |
iAnimatedMeshFactory * | baseMesh, | ||
iAnimatedMeshFactory * | morphMesh, | ||
const char * | morphName, | ||
bool | deleteMesh = true |
||
) | [static] |
Create a new morph target in an animesh by importing the vertices from another animesh.
object_reg | The object registry |
baseMesh | The base animesh where the morph target will be imported. |
morphMesh | The animesh to import into the other as a new morph target. |
morphName | The name of the new morph target |
deleteMesh | Whether or not the animesh morphMesh will be deleted after the call to this method. If true, then it allows to reuse the render buffers of this mesh, this is therefore more optimal. |
static csPtr<iAnimatedMeshFactory> CS::Mesh::AnimatedMeshTools::ImportSplitMorphMesh | ( | iObjectRegistry * | object_reg, |
const char * | path, | ||
const char * | baseMesh, | ||
const char * | factoryName, | ||
const char * | meshMask = "" |
||
) | [static] |
Import a mesh with its morph targets split in several different model files.
This is useful eg to load directly models from the FaceGen software.
The system will scan the provided directory, and load all animesh model files matching the given mask. All these animeshes will be imported in the base animesh as a new morph target instead of a new animesh.
object_reg | The object registry |
path | A VFS path to the directory containing all the data files |
baseMesh | The name of the file defining the base animesh where all morph targets will be imported. |
factoryName | Name to be given to the newly created animesh factory. |
meshMask | A regular expression to determine which files should be imported as a new morph target. Use for example ".*[.]3[dD][sS]" if you want all files terminating by ".3ds" or ".3DS". If you provide an empty mask, then a new one will be built based on baseMesh . |