opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
bvh_prim.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <cstddef>
6
7namespace osc
8{
9 // a primitive (leaf) in the BVH
10 //
11 // IDs and bounds an element from the input data (triangles/AABBs)
12 class BVHPrim final {
13 public:
15 id_{id},
16 bounds_{bounds}
17 {}
18
19 ptrdiff_t id() const { return id_; }
20 const AABB& bounds() const { return bounds_; }
21
22 private:
23 ptrdiff_t id_{};
24 AABB bounds_{};
25 };
26}
Definition bvh_prim.h:12
BVHPrim(ptrdiff_t id, const AABB &bounds)
Definition bvh_prim.h:14
const AABB & bounds() const
Definition bvh_prim.h:20
ptrdiff_t id() const
Definition bvh_prim.h:19
Definition custom_decoration_generator.h:5
constexpr U to(T &&value)
Definition conversion.h:56
Definition aabb.h:14