#include "TA/Physics/StaticObject.h"
Inheritance diagram for TA::StaticObject:
Call the static function TA::StaticObject::CreateNew to create a new instance of this class.
Static objects are designed to represent large arbitrary meshes in the physics simulation. Any object that remains static, doesn't need to react to collisions but that other objects need to collide with, should be part of a static object.
Static objects must be initialised with an object that inherits from TA::CollisionObjectComplex. The the class TA::CollisionObjectAABBMesh provides an implementation of TA::CollisionObjectComplex. It is also possible to override TA::CollisionObjectComplex, allowing the user to provide their own high level collision testing. See TA::StaticObject::Initialise for more details.
Static objects can be added and removed from the physics simulation by calling the functions TA::Physics::AddStaticObject and TA::Physics::RemoveStaticObject.
AddRef()
and Release()
can be called to increment and decrement the reference count. If the reference count is zero after a call to Release()
the object will be automatically deleted. Reference counted objects should only be created using new.
Public Member Functions | |
void | Initialise (CollisionObjectComplex *pCollisionObjectComplex) |
void | Finalise () |
const MFrame & | GetFrame () const |
void | SetFrame (const MFrame &frame) |
const MFrame & | GetNextFrame () const |
void | SetNextFrame (const MFrame &nextFrame) |
CollisionObjectComplex & | GetCollisionObject () |
const AABB & | GetWorldAABB () const |
void | TestLineForCollision (const Vec3 &v3Start, const Vec3 &v3Normal, float fLength, Collision &collision) |
DynamicObject * | GetDynamicObject () |
void | SetUserData (void *pData) |
void * | GetUserData () |
Static Public Member Functions | |
static StaticObject *TAC_CALL | CreateNew () |