|
HDK
|
#include <GEO_BVH.h>
Inheritance diagram for GEO::BVHBase< NAXES, SUBCLASS >:Classes | |
| struct | AllHitsAndNormalsFunctor |
| struct | AllHitsFunctor |
| struct | CommonHitInfo |
| struct | HitInfo |
| struct | HitInfoAndNormal |
| struct | ItemHitInfo |
| struct | MinInfo |
| struct | SingleHitAndNormalFunctor |
| struct | SingleHitFunctor |
Public Types | |
| using | VectorType = typename SYS_SelectType< UT_Vector2, UT_Vector3, NAXES==3 >::type |
| using | UintVectorType = typename SYS_SelectType< UT_FixedVector< uint, 2 >, UT_FixedVector< uint, 3 >, NAXES==3 >::type |
| using | SingleBoxType = UT::Box< float, NAXES > |
| using | BoxType = UT::Box< v4uf, NAXES > |
| using | PosAttribType = GA_ROHandleT< VectorType > |
| using | RadAttribType = GA_ROHandleF |
Public Member Functions | |
| BVHBase () noexcept | |
| ~BVHBase () noexcept | |
| SYS_FORCE_INLINE bool | isEmpty () const noexcept |
| template<bool farthest = false, bool rm_backface = false, bool reverse = false, typename HitInfoType > | |
| void | sendRay (const VectorType &origin, const VectorType &direction, HitInfoType &hit_info, float tmin=0, float tmax=std::numeric_limits< float >::max()) const noexcept |
| template<bool farthest = false, bool rm_backface = false, bool reverse = false, typename HitInfoType > | |
| void | sendRayRad (const VectorType &origin, const VectorType &direction, HitInfoType &hit_info, float default_radius, float tmin=0, float tmax=std::numeric_limits< float >::max()) const noexcept |
| template<bool rm_backface = false, bool reverse = false, bool sort = true, typename HitInfoType > | |
| void | sendRayAll (const VectorType &origin, const VectorType &direction, UT_Array< HitInfoType > &hit_info, UT_Array< exint > *nesting_temp_array=nullptr, float duplicate_tolerance=0, float tmin=0, float tmax=std::numeric_limits< float >::max()) const noexcept |
| template<bool rm_backface = false, bool reverse = false, bool sort = true, typename HitInfoType > | |
| void | sendRayAllRad (const VectorType &origin, const VectorType &direction, UT_Array< HitInfoType > &hit_info, float default_radius, UT_Array< exint > *nesting_temp_array=nullptr, float duplicate_tolerance=0, float tmin=0, float tmax=std::numeric_limits< float >::max()) const noexcept |
| template<bool farthest, bool rm_backface, bool reverse, typename FUNCTOR > | |
| void | sendRayGeneric (VectorType origin, VectorType direction, FUNCTOR &hit_info, float tmin=0, float tmax=std::numeric_limits< float >::max()) const noexcept |
| void | findClosestToLine (VectorType origin, VectorType direction, const exint max_points, const float max_dist_squared, UT::BVHOrderedStack &output_queue) const noexcept |
Finds the closest points to the infinite line containing origin with direction direction. More... | |
| void | findClosestToSegment (VectorType p0, VectorType p1, const exint max_points, const float max_dist_squared, UT::BVHOrderedStack &output_queue) const noexcept |
Finds the closest points to the line segment with endpoints p0 and p1. More... | |
| void | findClosestInCone (VectorType origin, VectorType direction, const float angle, const exint max_points, const float max_dist_squared, UT::BVHOrderedStack &output_queue) const noexcept |
| template<bool farthest> | |
| void | findClosest (VectorType origin, MinInfo &min_info, float max_dist_squared=std::numeric_limits< float >::max()) const noexcept |
| template<bool farthest> | |
| void | findProximity (UT_Array< MinInfo > &min_info, const VectorType &origin, float max_dist_squared=std::numeric_limits< float >::max()) const noexcept |
| void | getIntersectingBoxes (const SingleBoxType &query_box, UT_Array< exint > &box_indices) const noexcept |
| SYS_FORCE_INLINE exint | numPoints () const noexcept |
| SYS_FORCE_INLINE GA_Offset | pointOffset (exint item_index) const noexcept |
| template<bool normalize = true> | |
| VectorType | getGeometricNormal (const CommonHitInfo &hit_info) const noexcept |
| void | getDerivs (const CommonHitInfo &hit_info, VectorType &dP_du, VectorType &dP_dv) const noexcept |
| Fills in the values of dP/du and dP/dv for the hit surface. More... | |
| template<GA_AttributeOwner owner, typename T , typename DEST_T > | |
| bool | getAttribute (const CommonHitInfo &hit_info, const GA_ROHandleT< T > &attrib, const GEO_Detail &detail, DEST_T &value) const noexcept |
| SingleBoxType | getBBox () const noexcept |
| template<bool normalize> | |
| BVHBase< NAXES, SUBCLASS > ::VectorType | getGeometricNormal (const CommonHitInfo &hit_info) const noexcept |
Static Public Member Functions | |
| static void | pointUVWToPolar (VectorType &uvw) noexcept |
Protected Types | |
| using | NodeData = BoxType |
Protected Member Functions | |
| void | clear () noexcept |
| SYS_FORCE_INLINE SUBCLASS * | subclass () noexcept |
| SYS_FORCE_INLINE const SUBCLASS * | subclass () const noexcept |
| template<bool farthest, typename FUNC > | |
| int | traverseBVH (const UT_FixedVector< v4uf, NAXES > &vorigin, float &max_dist_squared, FUNC &op) const noexcept |
| template<bool farthest, typename QUERY_POINT > | |
| void | findMaximalPointsCommon (const QUERY_POINT &query_point, UT::BVHOrderedStack &stack, UT::BVHOrderedStack &output_queue, exint max_points, float max_dist_squared) const noexcept |
Protected Attributes | |
| UT_BVH< BVH_N > | myTree |
| UT_UniquePtr< BoxType[]> | myNodeBoxes |
| UT_UniquePtr< UT_FixedVector < int32, BVH_N >[]> | myNodeNItems |
| UT_Array< VectorType > | myPositions |
| Positions for points. More... | |
| UT_Array< float > | myRadii |
| Radii for disconnected points. More... | |
| PosAttribType | myPosAttrib |
| RadAttribType | myRadAttrib |
| GA_OffsetList | myPoints |
| Disconnected points. More... | |
| bool | myHasCurvesOrPoints |
| GA_DataId | myPositionsDataId |
| GA_DataId | myRadiiDataId |
Static Protected Attributes | |
| static constexpr uint | BVH_N = 4 |
| using GEO::BVHBase< NAXES, SUBCLASS >::BoxType = UT::Box<v4uf,NAXES> |
|
protected |
| using GEO::BVHBase< NAXES, SUBCLASS >::PosAttribType = GA_ROHandleT<VectorType> |
| using GEO::BVHBase< NAXES, SUBCLASS >::RadAttribType = GA_ROHandleF |
| using GEO::BVHBase< NAXES, SUBCLASS >::SingleBoxType = UT::Box<float,NAXES> |
| using GEO::BVHBase< NAXES, SUBCLASS >::UintVectorType = typename SYS_SelectType<UT_FixedVector<uint,2>,UT_FixedVector<uint,3>,NAXES==3>::type |
| using GEO::BVHBase< NAXES, SUBCLASS >::VectorType = typename SYS_SelectType<UT_Vector2,UT_Vector3,NAXES==3>::type |
|
inlinenoexcept |
|
inlinenoexcept |
|
protectednoexcept |
Definition at line 34 of file GEO_BVHImpl.h.
|
noexcept |
Finds the closest (or farthest) position to origin on any surface, as long as it's within max_dist_squared. NOTE: If farthest is true, max_dist_squared is actually the minimum distance squared from the origin, so you will need to specify a value.
Definition at line 1195 of file GEO_BVHImpl.h.
|
noexcept |
Finds the closest points from the origin to any surface within max_dist_squared, within the cone containing all points at most angle away from direction.
Definition at line 1103 of file GEO_BVHImpl.h.
|
noexcept |
Finds the closest points to the infinite line containing origin with direction direction.
Definition at line 1065 of file GEO_BVHImpl.h.
|
noexcept |
Finds the closest points to the line segment with endpoints p0 and p1.
Definition at line 1084 of file GEO_BVHImpl.h.
|
protectednoexcept |
Definition at line 992 of file GEO_BVHImpl.h.
|
noexcept |
Finds the closest (or farthest) position(s) to origin on any surface, as long as it's within max_dist_squared. NOTE: If farthest is true, max_dist_squared is actually the minimum distance squared from the origin, so you will need to specify a value.
Definition at line 1563 of file GEO_BVHImpl.h.
|
noexcept |
Returns true on success, false on failure. The function can fail if the hit is on a point and the attribute is a vertex or primitive attribute.
Definition at line 1753 of file GEO_BVHImpl.h.
|
inlinenoexcept |
|
noexcept |
Fills in the values of dP/du and dP/dv for the hit surface.
Definition at line 1691 of file GEO_BVHImpl.h.
|
noexcept |
Returns the geometric normal (not based on the N attribute) for the hit surface, optionally normalized, since apparently Mantra doesn't need it normalized.
|
noexcept |
Definition at line 1679 of file GEO_BVHImpl.h.
|
noexcept |
Fills box_indices array with the indices of all boxes intersecting query_box. NOTE: This does not clear out previous contents of indices, so that you can easily query intersection with multiple boxes. WARNING: DO NOT depend on the order of box_indices. If you need a consistent order, sort it.
Definition at line 1671 of file GEO_BVHImpl.h.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
staticnoexcept |
For points, this converts the uvw from ItemHitInfo to polar form. The original is effectively a normal.
Definition at line 1731 of file GEO_BVHImpl.h.
|
noexcept |
Sends a ray from the specified origin in the specified direction and finds the closest (or farthest) intersection. Potential hits less than tmin or greater than tmax from the origin are treated as not having been hit, regardless of whether farthest is true. If rm_backface is true, backface hits will be treated as no hit, and if reverse is also true, frontface hits will be treated as no hit. NOTE: If the hit_info.myNestedItemIndices is non-null, it will be filled with the hit path, ignoring the outermost index, which is in hit_info.myItemIndex.
Definition at line 348 of file GEO_BVHImpl.h.
|
noexcept |
Sends a ray from the specified origin in the specified direction and finds all intersections, removing all but one that are within duplicate_tolerance of another hit. Potential hits less than tmin or greater than tmax from the origin are treated as not having been hit, regardless of whether farthest is true. If rm_backface is true, backface hits will be treated as no hit, and if reverse is also true, frontface hits will be treated as no hit. NOTE: If nesting_temp_array is non-null, this function will allocate nesting arrays for any applicable entries in hit_info, so the caller is responsible for deleting myNestedItemIndices arrays in hit_info. nesting_temp_array itself is just used for temporary storage to reduce the number of allocations.
Definition at line 382 of file GEO_BVHImpl.h.
|
noexcept |
Like sendRayAll, except with a radius (tolerance) for curve and point hits, in case myRadii is empty.
Definition at line 428 of file GEO_BVHImpl.h.
|
noexcept |
Definition at line 483 of file GEO_BVHImpl.h.
|
noexcept |
Like sendRay, except with a radius (tolerance) for curve and point hits, in case myRadii is empty.
Definition at line 361 of file GEO_BVHImpl.h.
|
inlineprotectednoexcept |
|
inlineprotectednoexcept |
|
protectednoexcept |
Definition at line 1330 of file GEO_BVHImpl.h.
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |