ScummVM API documentation
hpl::cMeshEntity Class Reference
Inheritance diagram for hpl::cMeshEntity:
hpl::iRenderable hpl::iEntity3D hpl::iEntity hpl::iSaveObject

Public Member Functions

 cMeshEntity (const tString asName, cMesh *apMesh, cMaterialManager *apMaterialManager, cMeshManager *apMeshManager, cAnimationManager *apAnimationManager)
 
void SetWorld (cWorld3D *apWorld)
 
cWorld3DGetWorld ()
 
void SetCastsShadows (bool abX)
 
cNode3DGetRootNode ()
 
void SetCallback (cMeshEntityCallback *apCallback)
 
cSubMeshEntityGetSubMeshEntity (unsigned int alIdx)
 
cSubMeshEntityGetSubMeshEntityName (const tString &asName)
 
int GetSubMeshEntityNum ()
 
cAnimationStateAddAnimation (cAnimation *apAnimation, const tString &asName, float afBaseSpeed)
 
void ClearAnimations ()
 
cAnimationStateGetAnimationState (int alIndex)
 
int GetAnimationStateIndex (const tString &asName)
 
cAnimationStateGetAnimationStateFromName (const tString &asName)
 
int GetAnimationStateNum ()
 
void Play (int alIndex, bool abLoop, bool bStopPrev)
 
void PlayName (const tString &asName, bool abLoop, bool bStopPrev)
 
void Stop ()
 
cBoneStateGetBoneState (int alIndex)
 
int GetBoneStateIndex (const tString &asName)
 
cBoneStateGetBoneStateFromName (const tString &asName)
 
int GetBoneStateNum ()
 
void SetSkeletonPhysicsActive (bool abX)
 
bool GetSkeletonPhysicsActive ()
 
void SetSkeletonPhysicsCanSleep (bool abX)
 
bool GetSkeletonPhysicsCanSleep ()
 
float GetSkeletonPhysicsWeight ()
 
void SetSkeletonPhysicsWeight (float afX)
 
void FadeSkeletonPhysicsWeight (float afTime)
 
void SetSkeletonCollidersActive (bool abX)
 
bool GetSkeletonCollidersActive ()
 
void AlignBodiesToSkeleton (bool abCalculateSpeed)
 
cMeshGetMesh ()
 
cMatrixf CalculateTransformFromSkeleton (cVector3f *apPostion, cVector3f *apAngles)
 
bool CheckColliderShapeCollision (iPhysicsWorld *apWorld, iCollideShape *apShape, const cMatrixf &a_mtxShape, tVector3fList *apPosList, tIntList *apNumList)
 
void ResetGraphicsUpdated ()
 
cNode3DGetNodeState (int alIndex)
 
int GetNodeStateIndex (const tString &asName)
 
cNode3DGetNodeStateFromName (const tString &asName)
 
int GetNodeStateNum ()
 
bool HasNodes ()
 
bool AttachEntityToParent (iEntity3D *apEntity, const tString &asParent)
 
tString GetEntityType ()
 
bool IsVisible ()
 
void SetVisible (bool abVisible)
 
void UpdateLogic (float afTimeStep)
 
void UpdateGraphics (cCamera3D *apCamera, float afFrameTime, cRenderList *apRenderList)
 
void SetRendered (bool abX)
 
iMaterialGetMaterial ()
 
iVertexBufferGetVertexBuffer ()
 
bool IsShadowCaster ()
 
cBoundingVolumeGetBoundingVolume ()
 
cMatrixfGetModelMatrix (cCamera3D *apCamera)
 
int GetMatrixUpdateCount ()
 
eRenderableType GetRenderType ()
 
void SetBody (iPhysicsBody *apBody)
 
iPhysicsBodyGetBody ()
 
virtual iSaveDataCreateSaveData ()
 
virtual void SaveToSaveData (iSaveData *apSaveData)
 
virtual void LoadFromSaveData (iSaveData *apSaveData)
 
virtual void SaveDataSetup (cSaveObjectHandler *apSaveObjectHandler, cGame *apGame)
 
- Public Member Functions inherited from hpl::iRenderable
 iRenderable (const tString &asName)
 
bool IsRendered ()
 
virtual bool CollidesWithBV (cBoundingVolume *apBV)
 
virtual bool CollidesWithFrustum (cFrustum *apFrustum)
 
float GetZ ()
 
void SetZ (float afZ)
 
cMatrixfGetInvModelMatrix ()
 
void SetPrevMatrix (const cMatrixf &a_mtxPrev)
 
cMatrixfGetPrevMatrix ()
 
const cVector3fGetCalcScale ()
 
void SetStatic (bool abX)
 
bool IsStatic () const
 
int GetRenderCount () const
 
void SetRenderCount (const int alCount)
 
int GetPrevRenderCount () const
 
void SetPrevRenderCount (const int alCount)
 
void SetForceShadow (bool abX)
 
bool GetForceShadow ()
 
bool GetIsOneSided ()
 
const cVector3fGetOneSidedNormal ()
 
- Public Member Functions inherited from hpl::iEntity3D
 iEntity3D (tString asName)
 
cVector3f GetLocalPosition ()
 
cMatrixfGetLocalMatrix ()
 
cVector3f GetWorldPosition ()
 
cMatrixfGetWorldMatrix ()
 
void SetPosition (const cVector3f &avPos)
 
void SetMatrix (const cMatrixf &a_mtxTransform)
 
void SetWorldPosition (const cVector3f &avWorldPos)
 
void SetWorldMatrix (const cMatrixf &a_mtxWorldTransform)
 
void SetTransformUpdated (bool abUpdateCallbacks=true)
 
bool GetTransformUpdated ()
 
int GetTransformUpdateCount ()
 
void AddCallback (iEntityCallback *apCallback)
 
void RemoveCallback (iEntityCallback *apCallback)
 
void SetSourceFile (const tString &asFile)
 
const tStringGetSourceFile ()
 
void AddChild (iEntity3D *apEntity)
 
void RemoveChild (iEntity3D *apEntity)
 
bool IsChild (iEntity3D *apEntity)
 
iEntity3DGetEntityParent ()
 
virtual tRenderContainerDataListGetRenderContainerDataList ()
 
int GetIteratorCount ()
 
void SetIteratorCount (const int alX)
 
void SetCurrentSector (cSector *apSetor)
 
virtual cSectorGetCurrentSector () const
 
bool IsInSector (cSector *apSector)
 
int GetGlobalRenderCount ()
 
void SetGlobalRenderCount (int alX)
 
- Public Member Functions inherited from hpl::iEntity
 iEntity (tString asName)
 
tStringGetName ()
 
void SetName (const tString &asName)
 
iNodeGetParent ()
 
void SetParent (iNode *apNode)
 
bool HasParent ()
 
bool IsActive ()
 
void SetActive (bool abActive)
 
- Public Member Functions inherited from hpl::iSaveObject
int GetSaveObjectId ()
 
void SetIsSaved (bool abX)
 
bool IsSaved ()
 

Additional Inherited Members

- Protected Attributes inherited from hpl::iRenderable
cMatrixf m_mtxInvModel
 
cMatrixf m_mtxPrevious
 
bool mbIsOneSided
 
cVector3f mvOneSidedNormal
 
int mlLastMatrixCount
 
bool mbStatic
 
bool mbForceShadow
 
int mlRenderCount
 
int mlPrevRenderCount
 
int mlCalcScaleMatrixCount
 
cVector3f mvCalcScale
 
bool mbRendered
 
float mfZ
 
- Protected Attributes inherited from hpl::iEntity3D
cMatrixf m_mtxLocalTransform
 
cMatrixf m_mtxWorldTransform
 
cBoundingVolume mBoundingVolume
 
bool mbUpdateBoundingVolume
 
bool mbApplyTransformToBV
 
bool mbTransformUpdated
 
int mlGlobalRenderCount
 
int mlCount
 
tString msSourceFile
 
tEntityCallbackList mlstCallbacks
 
tRenderContainerDataList mlstRenderContainerData
 
tEntity3DList mlstChildren
 
iEntity3DmpParent
 
cSectormpCurrentSector
 
int mlIteratorCount
 
- Protected Attributes inherited from hpl::iEntity
iNodempParentNode
 
tString msName
 
bool mbIsVisible
 
bool mbIsActive
 
- Protected Attributes inherited from hpl::iSaveObject
iSaveDatampSaveData
 

Member Function Documentation

◆ CalculateTransformFromSkeleton()

cMatrixf hpl::cMeshEntity::CalculateTransformFromSkeleton ( cVector3f apPostion,
cVector3f apAngles 
)

Calculates the transform (and angles and postion if wanted) of a mesh based on the postion of the root bone. This is useful when going from rag doll to mesh.

Parameters
*apPostionCan be NULL, the postion
*apAnglesCan be NULL, the angles.

◆ CheckColliderShapeCollision()

bool hpl::cMeshEntity::CheckColliderShapeCollision ( iPhysicsWorld apWorld,
iCollideShape apShape,
const cMatrixf a_mtxShape,
tVector3fList apPosList,
tIntList apNumList 
)

Checks collision with the skeletons collider boides

Parameters
*apWorldPhysics world
*apShapeThe shape
&a_mtxShapeThe shapes matrix
*apPosListA list of positions that all contact points are stored in. can be NULL.
*apNumListA list of ints of number of the bone state body hit. can be NULL.

◆ GetMatrixUpdateCount()

int hpl::cMeshEntity::GetMatrixUpdateCount ( )
virtual

Should return a different number each time the renderable model matrix is updated. never -1

Returns

Implements hpl::iRenderable.

◆ CreateSaveData()

virtual iSaveData* hpl::cMeshEntity::CreateSaveData ( )
virtual

Creates the SaveData that this class uses.

Reimplemented from hpl::iRenderable.

◆ SaveToSaveData()

virtual void hpl::cMeshEntity::SaveToSaveData ( iSaveData apSaveData)
virtual

Save it's data to a SaveData

Reimplemented from hpl::iRenderable.

◆ LoadFromSaveData()

virtual void hpl::cMeshEntity::LoadFromSaveData ( iSaveData apSaveData)
virtual

Load it's data from a SaveData

Reimplemented from hpl::iRenderable.

◆ SaveDataSetup()

virtual void hpl::cMeshEntity::SaveDataSetup ( cSaveObjectHandler apSaveObjectHandler,
cGame apGame 
)
virtual

After all objects have been created, this function is called to enable setup.

Reimplemented from hpl::iRenderable.


The documentation for this class was generated from the following file: