DHART
Loading...
Searching...
No Matches
HF::RayTracer::HitStruct< numeric_type > Struct Template Reference

A simple hit struct to carry all relevant information about hits. More...

#include <HitStruct.h>

+ Collaboration diagram for HF::RayTracer::HitStruct< numeric_type >:

Public Member Functions

 HitStruct ()
 
 HitStruct (numeric_type in_distance, int in_meshid)
 
bool DidHit () const
 Determine whether or not this hitstruct contains a hit. More...
 

Public Attributes

numeric_type distance
 Distance from the origin point to the hit point. Set to -1 if no hit was recorded. More...
 
int meshid
 The ID of the hit mesh. Set to -1 if no hit was recorded. More...
 

Detailed Description

template<typename numeric_type = double>
struct HF::RayTracer::HitStruct< numeric_type >

A simple hit struct to carry all relevant information about hits.

Definition at line 7 of file HitStruct.h.

Constructor & Destructor Documentation

◆ HitStruct() [1/2]

template<typename numeric_type = double>
HF::RayTracer::HitStruct< numeric_type >::HitStruct ( )
inline

Definition at line 11 of file HitStruct.h.

◆ HitStruct() [2/2]

template<typename numeric_type = double>
HF::RayTracer::HitStruct< numeric_type >::HitStruct ( numeric_type  in_distance,
int  in_meshid 
)
inline

Definition at line 13 of file HitStruct.h.

Member Function Documentation

◆ DidHit()

template<typename numeric_type = double>
bool HF::RayTracer::HitStruct< numeric_type >::DidHit ( ) const
inline

Determine whether or not this hitstruct contains a hit.

Returns
True if the point hit, false if it did not

Definition at line 17 of file HitStruct.h.

References HF::RayTracer::DidIntersect().

Referenced by HF::GraphGenerator::CheckRay(), HF::RayTracer::EmbreeRayTracer::IntersectOutputArguments(), and HF::RayTracer::EmbreeRayTracer::PointIntersection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ distance

template<typename numeric_type = double>
numeric_type HF::RayTracer::HitStruct< numeric_type >::distance

◆ meshid

template<typename numeric_type = double>
int HF::RayTracer::HitStruct< numeric_type >::meshid

The ID of the hit mesh. Set to -1 if no hit was recorded.

Definition at line 9 of file HitStruct.h.

Referenced by HF::GraphGenerator::CheckRay(), HF::RayTracer::EmbreeRayTracer::Intersect(), and HF::RayTracer::EmbreeRayTracer::IntersectOutputArguments().


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