Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents a ray in 2D space. More...
#include <omRay2D.h>
Public Member Functions | |
Ray2D () | |
Create a ray starting at the origin pointing in the positive Y direction. More... | |
Ray2D (const VectorND< T, 2 > &newOrigin, const VectorND< T, 2 > &newDirection) | |
Create a ray with the specified origin and direction. More... | |
VectorND< T, 2 > | getPositionAt (T parameter) const |
Get the position along the ray at the specified parameter value. More... | |
VectorND< T, 2 > | normalize () const |
Return a new ray with a unit-length direction vector. More... | |
Public Attributes | |
VectorND< T, 2 > | origin |
The origin of the ray in 2D space;. More... | |
VectorND< T, 2 > | direction |
The direction of the ray in 2D space. More... | |
A class that represents a ray in 2D space.
This class contains two data members: origin and direction. Origin represents the starting position of the ray and direction represents the positively parameterized direction along the ray.
|
inline |
Create a ray starting at the origin pointing in the positive Y direction.
|
inline |
Create a ray with the specified origin and direction.
|
inline |
Get the position along the ray at the specified parameter value.
This position is calculated using the equation: position = origin + parameter*direction.
|
inline |
Return a new ray with a unit-length direction vector.
VectorND<T,2> om::math::Ray2D< T >::origin |
The origin of the ray in 2D space;.
VectorND<T,2> om::math::Ray2D< T >::direction |
The direction of the ray in 2D space.