My Project
|
animated animation instance referenced in model object. More...
#include <XRefObject.h>
Public Member Functions | |
XRefAnimInstance (CMeshObject *pParent, AssetEntity *pModel, const Vector3 &vOrigin, const Matrix4 &mxLocalTransform) | |
virtual bool | SetParamsFromAsset () |
return true if asset effect type is known. More... | |
CAnimInstanceBase * | GetAnimInstance () |
get the animation instance. More... | |
CParaXAnimInstance * | GetParaXAnimInstance () |
get the ParaX animation instance. More... | |
void | DeleteAnimInstance () |
delete AnimInstance | |
CharModelInstance * | GetCharModelInstance () |
get the character model instance. More... | |
virtual void | Animate (double dTimeDelta, int nRenderNumber=0) |
animate the model More... | |
virtual HRESULT | Draw (SceneState *sceneState) |
draw the model | |
virtual HRESULT | DrawInner (SceneState *sceneState, const Matrix4 *pMxWorld=0, float fCameraToObjectDist=0.f) |
virtual bool | SetReplaceableTexture (int ReplaceableTextureID, TextureEntity *pTextureEntity) |
reset replaceable texture | |
virtual Matrix4 * | GetAttachmentMatrix (Matrix4 &pOut, int nAttachmentID=0, int nRenderNumber=0) |
Get the specified attachment matrix of the current model. More... | |
virtual void | SetAnimation (int nAnimID) |
Set the current animation id. More... | |
virtual int | GetAnimation () |
get the scaling. More... | |
virtual void | SetAnimFrame (int nFrame) |
set the current animation frame number relative to the beginning of current animation. More... | |
virtual int | GetAnimFrame () |
get the current animation frame number relative to the beginning of current animation. More... | |
virtual void | SetUseGlobalTime (bool bUseGlobalTime) |
whether to use global time to sync animation. More... | |
virtual bool | IsUseGlobalTime () |
whether to use global time to sync animation. More... | |
![]() | |
XRefObject (CMeshObject *pParent, AssetEntity *pModel, const Vector3 &vOrigin, const Matrix4 &mxLocalTransform) | |
CMeshObject * | GetParent () |
Get the parent object associated with this object. | |
AssetEntity * | GetModelAsset () |
return the model asset associated with this object | |
Matrix4 * | GetRenderMatrix (Matrix4 &mxWorld, const Matrix4 *pMxParent=NULL, int nRenderNumber=0) |
get matrix for rendering More... | |
Matrix4 & | GetLocalMatrix () |
get local matrix | |
Matrix4 * | GetMatrix (Matrix4 &mxWorld, const Matrix4 *pMatParent) |
get matrix relative to a parent matrix | |
virtual int | GetPrimaryTechniqueHandle () |
when batch-rendering a group of objects, objects are usually sorted by their render techniques and then by their primary asset. More... | |
virtual void | SetPrimaryTechniqueHandle (int nHandle) |
Set a new render technique handle. More... | |
Additional Inherited Members | |
![]() | |
asset_ptr< AssetEntity > | m_pModelEntity |
Vector3 | m_vOrigin |
the xrefed model's origin relative to its parent model. More... | |
Matrix4 | m_mxLocalTransform |
animated local transform: this is usually a const read from the model file | |
int | m_nTechniqueHandle |
the primary technique handle | |
CMeshObject * | m_pParent |
parent object | |
animated animation instance referenced in model object.
Parent(StaticMesh)–>Several Child(CParaXAnimInstance) V V MeshObject-------—>Several Child(XRefAnimInstance)
|
virtual |
|
virtual |
get the scaling.
Reimplemented from ParaEngine::XRefObject.
|
virtual |
get the current animation frame number relative to the beginning of current animation.
Reimplemented from ParaEngine::XRefObject.
CAnimInstanceBase * XRefAnimInstance::GetAnimInstance | ( | ) |
get the animation instance.
the size and speed of the animation and the biped object is not synchronized.
you need to manually get the current size and speed from the animation instance so that the biped and its animation instance could synchronize in action.
load the default animation
|
virtual |
Get the specified attachment matrix of the current model.
this is usually for getting the mount point on a certain model, such as horses. It also works for static mesh with xrefed mountable objects.
pOut | output result |
nAttachmentID | see ATTACHMENT_ID. default to 0, which is general mount point. ATT_ID_MOUNT1-9(20-28) is another mount points |
nRenderNumber | if it is bigger than current calculated render number, the value will be recalculated. |
Reimplemented from ParaEngine::XRefObject.
CharModelInstance * XRefAnimInstance::GetCharModelInstance | ( | ) |
get the character model instance.
This function will return NULL, if there is not a character model instance associated with this node
CParaXAnimInstance * XRefAnimInstance::GetParaXAnimInstance | ( | ) |
get the ParaX animation instance.
This function will return NULL, if it is not a ParaX AnimInstance one can then check whether the model has mount point.
|
virtual |
whether to use global time to sync animation.
Default to false. if true, all characters plays exactly the same frames if they are using the same animation file at all times, if false, each character advances its time frame separately according to their visibility in the scene.
Reimplemented from ParaEngine::XRefObject.
|
virtual |
Set the current animation id.
nAnimID | 0 is default standing animation. 4 is walking, 5 is running. more information, please see AnimationID |
Reimplemented from ParaEngine::XRefObject.
|
virtual |
set the current animation frame number relative to the beginning of current animation.
nFrame | 0 means beginning. if nFrame is longer than the current animation length, it will wrap (modulate the length). |
Reimplemented from ParaEngine::XRefObject.
|
virtual |
return true if asset effect type is known.
and false in case the asset is not loaded yet.
load the default animation
load the default animation
Reimplemented from ParaEngine::XRefObject.
|
virtual |
whether to use global time to sync animation.
Default to false. if true, all characters plays exactly the same frames if they are using the same animation file at all times, if false, each character advances its time frame separately according to their visibility in the scene.
Reimplemented from ParaEngine::XRefObject.