A ray class.
More...
#include <murl_math_ray.h>
template<class DataType>
class Murl::Math::Ray< DataType >
A ray class.
◆ ValueType
template<class DataType >
The template parameter value type.
◆ Ray() [1/3]
template<class DataType >
The default constructor.
This creates a ray starting at (0/0/0) and pointing towards the positive Z axis.
◆ Ray() [2/3]
template<class DataType >
Constructor taking origin and direction vectors.
- Parameters
-
origin | The ray origin. |
direction | The ray direction. |
◆ Ray() [3/3]
template<class DataType >
template<class DataType2 >
The copy constructor using a ray of different type.
- Parameters
-
◆ Set() [1/2]
template<class DataType >
Copy the content of a source ray to the ray instance.
- Parameters
-
other | The ray to copy from. |
◆ Set() [2/2]
template<class DataType >
Set a ray from given origin and direction vectors.
- Parameters
-
origin | The ray origin. |
direction | The ray direction. |
◆ SetOrigin()
template<class DataType >
Set the ray origin.
- Parameters
-
◆ GetOrigin()
template<class DataType >
Get the ray origin.
- Returns
- The ray origin.
◆ SetDirection()
template<class DataType >
Set the ray direction.
- Parameters
-
direction | The ray direction. |
◆ GetDirection()
template<class DataType >
Get the ray direction.
- Returns
- The ray direction.
◆ IsIntersecting() [1/2]
template<class DataType >
Check if the ray is intersecting a given sphere.
- Parameters
-
sphere | The sphere to check. |
lambda | An optional pointer to a variable receiving the lambda value of the intersection, i.e. the distance between the intersection point and the ray origin along the ray direction. |
- Returns
- true if the ray is intersecting the sphere.
◆ IsIntersecting() [2/2]
template<class DataType >
Check if the ray is intersecting a given box.
- Parameters
-
box | The box to check. |
lambda | An optional pointer to a variable receiving the lambda value of the intersection, i.e. the distance between the intersection point and the ray origin along the ray direction. |
- Returns
- true if the ray is intersecting the box.
◆ mOrigin
template<class DataType >
◆ mDirection
template<class DataType >
The direction of the ray.
The documentation for this class was generated from the following files:
- murl_graph_types.h
- murl_math_ray.h