CS::Mesh::AnimatedMeshTools Class Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Static Public Member Functions
CS::Mesh::AnimatedMeshTools Class Reference

Helper class to generate new CS::Mesh::iAnimatedMesh's. More...

`#include <cstool/animeshtools.h>`

List of all members.

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

## Detailed Description

Helper class to generate new CS::Mesh::iAnimatedMesh's.

Definition at line 45 of file animeshtools.h.

## Member Function Documentation

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.

Parameters:

  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.

Warning:
  You must still call iAnimatedMeshFactory::Invalidate() on baseMesh after the call to this method (eg after the creation of all morph targets).

Parameters:

  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.

Warning:
  The two animeshes must have the same vertices in the same order.

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.

Parameters:

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

Note:
  The animesh models with a different number of vertices than the base animesh won't be imported. These models are also supposed to have the same vertices in the same order.

The documentation for this class was generated from the following file:

- cstool/animeshtools.h