My Project
|
Representation of a ray in space, i.e. More...
#include <ParaRay.h>
Public Member Functions | |
Ray (const Vector3 &origin, const Vector3 &direction) | |
void | setOrigin (const Vector3 &origin) |
Sets the origin of the ray. More... | |
const Vector3 & | getOrigin (void) const |
Gets the origin of the ray. More... | |
void | setDirection (const Vector3 &dir) |
Sets the direction of the ray. More... | |
const Vector3 & | getDirection (void) const |
Gets the direction of the ray. More... | |
Vector3 | getPoint (float t) const |
Gets the position of a point t units along the ray. More... | |
Vector3 | operator* (float t) const |
Gets the position of a point t units along the ray. More... | |
std::pair< bool, float > | intersects (const Plane &p) const |
Tests whether this ray intersects the given plane. More... | |
std::pair< bool, float > | intersects (const PlaneBoundedVolume &p) const |
Tests whether this ray intersects the given plane bounded volume. More... | |
std::pair< bool, float > | intersects (const Sphere &s) const |
Tests whether this ray intersects the given sphere. More... | |
std::pair< bool, float > | intersects (const AxisAlignedBox &box) const |
Tests whether this ray intersects the given box. More... | |
Protected Attributes | |
Vector3 | mOrigin |
Vector3 | mDirection |
Representation of a ray in space, i.e.
a line with an origin and direction.
|
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.
|
inline |
Tests whether this ray intersects the given plane.
|
inline |
Tests whether this ray intersects the given plane bounded volume.
|
inline |
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.
|
inline |
Sets the direction of the ray.
|
inline |
Sets the origin of the ray.