TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
List of all members
iCharacter Struct Referenceabstract
Inheritance diagram for iCharacter:
iUnknown

Detailed Description

Character interface.

General

virtual iCharacterFactoryGetCharacterFactory () const =0
 Get the parent character factory. {Property}. More...
 
virtual void Update (tF32 fFrameTime)=0
 Update the model. More...
 
virtual void UpdateEx (tF32 fFrameTime, tU32 anFrameCount)=0
 Update the model with frame count. More...
 
virtual void UpdateAnimationMixer (tF32 fFrameTime, tU32 anFrameCount)=0
 Update only the animation mixer. More...
 
virtual tBool UpdateNodeAnimation (tU32 anIndex, tBool abForceStatic)=0
 Update only the transform of the specified node. More...
 
virtual iBoundingVolumeGetLocalBoundingVolume () const =0
 Get the local bounding volume of this object. {Property}. More...
 
virtual iBoundingVolumeGetBoundingVolume () const =0
 Get the world bounding volume of this object. {Property}. More...
 
virtual void SetTransform (iTransform *apTransform)=0
 Set the character's transform. {Property}. More...
 
virtual iTransformGetTransform () const =0
 Get the character's transform. {Property}. More...
 
virtual tBool SetAnimationMixer (iAnimationMixer *apMixer)=0
 Set the character's animation mixer. {Property}. More...
 
virtual iAnimationMixerGetAnimationMixer () const =0
 Get the character's animation mixer. {Property}. More...
 
virtual tBool SetMaterialLibrary (iMaterialLibrary *apMatLib)=0
 Set the material library of the character. {Property}. More...
 
virtual iMaterialLibraryGetMaterialLibrary () const =0
 Get the material library of the character. {Property}. More...
 

Instance

virtual ni::tU32 GetInstanceFlags () const =0
 Get whether the character is an instance. {Property}. More...
 
virtual iCharacterGetBaseCharacter () const =0
 Get the base character if the character is an instance. {Property}. More...
 
virtual iCharacterCreateInstance (tCharacterInstanceFlags aInstanceFlags) const =0
 Create an instance of this character. More...
 

Nodes

virtual iCharacterNodeGetRootNode () const =0
 Get the root node. {Property}. More...
 
virtual tU32 GetNumNodes () const =0
 Get the number of nodes in the character. {Property}. More...
 
virtual iCharacterNodeGetNode (tU32 anIndex) const =0
 Get the node at the specified index. {Property}. More...
 
virtual tU32 GetNodeIndex (iCharacterNode *apNode) const =0
 Get the index of the specified node. {Property}. More...
 
virtual tU32 GetNodeIndexFromName (iHString *ahspName) const =0
 Get the index of the specified node from a node name. {Property}. More...
 
virtual iCharacterNodeGetNodeFromName (iHString *ahspName) const =0
 Get the node with the specified name. {Property}. More...
 

Meshes

virtual tU32 GetNumMeshes () const =0
 Get the number of meshes. {Property}. More...
 
virtual void SetMeshMaterial (tU32 anMesh, tU32 anMat)=0
 Set the material index of a mesh. {Property}. More...
 
virtual tU32 GetMeshMaterial (tU32 anIndex) const =0
 Get the material index of a mesh. {Property}. More...
 
virtual tU32 GetMeshGeometry (tU32 anIndex) const =0
 Get the geometry index of a mesh. {Property}. More...
 
virtual tU32 GetMeshFirstIndex (tU32 anIndex) const =0
 Get the draw op first index of a mesh. {Property}. More...
 
virtual tU32 GetMeshNumIndices (tU32 anIndex) const =0
 Get the draw op num indices of a mesh. {Property}. More...
 
virtual iCollideShapeGetMeshCollideShape (tU32 anIndex) const =0
 Get the collide shape associated with a mesh. {Property}. More...
 
virtual iCharacterNodeGetMeshNode (tU32 anIndex) const =0
 Get the node associated with a mesh. More...
 
virtual iDrawOperationGetMeshDrawOperation (tU32 anIndex) const =0
 Get the draw operation associated with a mesh. More...
 
virtual iCollideObjectGetMeshCollideObject (tU32 anIndex) const =0
 Get the collide object associated with a mesh. More...
 
virtual iBoundingVolumeGetMeshBoundingVolume (tU32 anIndex) const =0
 Get the bounding volume associated with a mesh. More...
 
virtual tBool GetMeshWorldPos (tU32 anIndex) const =0
 Get whether the mesh's vertices are in world position. {Property}. More...
 

Geometries

virtual tU32 GetNumGeometries () const =0
 Get the number of geometries. {Property}. More...
 
virtual iGeometryGetGeometry (tU32 anIndex) const =0
 Get a geometry. {Property}. More...
 
virtual iGeometryGetGeometryBase (tU32 anIndex) const =0
 Get the base geometry of the specified geometry. {Property}. More...
 
virtual iGeometryModifierGetGeometryModifier (tU32 anIndex) const =0
 Get the geometry modifier of the specified geometry. {Property}. More...
 

Bones

virtual tU32 GetNumBones () const =0
 Get the number of bones in the character. {Property}. More...
 
virtual iCharacterNodeGetBoneNode (tU32 anIndex) const =0
 Get the node associated with a bone. {Property}. More...
 
virtual sMatrixf GetBoneOffsetMatrix (tU32 anIndex) const =0
 Get the offset matrix of a bone. {Property}. More...
 
virtual sMatrixf GetBoneInvRefMatrix (tU32 anIndex) const =0
 Get the inverse reference matrix of a bone. {Property}. More...
 
virtual void UpdateBoneMatrixPalette ()=0
 Force the matrix palette update. More...
 
virtual tMatrixfCVecGetBoneMatrixPalette () const =0
 Get the bone matrix palette. {Property}. More...
 

Entities

virtual void ClearEntities ()=0
 Remove all entities. More...
 
virtual tBool AddEntity (iDataTable *apEntity)=0
 Add an entity. More...
 
virtual tBool RemoveEntity (iDataTable *apEntity)=0
 Remove an entity. More...
 
virtual tU32 GetNumEntities () const =0
 Get the number of entities. {Property}. More...
 
virtual tU32 GetEntityIndex (iDataTable *apEntity) const =0
 Get the index of the specified entity. {Property}. More...
 
virtual iDataTableGetEntity (tU32 anIndex) const =0
 Get the entity at the specified index. {Property}. More...
 
virtual iDataTableGetEntityFromName (iHString *ahspName) const =0
 Get the first entity with the specified name. {Property}. More...
 

Instances and Rendering

virtual tBool FillDrawOpSet (iDrawOperationSet *apDrawOpSet, const iFrustum *apFrustum)=0
 Set the character in a draw operation set. More...
 

Initialization

virtual iCharacterNodeAddNode (iHString *ahspName, iHString *ahspParent, const sMatrixf &amtxNode)=0
 Add a node in the character. More...
 
virtual tBool CollapseNodeMeshes (iHString *ahspName)=0
 Collapse all the meshes of children node into the specified node. More...
 
virtual tBool RemoveEmptyNodes (iHString *ahspName, tBool abAllNoMeshes)=0
 Remove all empty nodes. More...
 
virtual tU32 RemoveEmptyMeshes ()=0
 Remove all empty meshes. More...
 
virtual tU32 AddBone (iHString *ahspBoneName, const sMatrixf &aBoneMatrix, const sMatrixf &aInvRefMatrix)=0
 Add a bone. More...
 
virtual tU32 AddMesh (iHString *ahspNodeName, tU32 anGeom, tU32 ulMaterial, tU32 ulFirstIdx, tU32 ulNumIdx, tBool abWorldPos)=0
 Add a mesh. More...
 
virtual tBool SortMeshesByMaterial (tU32 anFirstMesh, tU32 anNumMeshes)=0
 Sort meshes by material. More...
 
virtual tBool RemapMeshesIndicesFromSubsets (iGeometry *apGeom, tU32 anFirstSubset, tU32 anNumSubsets)=0
 Remap meshes indices from subsets. More...
 
virtual tU32 PackGeometry (iGeometry *apGeom, tU32 anFirstMesh, tU32 anNumMeshes, tU32 anGeomIndexBase, eArrayUsage aUsage, tFVF aBaseFVF, tFVF aDefaultFVF, tBool abOneFVF, tIUnknownCVec *apGeoms)=0
 Pack several meshes into several geometries. More...
 
virtual iGeometryPackSingleGeometry (iGeometry *apGeom, tU32 anFirstMesh, tU32 anNumMeshes, tU32 anGeomIndexBase, eArrayUsage aUsage, tFVF aBaseFVF, tFVF aDefaultFVF)=0
 Pack several meshes into a single geometry. More...
 
virtual tBool AddGeometry (iGeometry *apGeom, iGeometryModifier *apModifier)=0
 Add a geometry. More...
 
virtual tU32 AddPackedGeometry (iGeometry *apGeom, tU32 anFirstMesh, tU32 anNumMeshes, eArrayUsage aUsage, tFVF aBaseFVF, tFVF aDefaultFVF, tBool abOneFVF)=0
 Add a packed geometry. More...
 
virtual tU32 AddPackedSingleGeometry (iGeometry *apGeom, tU32 anFirstMesh, tU32 anNumMeshes, eArrayUsage aUsage, tFVF aBaseFVF, tFVF aDefaultFVF)=0
 Add a single geometry. More...
 
virtual tBool InitMeshCollisions (iCollideScene *apScene, tCollideMeshFlags aCollideMeshFlags)=0
 Init the collisions of the character. More...
 
virtual tBool InitMeshInstances (iCollideScene *apScene)=0
 Init the drawops and collisions of the mesh of character. More...
 
virtual tBool InitAnimations ()=0
 Init the animations. More...
 

Additional Inherited Members

- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Member Function Documentation

virtual iCharacterFactory* GetCharacterFactory ( ) const
pure virtual

Get the parent character factory. {Property}.

virtual void Update ( tF32  fFrameTime)
pure virtual

Update the model.

virtual void UpdateEx ( tF32  fFrameTime,
tU32  anFrameCount 
)
pure virtual

Update the model with frame count.

virtual void UpdateAnimationMixer ( tF32  fFrameTime,
tU32  anFrameCount 
)
pure virtual

Update only the animation mixer.

virtual tBool UpdateNodeAnimation ( tU32  anIndex,
tBool  abForceStatic 
)
pure virtual

Update only the transform of the specified node.

virtual iBoundingVolume* GetLocalBoundingVolume ( ) const
pure virtual

Get the local bounding volume of this object. {Property}.

virtual iBoundingVolume* GetBoundingVolume ( ) const
pure virtual

Get the world bounding volume of this object. {Property}.

virtual void SetTransform ( iTransform apTransform)
pure virtual

Set the character's transform. {Property}.

virtual iTransform* GetTransform ( ) const
pure virtual

Get the character's transform. {Property}.

virtual tBool SetAnimationMixer ( iAnimationMixer apMixer)
pure virtual

Set the character's animation mixer. {Property}.

virtual iAnimationMixer* GetAnimationMixer ( ) const
pure virtual

Get the character's animation mixer. {Property}.

virtual tBool SetMaterialLibrary ( iMaterialLibrary apMatLib)
pure virtual

Set the material library of the character. {Property}.

virtual iMaterialLibrary* GetMaterialLibrary ( ) const
pure virtual

Get the material library of the character. {Property}.

virtual ni::tU32 GetInstanceFlags ( ) const
pure virtual

Get whether the character is an instance. {Property}.

virtual iCharacter* GetBaseCharacter ( ) const
pure virtual

Get the base character if the character is an instance. {Property}.

virtual iCharacter* CreateInstance ( tCharacterInstanceFlags  aInstanceFlags) const
pure virtual

Create an instance of this character.

Remarks
InitMeshCollisions, InitMeshDrawOps and InitAnimations should be called after to setup collisions, rendering and animations.
virtual iCharacterNode* GetRootNode ( ) const
pure virtual

Get the root node. {Property}.

virtual tU32 GetNumNodes ( ) const
pure virtual

Get the number of nodes in the character. {Property}.

virtual iCharacterNode* GetNode ( tU32  anIndex) const
pure virtual

Get the node at the specified index. {Property}.

virtual tU32 GetNodeIndex ( iCharacterNode apNode) const
pure virtual

Get the index of the specified node. {Property}.

virtual tU32 GetNodeIndexFromName ( iHString ahspName) const
pure virtual

Get the index of the specified node from a node name. {Property}.

virtual iCharacterNode* GetNodeFromName ( iHString ahspName) const
pure virtual

Get the node with the specified name. {Property}.

virtual tU32 GetNumMeshes ( ) const
pure virtual

Get the number of meshes. {Property}.

virtual void SetMeshMaterial ( tU32  anMesh,
tU32  anMat 
)
pure virtual

Set the material index of a mesh. {Property}.

virtual tU32 GetMeshMaterial ( tU32  anIndex) const
pure virtual

Get the material index of a mesh. {Property}.

virtual tU32 GetMeshGeometry ( tU32  anIndex) const
pure virtual

Get the geometry index of a mesh. {Property}.

virtual tU32 GetMeshFirstIndex ( tU32  anIndex) const
pure virtual

Get the draw op first index of a mesh. {Property}.

virtual tU32 GetMeshNumIndices ( tU32  anIndex) const
pure virtual

Get the draw op num indices of a mesh. {Property}.

virtual iCollideShape* GetMeshCollideShape ( tU32  anIndex) const
pure virtual

Get the collide shape associated with a mesh. {Property}.

virtual iCharacterNode* GetMeshNode ( tU32  anIndex) const
pure virtual

Get the node associated with a mesh.

Remarks
Requires mesh instances to be initialized. {Property}
virtual iDrawOperation* GetMeshDrawOperation ( tU32  anIndex) const
pure virtual

Get the draw operation associated with a mesh.

Remarks
Requires mesh instances to be initialized. {Property}
virtual iCollideObject* GetMeshCollideObject ( tU32  anIndex) const
pure virtual

Get the collide object associated with a mesh.

Remarks
Requires mesh instances to be initialized. {Property}
virtual iBoundingVolume* GetMeshBoundingVolume ( tU32  anIndex) const
pure virtual

Get the bounding volume associated with a mesh.

Remarks
Requires mesh instances to be initialized. {Property}
virtual tBool GetMeshWorldPos ( tU32  anIndex) const
pure virtual

Get whether the mesh's vertices are in world position. {Property}.

virtual tU32 GetNumGeometries ( ) const
pure virtual

Get the number of geometries. {Property}.

virtual iGeometry* GetGeometry ( tU32  anIndex) const
pure virtual

Get a geometry. {Property}.

virtual iGeometry* GetGeometryBase ( tU32  anIndex) const
pure virtual

Get the base geometry of the specified geometry. {Property}.

virtual iGeometryModifier* GetGeometryModifier ( tU32  anIndex) const
pure virtual

Get the geometry modifier of the specified geometry. {Property}.

virtual tU32 GetNumBones ( ) const
pure virtual

Get the number of bones in the character. {Property}.

virtual iCharacterNode* GetBoneNode ( tU32  anIndex) const
pure virtual

Get the node associated with a bone. {Property}.

virtual sMatrixf GetBoneOffsetMatrix ( tU32  anIndex) const
pure virtual

Get the offset matrix of a bone. {Property}.

virtual sMatrixf GetBoneInvRefMatrix ( tU32  anIndex) const
pure virtual

Get the inverse reference matrix of a bone. {Property}.

virtual void UpdateBoneMatrixPalette ( )
pure virtual

Force the matrix palette update.

Remarks
This is updated when needed by iCharacter::Update.
virtual tMatrixfCVec* GetBoneMatrixPalette ( ) const
pure virtual

Get the bone matrix palette. {Property}.

virtual void ClearEntities ( )
pure virtual

Remove all entities.

virtual tBool AddEntity ( iDataTable apEntity)
pure virtual

Add an entity.

virtual tBool RemoveEntity ( iDataTable apEntity)
pure virtual

Remove an entity.

virtual tU32 GetNumEntities ( ) const
pure virtual

Get the number of entities. {Property}.

virtual tU32 GetEntityIndex ( iDataTable apEntity) const
pure virtual

Get the index of the specified entity. {Property}.

virtual iDataTable* GetEntity ( tU32  anIndex) const
pure virtual

Get the entity at the specified index. {Property}.

virtual iDataTable* GetEntityFromName ( iHString ahspName) const
pure virtual

Get the first entity with the specified name. {Property}.

virtual tBool FillDrawOpSet ( iDrawOperationSet apDrawOpSet,
const iFrustum apFrustum 
)
pure virtual

Set the character in a draw operation set.

virtual iCharacterNode* AddNode ( iHString ahspName,
iHString ahspParent,
const sMatrixf amtxNode 
)
pure virtual

Add a node in the character.

virtual tBool CollapseNodeMeshes ( iHString ahspName)
pure virtual

Collapse all the meshes of children node into the specified node.

Remarks
Collapse only world position nodes that are not animated.
virtual tBool RemoveEmptyNodes ( iHString ahspName,
tBool  abAllNoMeshes 
)
pure virtual

Remove all empty nodes.

Parameters
ahspNameis the name of the node where to start to remove empty nodes.
abAllNoMeshesspecify whether all nodes that dont have any mesh should be removed, or if the ones which dont have meshes but have custom data should be kept.
virtual tU32 RemoveEmptyMeshes ( )
pure virtual

Remove all empty meshes.

virtual tU32 AddBone ( iHString ahspBoneName,
const sMatrixf aBoneMatrix,
const sMatrixf aInvRefMatrix 
)
pure virtual

Add a bone.

virtual tU32 AddMesh ( iHString ahspNodeName,
tU32  anGeom,
tU32  ulMaterial,
tU32  ulFirstIdx,
tU32  ulNumIdx,
tBool  abWorldPos 
)
pure virtual

Add a mesh.

virtual tBool SortMeshesByMaterial ( tU32  anFirstMesh,
tU32  anNumMeshes 
)
pure virtual

Sort meshes by material.

virtual tBool RemapMeshesIndicesFromSubsets ( iGeometry apGeom,
tU32  anFirstSubset,
tU32  anNumSubsets 
)
pure virtual

Remap meshes indices from subsets.

Remarks
The subset's ID is interpreted as the character's mesh index.
virtual tU32 PackGeometry ( iGeometry apGeom,
tU32  anFirstMesh,
tU32  anNumMeshes,
tU32  anGeomIndexBase,
eArrayUsage  aUsage,
tFVF  aBaseFVF,
tFVF  aDefaultFVF,
tBool  abOneFVF,
tIUnknownCVec apGeoms 
)
pure virtual

Pack several meshes into several geometries.

virtual iGeometry* PackSingleGeometry ( iGeometry apGeom,
tU32  anFirstMesh,
tU32  anNumMeshes,
tU32  anGeomIndexBase,
eArrayUsage  aUsage,
tFVF  aBaseFVF,
tFVF  aDefaultFVF 
)
pure virtual

Pack several meshes into a single geometry.

virtual tBool AddGeometry ( iGeometry apGeom,
iGeometryModifier apModifier 
)
pure virtual

Add a geometry.

virtual tU32 AddPackedGeometry ( iGeometry apGeom,
tU32  anFirstMesh,
tU32  anNumMeshes,
eArrayUsage  aUsage,
tFVF  aBaseFVF,
tFVF  aDefaultFVF,
tBool  abOneFVF 
)
pure virtual

Add a packed geometry.

virtual tU32 AddPackedSingleGeometry ( iGeometry apGeom,
tU32  anFirstMesh,
tU32  anNumMeshes,
eArrayUsage  aUsage,
tFVF  aBaseFVF,
tFVF  aDefaultFVF 
)
pure virtual

Add a single geometry.

virtual tBool InitMeshCollisions ( iCollideScene apScene,
tCollideMeshFlags  aCollideMeshFlags 
)
pure virtual

Init the collisions of the character.

Parameters
apScene
aCollideMeshFlagsthe collide mesh flags, if eInvalidHandle disabled mesh collisions. eCollideMeshFlags_MaterialID will create packed collision meshes for for the character usually resulting in faster collisions detection.
virtual tBool InitMeshInstances ( iCollideScene apScene)
pure virtual

Init the drawops and collisions of the mesh of character.

Remarks
Creates the drawop and collisions objects for each mesh.
virtual tBool InitAnimations ( )
pure virtual

Init the animations.

Remarks
Should be called when a new set of animations/animation keys has been added to the animation mixer.