PF_API 0.52
|
#include <CDVolume.h>
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 |
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.
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] |
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.
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.
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] |
Reimplemented in OpenSkyNet::CD::Box, OpenSkyNet::CD::Plane, OpenSkyNet::CD::Box, and OpenSkyNet::CD::Plane.
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] |
Reimplemented in OpenSkyNet::CD::Box, OpenSkyNet::CD::Plane, OpenSkyNet::CD::Box, and OpenSkyNet::CD::Plane.
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.