HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT::BVHQueryTetrahedron Struct Reference

#include <UT_BVHImpl.h>

Public Types

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

Public Member Functions

template<bool INSTANTIATED>
SYS_FORCE_INLINE BVHQueryTetrahedron (const UT_FixedVector< float, NAXES, INSTANTIATED > &a, const UT_FixedVector< float, NAXES, INSTANTIATED > &b, const UT_FixedVector< float, NAXES, INSTANTIATED > &c, const UT_FixedVector< float, NAXES, INSTANTIATED > &d)
 
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

UT_FixedVector< float, NAXESmyDirs [4]
 
UT_FixedVector< float, NAXESmyIncentre
 
float myDist
 
UT_FixedVector< v4uf, NAXESmyVDirs [4]
 
UT_FixedVector< v4uf, NAXESmyVIncentre
 
v4uf myVDist
 

Static Public Attributes

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

Detailed Description

This replaces UT_KDTetQuery. Lookup information for 3D-tree tetrahedron queries NOTE: Distance squared here is not Euclidean distance squared, but edge-perpendicular distance squared, i.e. distance is from the incentre out, perpendicular to one of the edges, minus the insphere's radius. This avoids the need to have special cases for what would be the spherical sections around each vertex. It basically indicates how far the tetrahedron would have to be expanded (or contracted) relative to the incentre in order to hit the query point.

Definition at line 3713 of file UT_BVHImpl.h.

Member Typedef Documentation

Definition at line 3724 of file UT_BVHImpl.h.

Constructor & Destructor Documentation

template<bool INSTANTIATED>
SYS_FORCE_INLINE UT::BVHQueryTetrahedron::BVHQueryTetrahedron ( const UT_FixedVector< float, NAXES, INSTANTIATED > &  a,
const UT_FixedVector< float, NAXES, INSTANTIATED > &  b,
const UT_FixedVector< float, NAXES, INSTANTIATED > &  c,
const UT_FixedVector< float, NAXES, INSTANTIATED > &  d 
)
inline

Definition at line 3728 of file UT_BVHImpl.h.

Member Function Documentation

template<bool farthest>
SYS_FORCE_INLINE uint UT::BVHQueryTetrahedron::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 3813 of file UT_BVHImpl.h.

template<bool INSTANTIATED, typename RADIUS_ARRAY >
SYS_FORCE_INLINE float UT::BVHQueryTetrahedron::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 3794 of file UT_BVHImpl.h.

SYS_FORCE_INLINE bool UT::BVHQueryTetrahedron::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 3787 of file UT_BVHImpl.h.

Member Data Documentation

UT_FixedVector<float, NAXES> UT::BVHQueryTetrahedron::myDirs[4]

Definition at line 3715 of file UT_BVHImpl.h.

float UT::BVHQueryTetrahedron::myDist

Definition at line 3717 of file UT_BVHImpl.h.

UT_FixedVector<float, NAXES> UT::BVHQueryTetrahedron::myIncentre

Definition at line 3716 of file UT_BVHImpl.h.

UT_FixedVector<v4uf, NAXES> UT::BVHQueryTetrahedron::myVDirs[4]

Definition at line 3718 of file UT_BVHImpl.h.

v4uf UT::BVHQueryTetrahedron::myVDist

Definition at line 3720 of file UT_BVHImpl.h.

UT_FixedVector<v4uf, NAXES> UT::BVHQueryTetrahedron::myVIncentre

Definition at line 3719 of file UT_BVHImpl.h.

constexpr uint UT::BVHQueryTetrahedron::NAXES = 3
static

Definition at line 3714 of file UT_BVHImpl.h.

constexpr bool UT::BVHQueryTetrahedron::theAllPointsValid = true
static

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

Definition at line 3723 of file UT_BVHImpl.h.


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