ScummVM API documentation
hpl::iPhysicsBody Class Referenceabstract
Inheritance diagram for hpl::iPhysicsBody:
hpl::iEntity3D hpl::iEntity hpl::iSaveObject hpl::cPhysicsBodyNewton

Public Member Functions

 iPhysicsBody (const tString &asName, iPhysicsWorld *apWorld, iCollideShape *apShape)
 
void Destroy ()
 
virtual void SetMaterial (iPhysicsMaterial *apMaterial)=0
 
iPhysicsMaterialGetMaterial ()
 
cNode3DGetNode ()
 
cNode3DCreateNode ()
 
iCollideShapeGetShape ()
 
void AddJoint (iPhysicsJoint *apJoint)
 
iPhysicsJointGetJoint (int alIndex)
 
int GetJointNum ()
 
void RemoveJoint (iPhysicsJoint *apJoint)
 
virtual void SetLinearVelocity (const cVector3f &avVel)=0
 
virtual cVector3f GetLinearVelocity () const =0
 
virtual void SetAngularVelocity (const cVector3f &avVel)=0
 
virtual cVector3f GetAngularVelocity () const =0
 
virtual void SetLinearDamping (float afDamping)=0
 
virtual float GetLinearDamping () const =0
 
virtual void SetAngularDamping (float afDamping)=0
 
virtual float GetAngularDamping () const =0
 
virtual void SetMaxLinearSpeed (float afSpeed)=0
 
virtual float GetMaxLinearSpeed () const =0
 
virtual void SetMaxAngularSpeed (float afDamping)=0
 
virtual float GetMaxAngularSpeed () const =0
 
virtual cMatrixf GetInertiaMatrix ()=0
 
cVector3f GetVelocityAtPosition (cVector3f avPos)
 
virtual void SetMass (float afMass)=0
 
virtual float GetMass () const =0
 
virtual void SetMassCentre (const cVector3f &avCentre)=0
 
virtual cVector3f GetMassCentre () const =0
 
virtual void AddForce (const cVector3f &avForce)=0
 
virtual void AddForceAtPosition (const cVector3f &avForce, const cVector3f &avPos)=0
 
virtual void AddTorque (const cVector3f &avTorque)=0
 
virtual void AddImpulse (const cVector3f &avImpulse)=0
 
virtual void AddImpulseAtPosition (const cVector3f &avImpulse, const cVector3f &avPos)=0
 
virtual void SetEnabled (bool abEnabled)=0
 
virtual bool GetEnabled () const =0
 
virtual void SetAutoDisable (bool abEnabled)=0
 
virtual bool GetAutoDisable () const =0
 
virtual void SetContinuousCollision (bool abOn)=0
 
virtual bool GetContinuousCollision ()=0
 
virtual void SetGravity (bool abEnabled)=0
 
virtual bool GetGravity () const =0
 
virtual void RenderDebugGeometry (iLowLevelGraphics *apLowLevel, const cColor &aColor)=0
 
void UpdateBeforeSimulate (float afTimeStep)
 
void UpdateAfterSimulate (float afTimeStep)
 
cBoundingVolumeGetBV ()
 
void SetBlocksSound (bool abX)
 
bool GetBlocksSound ()
 
void SetBlocksLight (bool abX)
 
bool GetBlocksLight ()
 
void SetScrapeSoundEntity (cSoundEntity *apEntity)
 
cSoundEntityGetScrapeSoundEntity ()
 
void SetScrapeBody (iPhysicsBody *apBody)
 
iPhysicsBodyGetScrapeBody ()
 
const cMatrixfGetPreveScrapeMatrix ()
 
void SetPreveScrapeMatrix (const cMatrixf &a_mtxMtx)
 
void SetRollSoundEntity (cSoundEntity *apEntity)
 
cSoundEntityGetRollSoundEntity ()
 
void SetHasImpact (bool abX)
 
bool HasImpact ()
 
void SetHasSlide (bool abX)
 
bool HasSlide ()
 
bool HasCollision ()
 
void SetUserData (void *apUserData)
 
void * GetUserData ()
 
void AddBodyCallback (iPhysicsBodyCallback *apCallback)
 
void RemoveBodyCallback (iPhysicsBodyCallback *apCallback)
 
bool OnBeginCollision (iPhysicsBody *apBody)
 
void OnCollide (iPhysicsBody *apBody, cPhysicsContactData *apContactData)
 
void SetCollide (bool abX)
 
bool GetCollide ()
 
void SetIsCharacter (bool abX)
 
bool IsCharacter ()
 
void SetCollideCharacter (bool abX)
 
bool GetCollideCharacter ()
 
void SetCharacterBody (iCharacterBody *apCharBody)
 
iCharacterBodyGetCharacterBody ()
 
void SetIsRagDoll (bool abX)
 
bool IsRagDoll ()
 
void SetCollideRagDoll (bool abX)
 
bool GetCollideRagDoll ()
 
void SetVolatile (bool abX)
 
bool IsVolatile ()
 
void SetPushedByCharacterGravity (bool abX)
 
bool GetPushedByCharacterGravity ()
 
void SetBuoyancyId (int alX)
 
void SetBuoyancyActive (bool abX)
 
void SetBuoyancyDensity (float afX)
 
void SetBuoyancyLinearViscosity (float afX)
 
void SetBuoyancyAngularViscosity (float afX)
 
void SetBuoyancySurface (const cPlanef &aP)
 
int GetBuoyancyId ()
 
bool GetBuoyancyActive ()
 
float GetBuoyancyDensity ()
 
float GetBuoyancyLinearViscosity ()
 
float GetBuoyancyAngularViscosity ()
 
cPlanef SetBuoyancySurface ()
 
void SetCanAttachCharacter (bool abX)
 
bool GetCanAttachCharacter ()
 
void AddAttachedCharacter (iCharacterBody *apChar)
 
void RemoveAttachedCharacter (iCharacterBody *apChar)
 
iPhysicsWorldGetWorld ()
 
void DisableAfterSimulation ()
 
tString GetEntityType ()
 
virtual iSaveDataCreateSaveData ()
 
virtual void SaveToSaveData (iSaveData *apSaveData)
 
virtual void LoadFromSaveData (iSaveData *apSaveData)
 
virtual void SaveDataSetup (cSaveObjectHandler *apSaveObjectHandler, cGame *apGame)
 
virtual void DeleteLowLevel ()=0
 
- 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 ()
 
virtual cBoundingVolumeGetBoundingVolume ()
 
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)
 
virtual void UpdateLogic (float afTimeStep)
 
tStringGetName ()
 
void SetName (const tString &asName)
 
iNodeGetParent ()
 
void SetParent (iNode *apNode)
 
bool HasParent ()
 
bool IsActive ()
 
void SetActive (bool abActive)
 
virtual bool IsVisible ()
 
virtual void SetVisible (bool abVisible)
 
- Public Member Functions inherited from hpl::iSaveObject
int GetSaveObjectId ()
 
void SetIsSaved (bool abX)
 
bool IsSaved ()
 

Protected Member Functions

void CreateSaveCollideShapes (cContainerList< cSaveData_iCollideShape > *apShapeList)
 

Protected Attributes

iPhysicsWorldmpWorld
 
iCollideShapempShape
 
iPhysicsMaterialmpMaterial
 
cNode3DmpNode
 
iCharacterBodympCharacterBody
 
Common::Array< iPhysicsJoint * > mvJoints
 
Common::List< iCharacterBody * > mlstAttachedCharacters
 
iPhysicsBodympScrapeBody
 
cSoundEntitympScrapeSoundEntity
 
cSoundEntitympRollSoundEntity
 
cMatrixf m_mtxPrevScrapeMatrix
 
bool mbHasImpact
 
bool mbHasSlide
 
int mlSlideCount
 
int mlImpactCount
 
bool mbPushedByCharacterGravity
 
bool mbBlocksSound
 
bool mbBlocksLight
 
bool mbIsCharacter
 
bool mbCollideCharacter
 
bool mbIsRagDoll
 
bool mbCollideRagDoll
 
bool mbVolatile
 
bool mbCanAttachCharacter
 
cPhysicsBody_Buoyancy mBuoyancy
 
int mlBuoyancyId
 
bool mbDisableAfterSimulation
 
bool mbHasCollision
 
tPhysicsBodyCallbackList mlstBodyCallbacks
 
void * mpUserData
 
bool mbCollide
 
- 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

◆ CreateSaveData()

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

Creates the SaveData that this class uses.

Reimplemented from hpl::iEntity3D.

◆ SaveToSaveData()

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

Save it's data to a SaveData

Reimplemented from hpl::iEntity3D.

◆ LoadFromSaveData()

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

Load it's data from a SaveData

Reimplemented from hpl::iEntity3D.

◆ SaveDataSetup()

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

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

Reimplemented from hpl::iEntity3D.


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