ICharacterInstance

ICharacterInstanceabstract

#include

Inherits IMeshObj.

Public Member Functions

virtual ISkeletonAnim * GetISkeletonAnim ()=0
virtual const ISkeletonAnim * GetISkeletonAnim () const =0
virtual ISkeletonPose * GetISkeletonPose ()=0
virtual const ISkeletonPose * GetISkeletonPose () const =0
virtual IAttachmentManager * GetIAttachmentManager ()=0
virtual const IAttachmentManager * GetIAttachmentManager () const =0
virtual IDefaultSkeleton & GetIDefaultSkeleton ()=0
virtual const IDefaultSkeleton & GetIDefaultSkeleton () const =0
virtual IAnimationSet * GetIAnimationSet ()=0
virtual const IAnimationSet * GetIAnimationSet () const =0
virtual const char * GetModelAnimEventDatabase () const =0
virtual void EnableStartAnimation (bool bEnable)=0
Enables/disables StartAnimation* calls; puts warning into the log if StartAnimation* is called while disabled.
virtual void StartAnimationProcessing (const SAnimationProcessParams &params)=0
virtual CLodValue ComputeLod (int wantedLod, const SRenderingPassInfo &passInfo)=0
Computes the render LOD from the wanted LOD value.
virtual void Render (const SRendParams &RendParams, const SRenderingPassInfo &passInfo)=0
virtual void SetFlags (int nFlags)=0
virtual int GetFlags () const =0
virtual int GetObjectType () const =0
virtual const char * GetFilePath () const =0
virtual SMeshLodInfo ComputeGeometricMean () const =0
virtual bool HasVertexAnimation () const =0
virtual IMaterial * GetIMaterial () const =0
virtual void SetIMaterial_Instance (IMaterial *pMaterial)=0
virtual IMaterial * GetIMaterial_Instance () const =0
virtual IFacialInstance * GetFacialInstance ()=0
virtual const IFacialInstance * GetFacialInstance () const =0
virtual void EnableFacialAnimation (bool bEnable)=0
virtual void EnableProceduralFacialAnimation (bool bEnable)=0
virtual void SetPlaybackScale (f32 fSpeed)=0
virtual f32 GetPlaybackScale () const =0
virtual uint32 IsCharacterVisible () const =0
virtual void SpawnSkeletonEffect (const AnimEventInstance &animEvent, const QuatTS &entityLoc)=0
virtual void KillAllSkeletonEffects ()=0
virtual void SetViewdir (const Vec3 &rViewdir)=0
virtual float GetUniformScale () const =0
virtual void CopyPoseFrom (const ICharacterInstance &instance)=0
virtual void FinishAnimationComputations ()=0
virtual void SetAttachmentLocation_DEPRECATED (const QuatTS &newCharacterLocation)=0
virtual void OnDetach ()=0
Called when the character is detached (if it was an attachment).
virtual void HideMaster (uint32 h)=0
Disable rendering of this render this instance.
virtual void GetMemoryUsage (class ICrySizer *pSizer) const =0
Pushes the underlying tree of objects into the given Sizer object for statistics gathering.
virtual void Serialize (TSerialize ser)=0

Detailed Description

Interface to character animation. This interface contains methods for manipulating and querying an animated character instance. The methods allow to modify the animated instance, animate it, render, retrieve BBox/etc, control physics, particles and skinning, transform.

Member Function Documentation

◆ FinishAnimationComputations()

virtual void ICharacterInstance::FinishAnimationComputations ( )
pure virtual

Makes sure all functions which must be called after forward kinematics are executed and also synchronizes the execution. Is called during GetISkeletonAnim and GetISkeletonPose if the bNeedSync flag is set to true(the default) to ensure all computations have finished when necessary.

◆ GetFilePath()

virtual const char* ICharacterInstance::GetFilePath ( ) const
pure virtual

Get the filename of the character. This is either the model path or the CDF path.

Returns
Pointer to a null terminated char string which contain the filename of the character.

◆ GetFlags()

virtual int ICharacterInstance::GetFlags ( ) const
pure virtual

Get the enabled rendering flags. The valid flags are the ones declared in ECharRenderFlags.

Returns
An integer value which holds the different rendering flags

◆ GetIAnimationSet()

virtual IAnimationSet* ICharacterInstance::GetIAnimationSet ( )
pure virtual

Get the Animation Set defined for the model. Return a pointer of the instance of an ICryAnimationSet derived class applicable for the model.

Returns
Pointer to a ICryAnimationSet derived class.

◆ GetIAttachmentManager()

virtual IAttachmentManager* ICharacterInstance::GetIAttachmentManager ( )
pure virtual

Get the attachment manager for this instance. Return a pointer of the instance of an IAttachmentManager derived class applicable for the model.

Returns
Pointer to an IAttachmentManager derived class.

◆ GetIDefaultSkeleton()

virtual IDefaultSkeleton& ICharacterInstance::GetIDefaultSkeleton ( )
pure virtual
Returns
the shared character model used by this instance.

◆ GetIMaterial()

virtual IMaterial* ICharacterInstance::GetIMaterial ( ) const
pure virtual

Returns material used to render this character, can be either a custom or model material.

Returns
Pointer to an IMaterial class.

◆ GetIMaterial_Instance()

virtual IMaterial* ICharacterInstance::GetIMaterial_Instance ( ) const
pure virtual

Returns the instance specific material - if this is 0, then the default model material is in use.

Returns
Pointer to the material, or 0.

◆ GetISkeletonAnim()

virtual ISkeletonAnim* ICharacterInstance::GetISkeletonAnim ( )
pure virtual

Get the skeleton for this instance. Return a pointer of the instance of an ISkeletonAnim derived class applicable for the model.

Returns
Pointer to an ISkeletonAnim derived class.

◆ GetISkeletonPose()

virtual ISkeletonPose* ICharacterInstance::GetISkeletonPose ( )
pure virtual

Get the skeleton for this instance. Return a pointer of the instance of an ISkeletonPose derived class applicable for the model.

Returns
Pointer to an ISkeletonPose derived class.

◆ GetModelAnimEventDatabase()

virtual const char* ICharacterInstance::GetModelAnimEventDatabase ( ) const
pure virtual

Get the animation event file Get the name of the file that stores the animation event definitions for this model. This is usually stored in the CHRPARAMS file

Returns
Pointer to a null terminated char string which contains the filename of the database

◆ GetObjectType()

virtual int ICharacterInstance::GetObjectType ( ) const
pure virtual

Get the object type contained inside the character instance. It will return either the CHR or CGA constant.

Returns
Object type constant

◆ Render()

virtual void ICharacterInstance::Render ( const SRendParams & RendParams,
const SRenderingPassInfo & passInfo
)
pure virtual

Draw the character using specified rendering parameters.

Parameters
RendParamsRendering parameters.

◆ SetFlags()

virtual void ICharacterInstance::SetFlags ( int nFlags)
pure virtual

Set rendering flags defined in ECharRenderFlags for this character instance

Parameters
nFlagsRendering flags

◆ SetIMaterial_Instance()

virtual void ICharacterInstance::SetIMaterial_Instance ( IMaterial * pMaterial)
pure virtual

Set custom instance material for this character.

Parameters
pMaterialA valid pointer to the material.

◆ SetPlaybackScale()

virtual void ICharacterInstance::SetPlaybackScale ( f32 fSpeed)
pure virtual

Set animation speed scale. This is the scale factor that affects the animation speed of the character. All the animations are played with the constant real-time speed multiplied by this factor. So, 0 means still animations (stuck at some frame), 1 - normal, 2 - twice as fast, 0.5 - twice slower than normal.