My Project
|
A ray is a half-line P(t) = mOrig + mDir * t, with 0 <= t <= +infinity. More...
#include <ShapeRay.h>
Public Member Functions | |
CShapeRay (const Vector3 &orig, const Vector3 &dir) | |
CShapeRay (const CShapeRay &ray) | |
Copy constructor. | |
float | SquareDistance (const Vector3 &point, float *t=NULL) const |
float | Distance (const Vector3 &point, float *t=NULL) const |
std::pair< bool, float > | intersects (const CShapeAABB &box, const Matrix4 *world=NULL) const |
Tests whether this ray intersects the given box. More... | |
int | IntersectPlane (const Plane *plane, Vector3 *point, float *distance) const |
int | IntersectBox (const CShapeBox *box, Vector3 *point, float *distance) const |
Public Attributes | |
Vector3 | mOrig |
Ray origin. | |
Vector3 | mDir |
Normalized direction. | |
A ray is a half-line P(t) = mOrig + mDir * t, with 0 <= t <= +infinity.
point | can be NULL |
distance | can be NULL |
std::pair< bool, float > CShapeRay::intersects | ( | const CShapeAABB & | box, |
const Matrix4 * | world = NULL |
||
) | const |
Tests whether this ray intersects the given box.
box | aabb box |
world | a rotation transform applied to AABB. This can be NULL. |