True Axis Physics SDK 1.2.0.1 Beta Documentation
www.trueaxis.com

TA::StaticObject Class Reference

#include "TA/Physics/StaticObject.h"

Inheritance diagram for TA::StaticObject:

Inheritance graph

Detailed Description

An container for large static arbitrary polygon meshes.

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.

Note:
It is desirable to have only a small number of static objects, rather that many small static objects. The True Axis Physics SDK is not optimised for many static objects. For example, if simulating a city environment, it would be best if all the buildings, roads and other static scenery where represented by one static object.
Reference Counting:
This class is reference counted. After the object is created it will have a reference count of one. 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.
Examples:

SimplePhysicsSimulationExample.cpp.


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 ()


© Copyright 2004-2006 TRUE AXIS PTY LTD Australia. All rights reserved.