torque Torque Game Engine Documentation
TGE Version 1.5.2

Convex Class Reference

#include <convex.h>

Inheritance diagram for Convex:

Inheritance graph
[legend]

Linked list managent

ConvexmNext
 Next item in linked list of Convex's.
ConvexmPrev
 Previous item in linked list of Convex's.
void linkAfter (Convex *next)
 Insert this Convex after the provided convex.
void unlink ()
 Remove this Convex from the linked list.

Public Member Functions

 Convex ()
 Constructor.
virtual ~Convex ()
 Destructor.
void registerObject (Convex *convex)
 Registers another Convex by linking it after this one.
void collectGarbage ()
 Runs through the linked list of Convex objects and removes the ones with no references.
void nukeList ()
 Deletes all convex objects in the list.
ConvexType getType ()
 Returns the type of this Convex.
SceneObjectgetObject ()
 Returns the object this Convex is built from.
void render ()
 Traverses mList and renders all collision states.
void addToWorkingList (Convex *ptr)
 Adds the provided Convex to the list of objects within the bounds of this Convex.
CollisionWorkingListgetWorkingList ()
 Returns the list of objects currently inside the bounds of this Convex.
CollisionStatefindClosestState (const MatrixF &mat, const Point3F &scale, const F32 dontCareDist=1)
 Finds the closest.
CollisionStateListgetStateList ()
 Returns the list of objects this object is testing against.
void updateStateList (const MatrixF &mat, const Point3F &scale, const Point3F *displacement=NULL)
 Updates the CollisionStateList (mList) with new collision states and removing ones no longer under consideration.
void updateWorkingList (const Box3F &box, const U32 colMask)
 Updates the working collision list of objects which are currently colliding with (inside the bounds of) this Convex.
virtual const MatrixFgetTransform () const
 Returns the transform of the object this is built around.
virtual const Point3FgetScale () const
 Returns the scale of the object this is built around.
virtual Box3F getBoundingBox () const
 Returns the bounding box for the object this is built around in world space.
virtual Box3F getBoundingBox (const MatrixF &mat, const Point3F &scale) const
 Returns the object space bounding box for the object this is built around transformed and scaled.
virtual Point3F support (const VectorF &v) const
 Returns the farthest point, along a vector, still bound by the convex.
virtual void getFeatures (const MatrixF &mat, const VectorF &n, ConvexFeature *cf)
virtual void getPolyList (AbstractPolyList *list)
 Builds a collision poly list out of this convex.
bool getCollisionInfo (const MatrixF &mat, const Point3F &scale, CollisionList *cList, F32 tol)

Protected Attributes

CollisionStateList mList
 Objects we're testing against.
CollisionWorkingList mWorking
 Objects within our bounds.
CollisionWorkingList mReference
 Other convex testing against us.
SceneObjectmObject
 Object this Convex is built around.
ConvexType mType
 Type of Convex this is.

Private Attributes

U32 mTag

Static Private Attributes

static U32 sTag

Constructor & Destructor Documentation

Convex::Convex (  ) 

Constructor.

virtual Convex::~Convex (  )  [virtual]

Destructor.


Member Function Documentation

void Convex::linkAfter ( Convex next  )  [private]

Insert this Convex after the provided convex.

Parameters:
next 

void Convex::unlink (  )  [private]

Remove this Convex from the linked list.

void Convex::registerObject ( Convex convex  ) 

Registers another Convex by linking it after this one.

void Convex::collectGarbage (  ) 

Runs through the linked list of Convex objects and removes the ones with no references.

void Convex::nukeList (  ) 

Deletes all convex objects in the list.

ConvexType Convex::getType (  )  [inline]

Returns the type of this Convex.

SceneObject* Convex::getObject (  )  [inline]

Returns the object this Convex is built from.

void Convex::render (  ) 

Traverses mList and renders all collision states.

void Convex::addToWorkingList ( Convex ptr  ) 

Adds the provided Convex to the list of objects within the bounds of this Convex.

Parameters:
ptr Convex to add to the working list of this object

CollisionWorkingList& Convex::getWorkingList (  )  [inline]

Returns the list of objects currently inside the bounds of this Convex.

CollisionState* Convex::findClosestState ( const MatrixF mat,
const Point3F scale,
const F32  dontCareDist = 1 
)

Finds the closest.

CollisionStateList* Convex::getStateList (  )  [inline]

Returns the list of objects this object is testing against.

void Convex::updateStateList ( const MatrixF mat,
const Point3F scale,
const Point3F displacement = NULL 
)

Updates the CollisionStateList (mList) with new collision states and removing ones no longer under consideration.

Parameters:
mat Used as the matrix to create a bounding box for updating the list
scale Used to scale the bounding box
displacement Bounding box displacement (optional)

void Convex::updateWorkingList ( const Box3F box,
const U32  colMask 
)

Updates the working collision list of objects which are currently colliding with (inside the bounds of) this Convex.

Parameters:
box Used as the bounding box.
colMask Mask of objects to check against.

virtual const MatrixF& Convex::getTransform (  )  const [virtual]

Returns the transform of the object this is built around.

Reimplemented in OrthoBoxConvex, ShapeBaseConvex, and TSStaticConvex.

virtual const Point3F& Convex::getScale (  )  const [virtual]

Returns the scale of the object this is built around.

virtual Box3F Convex::getBoundingBox (  )  const [virtual]

Returns the bounding box for the object this is built around in world space.

Reimplemented in ShapeBaseConvex, TSStaticConvex, InteriorConvex, InteriorMapConvex, and TerrainConvex.

virtual Box3F Convex::getBoundingBox ( const MatrixF mat,
const Point3F scale 
) const [virtual]

Returns the object space bounding box for the object this is built around transformed and scaled.

Parameters:
mat Matrix to transform the object-space box by
scale Scaling factor to scale the bounding box by

Reimplemented in ShapeBaseConvex, TSStaticConvex, InteriorConvex, InteriorMapConvex, and TerrainConvex.

virtual Point3F Convex::support ( const VectorF v  )  const [virtual]

Returns the farthest point, along a vector, still bound by the convex.

Parameters:
v Vector

Reimplemented in BoxConvex, ShapeBaseConvex, TSStaticConvex, InteriorConvex, InteriorMapConvex, and TerrainConvex.

virtual void Convex::getFeatures ( const MatrixF mat,
const VectorF n,
ConvexFeature cf 
) [virtual]

virtual void Convex::getPolyList ( AbstractPolyList list  )  [virtual]

Builds a collision poly list out of this convex.

Parameters:
list (Out) Poly list built

Reimplemented in BoxConvex, ShapeBaseConvex, TSStaticConvex, InteriorConvex, InteriorMapConvex, and TerrainConvex.

bool Convex::getCollisionInfo ( const MatrixF mat,
const Point3F scale,
CollisionList cList,
F32  tol 
)


Field Documentation

Convex* Convex::mNext [private]

Next item in linked list of Convex's.

Convex* Convex::mPrev [private]

Previous item in linked list of Convex's.

U32 Convex::mTag [private]

U32 Convex::sTag [static, private]

Objects we're testing against.

Objects within our bounds.

Other convex testing against us.

Object this Convex is built around.

Type of Convex this is.

See also:
ConvexType




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen