DHART
Loading...
Searching...
No Matches
RayResult Struct Reference

The result of casting a ray at an object. Contains distance to the hitpoint and the ID of the mesh. More...

#include <raytracer_C.h>

+ Collaboration diagram for RayResult:

Public Member Functions

template<typename N , typename V >
void SetHit (const N &node, const V &direction, float dist, int mid)
 Update this result based on the ray intersection. Similar structures can be created to support different sethit functions. More...
 

Public Attributes

float distance = -1
 
int meshid = -1
 

Detailed Description

The result of casting a ray at an object. Contains distance to the hitpoint and the ID of the mesh.

Definition at line 89 of file raytracer_C.h.

Member Function Documentation

◆ SetHit()

template<typename N , typename V >
void RayResult::SetHit ( const N &  node,
const V &  direction,
float  dist,
int  mid 
)
inline

Update this result based on the ray intersection. Similar structures can be created to support different sethit functions.

Parameters
nodeNot used for this structure
directionNot used for this structure
distDistance from node to the hit_point
midID of the hit mesh

Definition at line 103 of file raytracer_C.h.

References distance, and meshid.

Member Data Documentation

◆ distance

float RayResult::distance = -1

Definition at line 90 of file raytracer_C.h.

Referenced by SetHit().

◆ meshid

int RayResult::meshid = -1

Definition at line 91 of file raytracer_C.h.

Referenced by SetHit().


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