ScummVM API documentation
hpl::cBody2D Class Reference
Inheritance diagram for hpl::cBody2D:
hpl::iEntity2D hpl::iEntity hpl::iSaveObject

Public Member Functions

 cBody2D (const tString &asName, cMesh2D *apMesh, cVector2f avSize, cCollider2D *apCollider, int alID)
 
const cRect2fGetBoundingBox ()
 
bool UpdateBoundingBox ()
 
void Move (float afValue)
 
void UpdateLogic (float afTimeStep)
 
tString GetEntityType ()
 
cVector3fGetPosition ()
 
cVector3fGetLastPosition ()
 
void ResetLastPosition ()
 
float GetVelocity ()
 
float GetMaxVelocity ()
 
float GetAcceleration ()
 
float GetGravity ()
 
float GetMaxGravityVel ()
 
bool GetCollidable ()
 
bool GetCollides ()
 
float GetAirFriction ()
 
float GetGroundFriction ()
 
const cVector2fGetSize ()
 
const cVector3fGetMovement ()
 
void SetMaxVelocity (float afMaxVel)
 
void SetAcceleration (float afAcc)
 
void SetGravity (float afGravity)
 
void SetMaxGravityVel (float afMaxGravityVel)
 
void SetCollidable (bool abCollidable)
 
void SetCollides (bool abCollides)
 
void SetAirFriction (float afAirFriction)
 
void SetGroundFriction (float afGroundFriction)
 
void AddForce (float afAngle, float afStrength)
 
void AddForce (const cVector2f &avForce)
 
void SetForce (float afAngle, float afStrength)
 
void SetForce (const cVector2f &avForce)
 
const cVector2fGetForce () const
 
void SetCollideFlag (tFlag alFlag)
 
tFlag GetCollideFlag ()
 
void SetAttachToGround (bool abX)
 
bool GetAttachToGround ()
 
void SetAttachBodies (bool abX)
 
bool GetAttachBodies ()
 
void AttachBody (cBody2D *apBody)
 
void DetachBody (cBody2D *apBody)
 
void SetParentBody (cBody2D *apBody)
 
void SetCollideType (tFlag alFlag)
 
tFlag GetCollideType ()
 
void AttachNode (cNode2D *apNode)
 
void DetachNode ()
 
int GetID ()
 
bool OnGround ()
 
void UpdateCollisionMesh ()
 
cCollisionMesh2DGetCollisionMesh ()
 
- Public Member Functions inherited from hpl::iEntity2D
 iEntity2D (tString asName)
 
cVector3fGetLocalPosition ()
 
cVector3fGetLocalRotation ()
 
cVector3fGetLocalScale ()
 
cVector3f GetWorldPosition ()
 
cVector3f GetWorldRotation ()
 
cVector3f GetWorldScale ()
 
void SetPosition (const cVector3f &avPos)
 
void SetRotation (const cVector3f &avRot)
 
void SetScale (const cVector3f &avScale)
 
cGrid2DObjectGetGrid2DObject ()
 
void SetGrid2DObject (cGrid2DObject *apGrid)
 
bool HasGrid2DObject ()
 
- 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)
 
virtual bool IsVisible ()
 
virtual void SetVisible (bool abVisible)
 
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::iSaveObject
int GetSaveObjectId ()
 
void SetIsSaved (bool abX)
 
bool IsSaved ()
 

Additional Inherited Members

- Protected Attributes inherited from hpl::iEntity2D
cGrid2DObjectmpGridObject
 
cVector3f mvPosition
 
cVector3f mvRotation
 
cVector3f mvScale
 
cVector3f mvLastPosition
 
cVector3f mvLastRotation
 
cVector3f mvLastScale
 
cRect2f mBoundingBox
 
- Protected Attributes inherited from hpl::iEntity
iNodempParentNode
 
tString msName
 
bool mbIsVisible
 
bool mbIsActive
 
- Protected Attributes inherited from hpl::iSaveObject
iSaveDatampSaveData
 

Member Function Documentation

◆ SetCollideFlag()

void hpl::cBody2D::SetCollideFlag ( tFlag  alFlag)
inline

Sets the things that the body can collide with, default is eFlagBit_0 (tiles)

Parameters
alFlag

◆ SetAttachToGround()

void hpl::cBody2D::SetAttachToGround ( bool  abX)
inline

Sets if the body is attached to moving obejcts and moves with the, default is false.

Parameters
abX

◆ SetAttachBodies()

void hpl::cBody2D::SetAttachBodies ( bool  abX)
inline

Sets if other objects can attach themselves to this body. Default is true.

Parameters
abX

◆ SetCollideType()

void hpl::cBody2D::SetCollideType ( tFlag  alFlag)
inline

Sets the types of collider the body is, default is eFlagBit_1. On collision checking, the other objects specify what it can collide with. And for every body this value is checked.

Parameters
alFlag

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