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 | Public Attributes | List of all members
OpenSkyNet::CD::Shape Struct Referenceabstract

#include <CDVolume.h>

Inheritance diagram for OpenSkyNet::CD::Shape:
OpenSkyNet::CD::Box OpenSkyNet::CD::Plane OpenSkyNet::CD::Sphere

Public Member Functions

 Shape (const float &boundingRadius_=0.0f)
 
virtual ~Shape ()
 
virtual SHAPE_TYPE getType () const =0
 
virtual float getDist (const Math::Point<> &thisCenter_, const Math::Matrix3x3 &thisRot_, const Shape *otherShape_, const Math::Point<> &otherCenter_, const Math::Matrix3x3 &otherRot_) const
 
virtual bool getFirstIntersection (const Math::Point<> &thisCenter_, const Math::Matrix3x3 &thisRot_, const Math::Point<> &thisVel_, const Shape *otherShape_, const Math::Point<> &otherCenter_, const Math::Matrix3x3 &otherRot_, const Math::Point<> &otherVel_, HitInfo &hitInfo_) const
 
virtual bool getClosestRayIntersection (const Math::Point<> &thisCenter_, const Math::Matrix3x3 &thisRot_, const Math::Point<> &rayOrigin_, const Math::Point<> &rayDir_, Math::Point<> &hitPos_, float &t_, Math::Point<> &hitNormal_) const
 
virtual void scale (const Math::Point<> &factor_)
 

Public Attributes

float _boundingRadius
 

Detailed Description

Shape and its subclasses are 3D manifolds w/ out a transform. An undefined shape can still be used for collision detection purposes since a bounding radius is defined for all shapes in the CD namespace.

Constructor & Destructor Documentation

OpenSkyNet::CD::Shape::Shape ( const float &  boundingRadius_ = 0.0f)
inline
virtual OpenSkyNet::CD::Shape::~Shape ( )
inlinevirtual

Member Function Documentation

bool Shape::getClosestRayIntersection ( const Math::Point<> &  thisCenter_,
const Math::Matrix3x3 thisRot_,
const Math::Point<> &  rayOrigin_,
const Math::Point<> &  rayDir_,
Math::Point<> &  hitPos_,
float &  t_,
Math::Point<> &  hitNormal_ 
) const
virtual

NOTE: For bounding spheres, if the ray starts inside the radius, then the hit position will be the ray origin, and the hit normal will be opposite the ray's direction, i.e., this is not considered to be a hollow shape.

Parameters
t_= distance of ray intersection from ray origin
float Shape::getDist ( const Math::Point<> &  thisCenter_,
const Math::Matrix3x3 thisRot_,
const Shape otherShape_,
const Math::Point<> &  otherCenter_,
const Math::Matrix3x3 otherRot_ 
) const
virtual
bool Shape::getFirstIntersection ( const Math::Point<> &  thisCenter_,
const Math::Matrix3x3 thisRot_,
const Math::Point<> &  thisVel_,
const Shape otherShape_,
const Math::Point<> &  otherCenter_,
const Math::Matrix3x3 otherRot_,
const Math::Point<> &  otherVel_,
HitInfo hitInfo_ 
) const
virtual

Reimplemented in OpenSkyNet::CD::Box.

virtual SHAPE_TYPE OpenSkyNet::CD::Shape::getType ( ) const
pure virtual
virtual void OpenSkyNet::CD::Shape::scale ( const Math::Point<> &  factor_)
inlinevirtual

Reimplemented in OpenSkyNet::CD::Box.

Member Data Documentation

float OpenSkyNet::CD::Shape::_boundingRadius

The documentation for this struct was generated from the following files: