Cafu Engine
ShapeResultT Class Reference

This class handles the results of tracing a convex shape through the world. More...

#include "PhysicsWorld.hpp"

Inheritance diagram for ShapeResultT:

Public Member Functions

 ShapeResultT ()
 The constructor. More...
 
void Ignore (const btCollisionObject *Obj)
 Adds the given collision object to the objects to be ignored for this trace. More...
 
void Ignore (const TraceUserEntityT *Ent)
 Adds the given entity to the entities to be ignored for this trace. More...
 
TraceUserEntityTGetHitPhysicsComp () const
 If something was hit (hasHit() returns true), this method returns a pointer to the Physics component that the hit collision object belongs to. More...
 
virtual btScalar addSingleResult (btCollisionWorld::LocalConvexResult &ConvexResult, bool NormalIsInWorldSpace)
 

Protected Attributes

unsigned short m_IgnoreObjCount
 
unsigned short m_IgnoreEntCount
 
const btCollisionObject * m_IgnoreObjects [2]
 
const TraceUserEntityTm_IgnoreEntities [2]
 

Detailed Description

This class handles the results of tracing a convex shape through the world.

As such, it is called back for intermediate results and thus can "configure" or "parametrize" the trace, and it keeps the final trace result for inspection by the caller as well.

Constructor & Destructor Documentation

ShapeResultT::ShapeResultT ( )
inline

The constructor.

Member Function Documentation

TraceUserEntityT* ShapeResultT::GetHitPhysicsComp ( ) const
inline

If something was hit (hasHit() returns true), this method returns a pointer to the Physics component that the hit collision object belongs to.

The returned pointer is NULL if the collision object belongs to the world. If nothing was hit (hasHit() returns false), NULL is always returned.

void ShapeResultT::Ignore ( const btCollisionObject *  Obj)
inline

Adds the given collision object to the objects to be ignored for this trace.

Parameters
ObjA collision object to ignore for this trace. This is often the object from which the trace emanates.
void ShapeResultT::Ignore ( const TraceUserEntityT Ent)
inline

Adds the given entity to the entities to be ignored for this trace.

Parameters
EntAn entity to ignore for this trace. This is often the entity from which the trace emanates, or e.g. NULL (the world).

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