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

TA::CollisionObjectConvex Class Reference

#include "TA/Physics/CollisionObjectConvex.h"

Inheritance diagram for TA::CollisionObjectConvex:

Inheritance graph

Detailed Description

A convex object is an implementation of TA::CollisionObjectSimple.

Call the static function TA::CollisionObjectConvex::CreateNew to create a new instance of this class.

TA::CollisionObjectConvex is used to represent convex polygon shapes for dynamic objects. The only way to create non-convex objects is to combine multiple convex objects. For speed reasons, this should be avoided unless necessary. Convex objects should also be kept as simple as possible.

convex.png

A Convex Object Diagram

Objects that implement TA::CollisionObjectSimple can be combined to make a combo collision object. See TA::CollisionObjectCombo::AddCollisionObject.

Serialisation:
This class may be saved an loaded to file or memory using these functions inherited from TA::CollisionObject :

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:

CarTemplateExample.cpp, and CollisionObjectComboExample.cpp.


Public Member Functions

void  Initialise ()
void  InitialiseAsABox (float fSizeX, float fSizeY, float fSizeZ)
void  InitialiseAsABox (const AABB &aabb)
void  InitialiseAsAnOrientedBox (const AABB &aabb, const MFrame &mFrame)
bool  InitialiseFromPointList (const Vec3 *pv3PointList, int nNumPoints)
void  InitialiseFromPlaneList (const Vec3 *pv3PlaneNormalList, const Vec3 *pv3PlanePointList, int nNumPlanes)
void  InitialiseFromConvexHull (ConvexHull &convexHull)
void  Finalise ()
bool  Serialisable () const
AABB  CalculateBoundingBox () const
void  CalculateMass (float fDensity, float &fMass, Vec3 &v3CenterOfMass, Mat33 &m33Inertia) const
void  Transform (const MFrame &frame)
void  Render (const MFrame &mFrame)
virtual bool  TestLineForCollision (const Vec3 &v3Start, const Vec3 &v3Normal, float fLength, Collision &collision) const
Internal
void  Serialise (Serialiser &serialiser, const Version &version)

Static Public Member Functions

static CollisionObjectConvex
*TAC_CALL  
CreateNew ()


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