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