Photon Engine 2.0.0-beta
A physically based renderer.
|
Represents a ray in space. More...
#include <Ray.h>
Public Member Functions | |
Ray ()=default | |
A ray with unspecified state. | |
Ray (const math::Vector3R &origin, const math::Vector3R &direction) | |
A longest possible ray. | |
Ray (const math::Vector3R &origin, const math::Vector3R &direction, const Time &time) | |
A longest possible ray. | |
Ray (const math::Vector3R &origin, const math::Vector3R &direction, real minT, real maxT) | |
A ray segment. | |
Ray (const math::Vector3R &origin, const math::Vector3R &direction, real minT, real maxT, const Time &time) | |
A ray segment. | |
Ray (const math::TLineSegment< real > &segment, const Time &time) | |
A ray segment. | |
Ray & | reverse () |
Points this ray in opposite direction. | |
void | setMinT (real t) |
Set the parametric distance where the ray starts. | |
void | setMaxT (real t) |
Set the parametric distance where the ray ends. | |
void | setRange (real minT, real maxT) |
Set the parametric range where the ray extends. | |
void | setOrigin (const math::Vector3R &pos) |
Set the origin of the ray. | |
void | setDir (const math::Vector3R &dir) |
Set the direction vector of the ray. | |
void | setSegment (const math::TLineSegment< real > &segment) |
void | setTime (const Time &time) |
Set the associated time of this ray. | |
const Time & | getTime () const |
Get the associated time of this ray. | |
Getters | |
Basic getters for line attributes. See corresponding setters (if present) for more info. | |
const math::Vector3R & | getOrigin () const |
const math::Vector3R & | getDir () const |
real | getMinT () const |
real | getMaxT () const |
const math::TLineSegment< real > & | getSegment () const |
math::Vector3R | getTail () const |
Get the coordinates on minimum parametric distance. | |
math::Vector3R | getHead () const |
Get the coordinates on maximum parametric distance. | |
Represents a ray in space.
A ray is essentially a line segment in space with additional attributes (for example, time). Note the direction vector of the ray does not need to be normalized.
|
default |
A ray with unspecified state.
|
inline |
A longest possible ray.
direction | Does not need to be normalized. |
|
inline |
A longest possible ray.
direction | Does not need to be normalized. |
|
inline |
A ray segment.
minT | Parametric distance where the ray begins. |
maxT | Parametric distance where the ray ends. |
|
inline |
A ray segment.
minT | Parametric distance where the ray begins. |
maxT | Parametric distance where the ray ends. |
time | The associated time of this ray. |
|
inline |
A ray segment.
minT | Parametric distance where the ray begins. |
maxT | Parametric distance where the ray ends. |
time | The associated time of this ray. |
|
inline |
|
inline |
Get the coordinates on maximum parametric distance.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get the coordinates on minimum parametric distance.
|
inline |
Get the associated time of this ray.
|
inline |
Points this ray in opposite direction.
This method essentially mirrored the ray with respect to its origin, with other attributes remain the same.
|
inline |
Set the direction vector of the ray.
Note that the vector does not need to be normalized.
|
inline |
Set the parametric distance where the ray ends.
|
inline |
Set the parametric distance where the ray starts.
|
inline |
Set the origin of the ray.
|
inline |
Set the parametric range where the ray extends.
The range is [minT, maxT). This is equivalent to calling setMinT(real) and setMaxT(real) together.
|
inline |
|
inline |
Set the associated time of this ray.