CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
Math::TRayIntersection< T > Struct Template Reference

A structure that describes an intersection with a ray. More...

#include <CeresEngine/Math/Geometry.hpp>

Public Member Functions

 TRayIntersection ()=default
 Creates a new false intersection.
 
 TRayIntersection (T distance)
 Creates a new true intersection.
 
 operator bool () const noexcept
 

Public Attributes

bool intersects = false
 true if the intersection happened, false otherwise.
 
distance = T(0.0)
 The distance to intersection point.
 

Detailed Description

template<typename T>
struct Math::TRayIntersection< T >

A structure that describes an intersection with a ray.

Constructor & Destructor Documentation

◆ TRayIntersection() [1/2]

template<typename T >
Math::TRayIntersection< T >::TRayIntersection ( )
default

Creates a new false intersection.

◆ TRayIntersection() [2/2]

template<typename T >
Math::TRayIntersection< T >::TRayIntersection ( distance)
inline

Creates a new true intersection.

Parameters
distanceThe distance to intersection point

Member Function Documentation

◆ operator bool()

template<typename T >
Math::TRayIntersection< T >::operator bool ( ) const
inlineexplicitnoexcept
Returns
true if the intersection happened, false otherwise.

Member Data Documentation

◆ distance

template<typename T >
T Math::TRayIntersection< T >::distance = T(0.0)

The distance to intersection point.

◆ intersects

template<typename T >
bool Math::TRayIntersection< T >::intersects = false

true if the intersection happened, false otherwise.


The documentation for this struct was generated from the following file: