Representation of a ray in space, i.e. More...
#include <OgreRay.h>
Public Member Functions | |
Ray () | |
Ray (const Vector3 &origin, const Vector3 &direction) | |
const Vector3 & | getDirection (void) const |
Gets the direction of the ray. More... | |
const Vector3 & | getOrigin (void) const |
Gets the origin of the ray. More... | |
Vector3 | getPoint (Real t) const |
Gets the position of a point t units along the ray. More... | |
std::pair< bool, Real > | intersects (const Plane &p) const |
Tests whether this ray intersects the given plane. More... | |
std::pair< bool, Real > | intersects (const PlaneBoundedVolume &p) const |
Tests whether this ray intersects the given plane bounded volume. More... | |
std::pair< bool, Real > | intersects (const Sphere &s) const |
Tests whether this ray intersects the given sphere. More... | |
std::pair< bool, Real > | intersects (const AxisAlignedBox &box) const |
Tests whether this ray intersects the given box. More... | |
Vector3 | operator* (Real t) const |
Gets the position of a point t units along the ray. More... | |
void | setDirection (const Vector3 &dir) |
Sets the direction of the ray. More... | |
void | setOrigin (const Vector3 &origin) |
Sets the origin of the ray. More... | |
Protected Attributes | |
Vector3 | mDirection |
Vector3 | mOrigin |
Representation of a ray in space, i.e.
a line with an origin and direction.
|
inline |
|
inline |
Tests whether this ray intersects the given plane.
Definition at line 82 of file OgreRay.h.
References Ogre::Math::intersects().
|
inline |
Tests whether this ray intersects the given plane bounded volume.
Definition at line 92 of file OgreRay.h.
References Ogre::Math::intersects(), Ogre::PlaneBoundedVolume::outside, Ogre::PlaneBoundedVolume::planes, and Ogre::Plane::POSITIVE_SIDE.
Tests whether this ray intersects the given sphere.
Definition at line 102 of file OgreRay.h.
References Ogre::Math::intersects().
|
inline |
Tests whether this ray intersects the given box.
Definition at line 112 of file OgreRay.h.
References Ogre::Math::intersects().
|
inline |
|
inline |