Thea
Public Types | Public Member Functions | List of all members
RayIntersectionN< N, T > Class Template Reference

A description of the intersection point of a ray with an object. More...

#include <RayIntersectableN.hpp>

Inheritance diagram for RayIntersectionN< N, T >:
RayStructureIntersectionN< N, T >

Public Types

typedef Vector< N, T > VectorT
 N-dimensional vector. More...
 

Public Member Functions

VectorT const & getNormal () const
 Get the normal at the intersection point. More...
 
getTime () const
 Get the intersection time. More...
 
bool hasNormal () const
 Check if the normal at the intersection point is known. More...
 
bool isValid () const
 Check if the intersection is valid. More...
 
 RayIntersectionN (T time_=-1, VectorT const *normal_=nullptr)
 Constructor. More...
 
void setNormal (VectorT const &normal_)
 Set the normal at the intersection point. More...
 
void setTime (T time_)
 Set the intersection time. More...
 

Detailed Description

template<int N, typename T = Real>
class Thea::RayIntersectionN< N, T >

A description of the intersection point of a ray with an object.

Specifies the hit time and the normal at the intersection point.

Definition at line 28 of file RayIntersectableN.hpp.

Member Typedef Documentation

typedef Vector<N, T> VectorT

N-dimensional vector.

Definition at line 31 of file RayIntersectableN.hpp.

Constructor & Destructor Documentation

RayIntersectionN ( time_ = -1,
VectorT const *  normal_ = nullptr 
)

Constructor.

Definition at line 40 of file RayIntersectableN.hpp.

Member Function Documentation

VectorT const& getNormal ( ) const

Get the normal at the intersection point.

The return value is undefined if hasNormal() returns false.

Definition at line 57 of file RayIntersectableN.hpp.

T getTime ( ) const

Get the intersection time.

Definition at line 48 of file RayIntersectableN.hpp.

bool hasNormal ( ) const

Check if the normal at the intersection point is known.

Definition at line 54 of file RayIntersectableN.hpp.

bool isValid ( ) const

Check if the intersection is valid.

Definition at line 45 of file RayIntersectableN.hpp.

void setNormal ( VectorT const &  normal_)

Set the normal at the intersection point.

hasNormal() will subsequently return true.

Definition at line 60 of file RayIntersectableN.hpp.

void setTime ( time_)

Set the intersection time.

Definition at line 51 of file RayIntersectableN.hpp.


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