opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
osc::BVH Class Referencefinal

#include <bvh.h>

Public Member Functions

void clear ()
 
void build_from_indexed_triangles (std::span< const Vector3 > vertices, std::span< const uint16_t > indices)
 
void build_from_indexed_triangles (std::span< const Vector3 > vertices, std::span< const uint32_t > indices)
 
std::optional< BVHCollisionclosest_ray_indexed_triangle_collision (std::span< const Vector3 > vertices, std::span< const uint16_t > indices, const Ray &) const
 
std::optional< BVHCollisionclosest_ray_indexed_triangle_collision (std::span< const Vector3 > vertices, std::span< const uint32_t > indices, const Ray &) const
 
void build_from_aabbs (std::span< const AABB >)
 
void for_each_ray_aabb_collision (const Ray &, const std::function< void(BVHCollision)> &) const
 
bool empty () const
 
size_t max_depth () const
 
std::optional< AABBbounds () const
 
void for_each_leaf_node (const std::function< void(const BVHNode &)> &) const
 
void for_each_leaf_or_inner_node (const std::function< void(const BVHNode &)> &) const
 

Member Function Documentation

◆ bounds()

std::optional< AABB > osc::BVH::bounds ( ) const

◆ build_from_aabbs()

void osc::BVH::build_from_aabbs ( std::span< const AABB )

◆ build_from_indexed_triangles() [1/2]

void osc::BVH::build_from_indexed_triangles ( std::span< const Vector3 vertices,
std::span< const uint16_t indices 
)

◆ build_from_indexed_triangles() [2/2]

void osc::BVH::build_from_indexed_triangles ( std::span< const Vector3 vertices,
std::span< const uint32_t indices 
)

◆ clear()

void osc::BVH::clear ( )

◆ closest_ray_indexed_triangle_collision() [1/2]

std::optional< BVHCollision > osc::BVH::closest_ray_indexed_triangle_collision ( std::span< const Vector3 vertices,
std::span< const uint16_t indices,
const Ray  
) const

◆ closest_ray_indexed_triangle_collision() [2/2]

std::optional< BVHCollision > osc::BVH::closest_ray_indexed_triangle_collision ( std::span< const Vector3 vertices,
std::span< const uint32_t indices,
const Ray  
) const

◆ empty()

bool osc::BVH::empty ( ) const

◆ for_each_leaf_node()

void osc::BVH::for_each_leaf_node ( const std::function< void(const BVHNode &)> &  ) const

◆ for_each_leaf_or_inner_node()

void osc::BVH::for_each_leaf_or_inner_node ( const std::function< void(const BVHNode &)> &  ) const

◆ for_each_ray_aabb_collision()

void osc::BVH::for_each_ray_aabb_collision ( const Ray ,
const std::function< void(BVHCollision)> &   
) const

◆ max_depth()

size_t osc::BVH::max_depth ( ) const

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