Represents the current pose of a character instance, allowing retrieval of the latest animation pose. More...
#include
Inherits ISkeletonPhysics.
Public Member Functions | |
virtual const QuatT & | GetAbsJointByID (int32 nJointID) const =0 |
virtual const QuatT & | GetRelJointByID (int32 nJointID) const =0 |
virtual Diag33 | GetAbsJointScalingByID (int32 jointId) const =0 |
virtual Diag33 | GetRelJointScalingByID (int32 jointId) const =0 |
virtual void | SetPostProcessCallback (int(*func)(ICharacterInstance *, void *), void *pdata)=0 |
virtual void | SetForceSkeletonUpdate (int32 numFrames)=0 |
virtual void | SetDefaultPose ()=0 |
virtual void | SetStatObjOnJoint (int32 nId, IStatObj *pStatObj)=0 |
virtual IStatObj * | GetStatObjOnJoint (int32 nId)=0 |
virtual const IStatObj * | GetStatObjOnJoint (int32 nId) const =0 |
virtual void | SetMaterialOnJoint (int32 nId, IMaterial *pMaterial)=0 |
virtual IMaterial * | GetMaterialOnJoint (int32 nId)=0 |
virtual const IMaterial * | GetMaterialOnJoint (int32 nId) const =0 |
virtual void | DrawSkeleton (const Matrix34 &rRenderMat34, uint32 shift=0)=0 |
virtual IAnimationPoseBlenderDir * | GetIPoseBlenderAim ()=0 |
virtual const IAnimationPoseBlenderDir * | GetIPoseBlenderAim () const =0 |
virtual IAnimationPoseBlenderDir * | GetIPoseBlenderLook ()=0 |
virtual const IAnimationPoseBlenderDir * | GetIPoseBlenderLook () const =0 |
virtual void | ApplyRecoilAnimation (f32 fDuration, f32 fKinematicImpact, f32 fKickIn, uint32 arms=3)=0 |
virtual uint32 | SetHumanLimbIK (const Vec3 &wgoal, const char *limb)=0 |
Public Member Functions inherited from ISkeletonPhysics | |
virtual void | BuildPhysicalEntity (IPhysicalEntity *pent, f32 mass, int surface_idx, f32 stiffness_scale=1.0f, int nLod=0, int partid0=-1, const Matrix34 &mtxloc=Matrix34(IDENTITY))=0 |
virtual IPhysicalEntity * | CreateCharacterPhysics (IPhysicalEntity *pHost, f32 mass, int surface_idx, f32 stiffness_scale, int nLod=0, const Matrix34 &mtxloc=Matrix34(IDENTITY))=0 |
virtual int | CreateAuxilaryPhysics (IPhysicalEntity *pHost, const Matrix34 &mtx, int nLod=0)=0 |
virtual IPhysicalEntity * | GetCharacterPhysics () const =0 |
virtual IPhysicalEntity * | GetCharacterPhysics (const char *pRootBoneName) const =0 |
virtual IPhysicalEntity * | GetCharacterPhysics (int iAuxPhys) const =0 |
virtual void | SetCharacterPhysics (IPhysicalEntity *pent)=0 |
virtual void | SynchronizeWithPhysicalEntity (IPhysicalEntity *pent, const Vec3 &posMaster=Vec3(ZERO), const Quat &qMaster=Quat(1, 0, 0, 0))=0 |
virtual IPhysicalEntity * | RelinquishCharacterPhysics (const Matrix34 &mtx, f32 stiffness=0.0f, bool bCopyJointVelocities=false, const Vec3 &velHost=Vec3(ZERO))=0 |
virtual void | DestroyCharacterPhysics (int iMode=0)=0 |
virtual bool | AddImpact (int partid, Vec3 point, Vec3 impact)=0 |
virtual int | TranslatePartIdToDeadBody (int partid)=0 |
virtual int | GetAuxPhysicsBoneId (int iAuxPhys, int iBone=0) const =0 |
virtual bool | BlendFromRagdoll (QuatTS &location, IPhysicalEntity *&pPhysicalEntity, bool b3dof)=0 |
virtual int | GetFallingDir () const =0 |
virtual int | getBonePhysParentOrSelfIndex (int nBoneIndex, int nLod=0) const =0 |
virtual int | GetBoneSurfaceTypeId (int nBoneIndex, int nLod=0) const =0 |
virtual IPhysicalEntity * | GetPhysEntOnJoint (int32 nId)=0 |
virtual const IPhysicalEntity * | GetPhysEntOnJoint (int32 nId) const =0 |
virtual void | SetPhysEntOnJoint (int32 nId, IPhysicalEntity *pPhysEnt)=0 |
virtual int | GetPhysIdOnJoint (int32 nId) const =0 |
virtual DynArray< SJointProperty > | GetJointPhysProperties_ROPE (uint32 jointIndex, int nLod) const =0 |
virtual bool | SetJointPhysProperties_ROPE (uint32 jointIndex, int nLod, const DynArray< SJointProperty > &props)=0 |
Represents the current pose of a character instance, allowing retrieval of the latest animation pose.
|
pure virtual |
Retrieves location of the specified joint in model-space. The location is in the runtime pose, not the default pose. To get the location in the default pose, retrieve it from ICharacterInstance::GetIDefaultSkeleton.
This function is safe to call while the animation job is running; if you do so it will simply return the previous frame's data. New data is returned only after the job has been synchronized (ICharacterInstance::FinishAnimationComputations has been called, or we are in the PostProcess callback).
nJointID. | Behavior is undefined when the nJointID is invalid. |
#include
// Basic example of how the absolute joint orientation can be retrieved from a character's current pose
void GetJointOrientation(ICharacterInstance& character)
{
// Get the default skeleton, a read-only construct in which we can get joint identifiers from names
const IDefaultSkeleton& defaultSkeleton = character.GetIDefaultSkeleton();
// Get the internal identifier of our joint, labeled in the DCC (Max / Maya for example)
const int32 jointId = defaultSkeleton.GetJointIDByName("Bip 01 Head");
// Get the orientation of the joint in world coordinates
const QuatT& jointOrientation = character.GetISkeletonPose()->GetAbsJointByID(jointId);
// jointOrientation.q contains a quaternion with the world-space rotation of the joint
const Quat& jointRotation = jointOrientation.q;
// jointOrientation.t contains a vector with the world-space position of the joint
const Vec3& jointPosition = jointOrientation.t;
}
|
pure virtual |
Gets the pose modifier used to target gun aiming at a specific world coordinate
|
pure virtual |
Gets the pose modifier used to target gun aiming at a specific world coordinate
|
pure virtual |
Gets the pose modifier used to target look aim at a specific world coordinate
|
pure virtual |
Gets the pose modifier used to target look aim at a specific world coordinate
|
pure virtual |
Retrieves location of the specified joint in parent-joint space. The location is in the runtime pose, not the default pose. To get the location in the default pose, retrieve it from ICharacterInstance::GetIDefaultSkeleton.
This function is safe to call while the animation job is running; if you do so it will simply return the previous frame's data. New data is returned only after the job has been synchronized (ICharacterInstance::FinishAnimationComputations has been called, or we are in the PostProcess callback).
nJointID. | Behavior is undefined when the nJointID is invalid. |
|
pure virtual |
Force updates of the skeleton pose (even when invisible). Note that this is not recommended. If possible use CA_FORCE_SKELETON_UPDATE when starting animations that need an update.
numFrames | Number of frames to force the update. Use ISkeletonPose::kForceSkeletonUpdatesInfinitely to force it on all the time. |