HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_BVH.h File Reference
#include "UT_FixedVector.h"
#include "UT_SmallArray.h"
#include "UT_UniquePtr.h"
#include <SYS/SYS_Inline.h>
#include <SYS/SYS_StaticAssert.h>
#include <SYS/SYS_Types.h>
#include <SYS/SYS_TypeTraits.h>
#include <limits>
#include <stdlib.h>
+ Include dependency graph for UT_BVH.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  UT_Array< T >
 
struct  UT::Box< T, NAXES >
 
class  UT::BVH< N >
 
struct  UT::BVH< N >::Node
 
struct  UT::BVHOrderedStackEntry
 
struct  UT::ZeroRadiiWrapper
 
struct  UT::SingleRadiusWrapper
 
struct  UT::BVHQueryPointWrapper< QUERY_POINT >
 

Namespaces

 UT
 

Macros

#define __UT_BVH_h__
 
#define BVH_TRY_ALL_AXES   0
 

Typedefs

using UT::BVHUnorderedStack = UT_Array< UT::BVH< 4 >::INT_TYPE >
 
using UT::BVHUnorderedStackSmall = UT_SmallArray< UT::BVH< 4 >::INT_TYPE, 128 >
 
using UT::BVHOrderedStack = UT_Array< BVHOrderedStackEntry >
 
using UT::BVHOrderedStackSmall = UT_SmallArray< BVHOrderedStackEntry, 256 >
 
template<uint N>
using UT_BVH = UT::BVH< N >
 

Enumerations

enum  UT::BVH_Heuristic {
  UT::BVH_Heuristic::BOX_PERIMETER, UT::BVH_Heuristic::BOX_AREA, UT::BVH_Heuristic::BOX_VOLUME, UT::BVH_Heuristic::BOX_RADIUS,
  UT::BVH_Heuristic::BOX_RADIUS2, UT::BVH_Heuristic::BOX_RADIUS3, UT::BVH_Heuristic::MEDIAN_MAX_AXIS
}
 

Functions

template<uint BVH_N, typename ITEM_BOX , typename NODE_BOX >
SYS_FORCE_INLINE void UT::createBVHNodeBoxes (const UT::BVH< BVH_N > &bvh, const ITEM_BOX *item_boxes, NODE_BOX *node_boxes) noexcept
 
template<uint NAXES, typename T , uint BVH_N, typename ITEM_BOX , typename NODE_BOX >
SYS_FORCE_INLINE void UT::createBVHInterleavedBoxes (const UT::BVH< BVH_N > &bvh, const ITEM_BOX *item_boxes, NODE_BOX *node_boxes, float expand_factor=0.0f) noexcept
 
template<uint NAXES, typename T , typename ITEM_BOX , typename NODE_BOX , typename INT_TYPE0 = uint>
SYS_FORCE_INLINE void UT::createBVHInterleavedBoxes (const UT::BVH< 4 > &bvh, const ITEM_BOX *item_boxes, NODE_BOX *node_boxes, const v4uu *node_nitems, const INT_TYPE0 *indices_mapping=nullptr) noexcept
 
template<uint NAXES, typename INT_TYPE >
void UT::getIntersectingBoxes (const UT::BVH< 4 > &bvh, const UT::Box< v4uf, NAXES > *node_boxes, const UT::Box< float, NAXES > &query_box, UT_Array< INT_TYPE > &box_indices, BVHUnorderedStack &stack) noexcept
 
template<uint NAXES, typename INT_TYPE >
void UT::getIntersectingBoxesFromStack (const UT::BVH< 4 > &bvh, const UT::Box< v4uf, NAXES > *node_boxes, const UT::Box< float, NAXES > &query_box, UT_Array< INT_TYPE > &box_indices, BVHUnorderedStack &stack) noexcept
 
template<uint NAXES, typename INT_TYPE >
void UT::getIntersectingNodes (const UT::BVH< 4 > &bvh, const UT::Box< v4uf, NAXES > *node_boxes, const UT::Box< float, NAXES > &query_box, UT_Array< INT_TYPE > &box_indices, BVHUnorderedStack &stack) noexcept
 
template<uint NAXES, typename INT_TYPE , int BATCH_SIZE>
void UT::getIntersectingBoxesBatch (const UT::BVH< 4 > &bvh, const UT::Box< v4uf, NAXES > *node_boxes, const UT::Box< float, NAXES > *query_box, UT_Array< INT_TYPE > *box_indices, BVHUnorderedStack &stack) noexcept
 
void UT::computeNodeNItems (const UT::BVH< 4 > &bvh, v4uu *node_nitems, exint nitems) noexcept
 Computes the number of items per node entry and fills in node_nitems. More...
 
template<typename T >
constexpr bool UT::allRadiiZero (const T &array) noexcept
 
constexpr bool UT::allRadiiZero (const ZeroRadiiWrapper &array) noexcept
 
template<typename T >
constexpr bool UT::allRadiiZero (const T *const array) noexcept
 
template<bool farthest, bool reordered, bool use_max_points, uint NAXES, typename QUERY_POINT , typename INT_TYPE0 , typename POSITION_ARRAY , typename RADIUS_ARRAY >
void UT::findClosestPoints (const UT::BVH< 4 > &bvh, const UT::Box< v4uf, NAXES > *node_boxes, const v4uu *node_nitems, const INT_TYPE0 *indices_mapping, const POSITION_ARRAY &positions, QUERY_POINT &query_point, BVHOrderedStack &stack, BVHOrderedStack &output_queue, const RADIUS_ARRAY &radii=ZeroRadiiWrapper(), exint max_points=std::numeric_limits< exint >::max(), float max_dist_squared=std::numeric_limits< float >::max()) noexcept
 

Macro Definition Documentation

#define __UT_BVH_h__

Definition at line 16 of file UT_BVH.h.

#define BVH_TRY_ALL_AXES   0

Definition at line 28 of file UT_BVH.h.

Typedef Documentation

template<uint N>
using UT_BVH = UT::BVH<N>

Definition at line 833 of file UT_BVH.h.