Tactics: Western Philosophers Vs. Musicians  0.12
A turn-based tactical game combining rules and gameplay elements inspired by Final Fantasy Tactics and the Mayfair Exponential Game System. Unlike most games of this type, motion is in full, grid-less 3D.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
OpenSkyNet::CD::Collidable Class Referenceabstract

#include <CDVolume.h>

Inheritance diagram for OpenSkyNet::CD::Collidable:
OpenSkyNet::CD::Volume

Public Member Functions

 Collidable (const Math::Point<> &center_=Math::g_origin, const Math::Matrix3x3 &rot_=Math::g_identityMatrix3x3, void *userPointer_=0, Utils::uint colGroup_=COL_GROUP_HIT_ALL_HIT_BY_ALL)
 
virtual ~Collidable ()
 
void translate (const Math::Point<> &delta_)
 
void setCenter (const Math::Point<> &center_)
 
Math::Point getCenter () const
 
void setNonColTransform (const Math::Point<> &center_, const Math::Matrix3x3 &rot_)
 
const Math::PointgetNonColCenter () const
 
const Math::Matrix3x3getNonColRot () const
 
void setRot (const Math::Matrix3x3 &rot_)
 
Math::Matrix3x3 getRot () const
 
void setUserPointer (void *userPointer_)
 
voidgetUserPointer () const
 
Utils::uint canGroupHitMe (Utils::uint colGroup_) const
 
Utils::uint getColGroup () const
 
void setColGroup (Utils::uint colGroup_)
 
virtual ShapegetShape ()=0
 
virtual const ShapegetShape () const =0
 
virtual SHAPE_TYPE getType () const
 
virtual float getDist (const Collidable *aCollidable_) const
 
virtual bool getFirstIntersection (const Math::Point<> &thisVel_, const Collidable *otherCollidable_, const Math::Point<> &otherVel_, HitInfo &hitInfo_) const
 
virtual bool getClosestRayIntersection (const Math::Point<> &rayOrigin_, const Math::Point<> &rayDir_, Math::Point<> &hitPos_, float &t_, Math::Point<> &hitNormal_) const
 

Constructor & Destructor Documentation

OpenSkyNet::CD::Collidable::Collidable ( const Math::Point<> &  center_ = Math::g_origin,
const Math::Matrix3x3 rot_ = Math::g_identityMatrix3x3,
void userPointer_ = 0,
Utils::uint  colGroup_ = COL_GROUP_HIT_ALL_HIT_BY_ALL 
)
inline
virtual OpenSkyNet::CD::Collidable::~Collidable ( )
inlinevirtual

Member Function Documentation

Utils::uint OpenSkyNet::CD::Collidable::canGroupHitMe ( Utils::uint  colGroup_) const
inline

Returns > 0 iff colGroup_ can collide w/ this object.

Parameters
colGroup_COL_GROUP_HIT_ALL_HIT_BY_ALL - object can hit everything hittable, AND object is hittable by all that can hit COL_GROUP_HIT_ALL_HIT_BY_NONE - object can hit everything hittable, AND object is not hittable by anything COL_GROUP_HIT_NONE_HIT_BY_ALL - object can not hit anything, AND object is hittable by all that can hit COL_GROUP_HIT_NONE_HIT_BY_NONE - object can not hit anything, AND object is not hittable by anything
Math::Point OpenSkyNet::CD::Collidable::getCenter ( ) const
inline
virtual bool OpenSkyNet::CD::Collidable::getClosestRayIntersection ( const Math::Point<> &  rayOrigin_,
const Math::Point<> &  rayDir_,
Math::Point<> &  hitPos_,
float &  t_,
Math::Point<> &  hitNormal_ 
) const
inlinevirtual

see Shape comments

Utils::uint OpenSkyNet::CD::Collidable::getColGroup ( ) const
inline
virtual float OpenSkyNet::CD::Collidable::getDist ( const Collidable aCollidable_) const
inlinevirtual
virtual bool OpenSkyNet::CD::Collidable::getFirstIntersection ( const Math::Point<> &  thisVel_,
const Collidable otherCollidable_,
const Math::Point<> &  otherVel_,
HitInfo hitInfo_ 
) const
inlinevirtual
const Math::Point& OpenSkyNet::CD::Collidable::getNonColCenter ( ) const
inline
const Math::Matrix3x3& OpenSkyNet::CD::Collidable::getNonColRot ( ) const
inline
Math::Matrix3x3 OpenSkyNet::CD::Collidable::getRot ( ) const
inline
virtual Shape* OpenSkyNet::CD::Collidable::getShape ( )
pure virtual

Implemented in OpenSkyNet::CD::Volume.

virtual const Shape* OpenSkyNet::CD::Collidable::getShape ( ) const
pure virtual

Implemented in OpenSkyNet::CD::Volume.

virtual SHAPE_TYPE OpenSkyNet::CD::Collidable::getType ( ) const
inlinevirtual
void* OpenSkyNet::CD::Collidable::getUserPointer ( ) const
inline
void OpenSkyNet::CD::Collidable::setCenter ( const Math::Point<> &  center_)
inline
void OpenSkyNet::CD::Collidable::setColGroup ( Utils::uint  colGroup_)
inline
void OpenSkyNet::CD::Collidable::setNonColTransform ( const Math::Point<> &  center_,
const Math::Matrix3x3 rot_ 
)
inline

Sets a transform known not to collide w/ other objects. This is used in iterative collision detection routines whereby only one object can be tested for a new transform at a time; the rest of the objects have to be at "safe" transforms.

void OpenSkyNet::CD::Collidable::setRot ( const Math::Matrix3x3 rot_)
inline
void OpenSkyNet::CD::Collidable::setUserPointer ( void userPointer_)
inline

The user pointer is typically a pointer to a containing Core::Object.

void OpenSkyNet::CD::Collidable::translate ( const Math::Point<> &  delta_)
inline

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