omegalib
13.1
|
Representation of a ray in space, i.e. More...
#include <Ray.h>
Public Member Functions | |
Ray () | |
Ray (const Vector3f &origin, const Vector3f &direction) | |
void | setOrigin (const Vector3f &origin) |
Sets the origin of the ray. More... | |
const Vector3f & | getOrigin (void) const |
Gets the origin of the ray. More... | |
void | setDirection (const Vector3f &dir) |
Sets the direction of the ray. More... | |
const Vector3f & | getDirection (void) const |
Gets the direction of the ray. More... | |
Vector3f | getPoint (float t) const |
Gets the position of a point t units along the ray. More... | |
Vector3f | operator* (float 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 AlignedBox3 &box) const |
Tests whether this ray intersects the given box. More... | |
Vector3f | projectPoint (const Vector3f &point) const |
Computes the projection of a point. More... | |
Protected Attributes | |
Vector3f | mOrigin |
Vector3f | mDirection |
Representation of a ray in space, i.e.
a line with an origin and direction.
|
inline |
|
inline |
Gets the direction of the ray.
|
inline |
Gets the origin of the ray.
|
inline |
Gets the position of a point t units along the ray.
Tests whether this ray intersects the given plane.
|
inline |
Tests whether this ray intersects the given plane bounded volume.
Tests whether this ray intersects the given sphere.
|
inline |
Tests whether this ray intersects the given box.
|
inline |
Gets the position of a point t units along the ray.
Computes the projection of a point.
|
inline |
Sets the direction of the ray.
|
inline |
Sets the origin of the ray.
|
protected |
|
protected |