Supplying external animation loaded from ParaX or BVH files.
More...
#include <BoneAnimProvider.h>
Supplying external animation loaded from ParaX or BVH files.
Such animation can be shared by any animation instances. Providers can also be loaded dynamically; some special animation provider can be composed by user at runtime; some may be automatically generated from the physics engine.
- Note
- : each instance of CBoneAnimProvider has two keys, one is id(primary and unique), the other is name(optional)
§ MergeMode
how bone animation is meant to be used with a parax model.
Enumerator |
---|
MergeMode_ReplaceExisting | replace the target model with all existing bones defined in the provider
|
MergeMode_ReplaceALL | replace the target model with all bones.
|
§ CBoneAnimProvider()
CBoneAnimProvider::CBoneAnimProvider |
( |
int |
nAnimID, |
|
|
const char * |
name, |
|
|
const char * |
filename |
|
) |
| |
new an animation provider from file.
- Parameters
-
nAnimID | -1 if one wants it to be automatically assigned. otherwise one can manually specify one. Please note, if there is already a provider with the same ID, the old one is automatically released and replaced with the new one. |
name | optional key. Allowing user to query by a user friendly name. This can be NULL. |
filename | from which file the animation data is loaded. It can be a ParaX animation file or BVH file. |
§ CleanupAllProviders()
bool ParaEngine::CBoneAnimProvider::CleanupAllProviders |
( |
| ) |
|
|
static |
§ CreateProvider()
CBoneAnimProvider * ParaEngine::CBoneAnimProvider::CreateProvider |
( |
int |
nAnimID, |
|
|
const char * |
name, |
|
|
const char * |
filename, |
|
|
bool |
bOverwrite = false |
|
) |
| |
|
static |
Create an animation provider from file.
- Parameters
-
nAnimID | -1 if one wants it to be automatically assigned. otherwise one can manually specify one. Please note, if there is already a provider with the same ID, the old one is automatically released and replaced with the new one. |
name | optional key. Allowing user to query by a user friendly name. This can be NULL. |
filename | from which file the animation data is loaded. It can be a ParaX animation file or BVH file. |
bOverwrite | whether to overwrite existing with the same nAnimID or name |
§ DeleteProvider()
bool ParaEngine::CBoneAnimProvider::DeleteProvider |
( |
int |
nAnimID | ) |
|
|
static |
delete a provider by ID.
- Returns
- : return true if succeed.
§ GetAnimIndex()
AnimIndex CBoneAnimProvider::GetAnimIndex |
( |
int |
nSubAnimID = 0 | ) |
|
- Parameters
-
nSubAnimID | in most cases this is 0 |
§ GetAnimMoveSpeed()
void CBoneAnimProvider::GetAnimMoveSpeed |
( |
float * |
pSpeed, |
|
|
int |
nSubAnimID = 0 |
|
) |
| |
get the character move speed in the animation.
- Parameters
-
nSubAnimID | in most cases this is 0 |
pSpeed | out value |
§ GetBoneByIndex()
Bone * ParaEngine::CBoneAnimProvider::GetBoneByIndex |
( |
int |
nIndex | ) |
|
get bone by index.
return NULL if no bones at the index
§ GetMergeMode()
how bone animation is meant to be used with a parax model.
§ GetProviderByID()
get the provider by its ID.
function may return NULL if the ID does not exist.
§ GetProviderIDByName()
int ParaEngine::CBoneAnimProvider::GetProviderIDByName |
( |
const char * |
sName | ) |
|
|
static |
Get provider id by name.
Name is used when creating the provider instance. It is usually the same as the file path from which animation data is loaded. return -1 if not found
§ GetSubAnimID()
int ParaEngine::CBoneAnimProvider::GetSubAnimID |
( |
| ) |
|
sub animation ID.
default to 0. In most cases, a bone animation provider contains only one animation sequence whose ID is 0. however, some provider may contain multiple animation ID.
§ SetSubAnimID()
void ParaEngine::CBoneAnimProvider::SetSubAnimID |
( |
int |
nID | ) |
|
sub animation ID.
default to 0. In most cases, a bone animation provider contains only one animation sequence whose ID is 0. however, some provider may contain multiple animation ID.
The documentation for this class was generated from the following files:
- Client/trunk/ParaEngineClient/ParaXModel/BoneAnimProvider.h
- Client/trunk/ParaEngineClient/ParaXModel/BoneAnimProvider.cpp