HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT::BVHQuerySegment< NAXES > Struct Template Reference

#include <UT_BVHImpl.h>

Public Types

using BoxType = UT::Box< v4uf, NAXES >
 

Public Member Functions

template<bool INSTANTIATED>
SYS_FORCE_INLINE BVHQuerySegment (const UT_FixedVector< float, NAXES, INSTANTIATED > &p0, const UT_FixedVector< float, NAXES, INSTANTIATED > &p1)
 
SYS_FORCE_INLINE bool isValid (uint tree_point_index) const
 
template<bool INSTANTIATED, typename RADIUS_ARRAY >
SYS_FORCE_INLINE float distance2 (const UT_FixedVector< float, NAXES, INSTANTIATED > &tree_point, const RADIUS_ARRAY &radii, uint index) const
 This must be the exact distance squared. More...
 
template<bool farthest>
SYS_FORCE_INLINE uint boxHitAndDist2 (const BoxType &boxes, const float max_dist_squared, const uint internal_node_num, v4uf &dist2) const
 

Public Attributes

const UT_FixedVector< float,
NAXES > 
myP0
 
const UT_FixedVector< float,
NAXES > 
myP1
 
const UT_FixedVector< float,
NAXES > 
myDiff
 
const float myDiff2
 
const UT_FixedVector< v4uf, NAXES > myVP0
 
const UT_FixedVector< v4uf, NAXES > myVP1
 
const UT_FixedVector< v4uf, NAXES > myVDiff
 
const v4uf myVDiff2
 

Static Public Attributes

static constexpr bool theAllPointsValid = true
 isValid() doesn't need to be called, because theAllPointsValid is true. More...
 

Detailed Description

template<uint NAXES>
struct UT::BVHQuerySegment< NAXES >

This replaces UT_KDTubeQuery, but be careful, because this now takes p0 and p1, instead of p0 and dir, since it was confusing that dir was not a direction, but was p1-p0. This treats distance as the distance from a tree point to the query segment.

Definition at line 3167 of file UT_BVHImpl.h.

Member Typedef Documentation

template<uint NAXES>
using UT::BVHQuerySegment< NAXES >::BoxType = UT::Box<v4uf,NAXES>

Definition at line 3179 of file UT_BVHImpl.h.

Constructor & Destructor Documentation

template<uint NAXES>
template<bool INSTANTIATED>
SYS_FORCE_INLINE UT::BVHQuerySegment< NAXES >::BVHQuerySegment ( const UT_FixedVector< float, NAXES, INSTANTIATED > &  p0,
const UT_FixedVector< float, NAXES, INSTANTIATED > &  p1 
)
inline

Definition at line 3183 of file UT_BVHImpl.h.

Member Function Documentation

template<uint NAXES>
template<bool farthest>
SYS_FORCE_INLINE uint UT::BVHQuerySegment< NAXES >::boxHitAndDist2 ( const BoxType boxes,
const float  max_dist_squared,
const uint  internal_node_num,
v4uf dist2 
) const
inline

The distance squared can be an underestimate, but not an overestimate, of the true distance squared. The reverse is the case if farthest is true. Also, if farthest is true, max_dist_squared is actually min_dist_squared.

Definition at line 3240 of file UT_BVHImpl.h.

template<uint NAXES>
template<bool INSTANTIATED, typename RADIUS_ARRAY >
SYS_FORCE_INLINE float UT::BVHQuerySegment< NAXES >::distance2 ( const UT_FixedVector< float, NAXES, INSTANTIATED > &  tree_point,
const RADIUS_ARRAY &  radii,
uint  index 
) const
inline

This must be the exact distance squared.

Definition at line 3206 of file UT_BVHImpl.h.

template<uint NAXES>
SYS_FORCE_INLINE bool UT::BVHQuerySegment< NAXES >::isValid ( uint  tree_point_index) const
inline

NOTE: This doesn't necessarily need to be const, for subclasses that have a limit on the number of invalid points hit before giving up, for example.

Definition at line 3199 of file UT_BVHImpl.h.

Member Data Documentation

template<uint NAXES>
const UT_FixedVector<float, NAXES> UT::BVHQuerySegment< NAXES >::myDiff

Definition at line 3170 of file UT_BVHImpl.h.

template<uint NAXES>
const float UT::BVHQuerySegment< NAXES >::myDiff2

Definition at line 3171 of file UT_BVHImpl.h.

template<uint NAXES>
const UT_FixedVector<float, NAXES> UT::BVHQuerySegment< NAXES >::myP0

Definition at line 3168 of file UT_BVHImpl.h.

template<uint NAXES>
const UT_FixedVector<float, NAXES> UT::BVHQuerySegment< NAXES >::myP1

Definition at line 3169 of file UT_BVHImpl.h.

template<uint NAXES>
const UT_FixedVector<v4uf, NAXES> UT::BVHQuerySegment< NAXES >::myVDiff

Definition at line 3174 of file UT_BVHImpl.h.

template<uint NAXES>
const v4uf UT::BVHQuerySegment< NAXES >::myVDiff2

Definition at line 3175 of file UT_BVHImpl.h.

template<uint NAXES>
const UT_FixedVector<v4uf, NAXES> UT::BVHQuerySegment< NAXES >::myVP0

Definition at line 3172 of file UT_BVHImpl.h.

template<uint NAXES>
const UT_FixedVector<v4uf, NAXES> UT::BVHQuerySegment< NAXES >::myVP1

Definition at line 3173 of file UT_BVHImpl.h.

template<uint NAXES>
constexpr bool UT::BVHQuerySegment< NAXES >::theAllPointsValid = true
static

isValid() doesn't need to be called, because theAllPointsValid is true.

Definition at line 3178 of file UT_BVHImpl.h.


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