cgv
Loading...
Searching...
No Matches
cgv::data::bvh_result Struct Reference

The result of a BVH intersection test. More...

#include <bvh.h>

Public Attributes

bool is_hit = false
 True if a primitive was hit.
 
ray_intersection_info intersection
 Intersection information of the hit.
 
size_t primitive_index = std::numeric_limits<size_t>::max()
 The index of the hit primitive as given during BVH construction.
 
const ray_intersectableprimitive = nullptr
 A pointer to the hit primitive.
 

Detailed Description

The result of a BVH intersection test.

The members may only contain valid data if is_hit is true.

Definition at line 61 of file bvh.h.

Member Data Documentation

◆ intersection

ray_intersection_info cgv::data::bvh_result::intersection

Intersection information of the hit.

Definition at line 65 of file bvh.h.

Referenced by cgv::data::bvh::closest_intersection().

◆ is_hit

bool cgv::data::bvh_result::is_hit = false

True if a primitive was hit.

Definition at line 63 of file bvh.h.

Referenced by cgv::data::bvh::closest_intersection().

◆ primitive

const ray_intersectable* cgv::data::bvh_result::primitive = nullptr

A pointer to the hit primitive.

Definition at line 69 of file bvh.h.

Referenced by cgv::data::bvh::closest_intersection().

◆ primitive_index

size_t cgv::data::bvh_result::primitive_index = std::numeric_limits<size_t>::max()

The index of the hit primitive as given during BVH construction.

Definition at line 67 of file bvh.h.

Referenced by cgv::data::bvh::closest_intersection().


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