PF_API 0.52
Public Member Functions | Public Attributes

OpenSkyNet::CD::Shape Struct Reference

#include <CDVolume.h>

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

List of all members.

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_)
 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 ( ) [inline, virtual]
OpenSkyNet::CD::Shape::Shape ( const float &  boundingRadius_ = 0.0f) [inline]
virtual OpenSkyNet::CD::Shape::~Shape ( ) [inline, virtual]

Member Function Documentation

virtual bool OpenSkyNet::CD::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
virtual bool OpenSkyNet::CD::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
virtual float OpenSkyNet::CD::Shape::getDist ( const Math::Point<> &  thisCenter_,
const Math::Matrix3x3 thisRot_,
const Shape otherShape_,
const Math::Point<> &  otherCenter_,
const Math::Matrix3x3 otherRot_ 
) const [virtual]
virtual float OpenSkyNet::CD::Shape::getDist ( const Math::Point<> &  thisCenter_,
const Math::Matrix3x3 thisRot_,
const Shape otherShape_,
const Math::Point<> &  otherCenter_,
const Math::Matrix3x3 otherRot_ 
) const [virtual]
virtual bool OpenSkyNet::CD::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, and OpenSkyNet::CD::Box.

virtual bool OpenSkyNet::CD::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, and OpenSkyNet::CD::Box.

virtual SHAPE_TYPE OpenSkyNet::CD::Shape::getType ( ) const [pure virtual]
virtual SHAPE_TYPE OpenSkyNet::CD::Shape::getType ( ) const [pure virtual]
virtual void OpenSkyNet::CD::Shape::scale ( const Math::Point<> &  factor_) [inline, virtual]

Reimplemented in OpenSkyNet::CD::Box, and OpenSkyNet::CD::Box.

virtual void OpenSkyNet::CD::Shape::scale ( const Math::Point<> &  factor_) [inline, virtual]

Reimplemented in OpenSkyNet::CD::Box, and OpenSkyNet::CD::Box.


Member Data Documentation


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines