HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_GroomCurveTree Class Reference

#include <GU_GroomUtils.h>

+ Inheritance diagram for GU_GroomCurveTree:

Public Member Functions

void build (const GEO_Detail *gdp, const GA_PrimitiveGroup *primgroup, const char *attrib, bool enable_multithreading=true)
 
void build (const GEO_Detail *gdp, const GA_PointGroup *ptgroup, bool enable_multithreading=true)
 
void build (const GEO_Detail *gdp, const GA_PointGroup *ptgroup, const char *attrib, bool enable_multithreading=true)
 
- Public Member Functions inherited from GEO_PointTreeGAOffset
void build (const GEO_Detail *gdp, const GA_PointGroup *ptgroup=NULL, bool enable_multithreading=true)
 
void build (const GEO_Detail *gdp, const GA_PointGroup *ptgroup, const char *attrib, bool enable_multithreading=true)
 
void build (const GEO_Detail *gdp, const GA_OffsetArray &ptoffsets, bool enable_multithreading=true)
 
- Public Member Functions inherited from GEO_PointTreeT< GA_Offset >
 GEO_PointTreeT ()
 
 ~GEO_PointTreeT () override
 
void build (const UT_Vector3Array &pts, bool enable_multithreading=true)
 
void build (const UT_Vector3Array &pts, const IdxArrayType &idx, bool enable_multithreading=true)
 
virtual void clear ()
 Clears out the tree, leaving it with no entries. More...
 
int entries () const
 Returns the number of actual points in the tree. More...
 
virtual int64 getMemoryUsage (bool inclusive=true) const
 Returns the amount of memory used by this tree. More...
 
IdxType findNearestIdx (const UT_Vector3 &pt)
 
IdxType findNearestIdx (const UT_Vector3 &pt, fpreal maxdist)
 
IdxType findNearestIdxQueue (const UT_Vector3 &pt, ut_KDPQueue &q, fpreal maxdist=1e18f, bool wrapunitcube=false)
 This uses a pre-built queue to reduce memory allocation. More...
 
int findAllCloseIdx (const UT_Vector3 &pt, fpreal maxdist, IdxArrayType &list)
 
int findAllCloseIdxQueue (const UT_Vector3 &pt, ut_KDPQueue &queue, fpreal maxdist, IdxArrayType &list)
 Creates a search queue useful for findAll queries. More...
 
int findAllInTubeIdx (const UT_Vector3 &pt, const UT_Vector3 &dir, fpreal radius, IdxArrayType &list)
 Find all of the points inside the given tube. More...
 
void setPointTransform (const UT_DMatrix4 &xform)
 
void ensureTreeBuilt ()
 
void buildIfNeeded (bool enable_multithreading=true) override
 This must be called before querying, to build and balance the tree. More...
 
void setBalancer (ut_KDBalancer balance)
 
void setMaxLeafNodes (int max_leaf_nodes)
 
void append (const UT_Vector3 &pt, IdxType idx, bool auto_rebalance=false)
 
void append (const UT_Vector3 &pt)
 
void appendPtRadius (const UT_Vector3 &pt, fpreal radius, IdxType idx, bool auto_rebalance=false)
 
void appendPtRadius (const UT_Vector3 &pt, fpreal radius)
 
int findNearestGroupIdx (const UT_Vector3 &pt, fpreal maxdist, int groupsize, IdxArrayType &group, UT_FloatArray &groupdist)
 
int findNearestGroupIdxQueue (const UT_Vector3 &pt, fpreal maxdist, int groupsize, IdxArrayType &group, UT_FloatArray &groupdist, ut_KDPQueue &q, bool wrapunitcube=false)
 This uses a pre-built queue to reduce memory allocation. More...
 

Additional Inherited Members

- Public Types inherited from GEO_PointTreeGAOffset
typedef GEO_PointTreeT< GA_OffsetSuper
 
- Public Types inherited from GEO_PointTreeT< GA_Offset >
typedef GA_Offset IdxType
 
typedef UT_Array< IdxTypeIdxArrayType
 
- Protected Types inherited from UT_KDTree
enum  ut_KDBalancer { UT_KD_MEDIAN, UT_KD_SAH, UT_KD_CENTROID }
 KD Tree balancing algorithms. See setBalancer. More...
 
- Protected Member Functions inherited from GEO_PointTreeT< GA_Offset >
int comparePosition (int idx0, int idx1, int dim) const override
 These are used by KDTree: More...
 
const floatgetP (int idx) const override
 Return the position associated with the given point. More...
 
bool pointsHaveRadius () const override
 These are used if the user adds points with radii. More...
 
fpreal getRadius (int idx) const override
 Return the radius associated with the point in question. More...
 
void updateKDTree (bool enablemultithread=true)
 
void dirtyKDTree ()
 Marks the kd tree as out of date. More...
 
void clearPointTransform ()
 Clears the myPointTransform member data. More...
 
- Protected Member Functions inherited from UT_KDTree
int getHead () const
 
bool isValid (int node, const UT_KDTubeQuery &) const
 
bool isValid (int node, const UT_KDLineQuery &) const
 
bool isValid (int node, const UT_KDTriQuery &) const
 
bool isValid (int node, const UT_KDTetQuery &) const
 
bool isValid (int node, const UT_KDQueryPtUnitWrap &) const
 
template<typename QueryPoint >
int findClosest (ut_KDPQueue &list, const QueryPoint &pt)
 
template<typename QueryPoint >
void recurseFind (ut_KDPQueue &list, const QueryPoint &pt, int split, int lo, int hi) const
 
template<typename QueryPoint >
void recurseFindTube (ut_KDPQueue &list, const QueryPoint &pt, int split, int lo, int hi) const
 
template<typename QueryPoint >
void recurseFindTri (ut_KDPQueue &list, const QueryPoint &pt, int split, int lo, int hi) const
 
template<typename QueryPoint >
void findInLeaf (ut_KDPQueue &list, const QueryPoint &pt, int lo, int hi, int invalid_limit, int &invalid) const
 
bool isBalanced () const
 
void traverseRecursive (Visitor &visitor, int split, int nodeid, UT_BoundingBox &box, int lo, int hi)
 
void computeBox (int start_index=0)
 
bool isBoxClose (const fpreal *P, fpreal qd, fpreal r) const
 
void balance (bool enable_multithreading=true)
 
void balanceSet (int &split, fpreal &radius, int *list, int entries, fpreal *boxmin, fpreal *boxmax, UT_Lock *splitlock)
 
 UT_KDTree (int dim=3, size_t size=0)
 
virtual ~UT_KDTree ()
 
int64 getMemoryUsage (bool inclusive) const
 
void setEntries (size_t size)
 
size_t getEntries () const
 
void growEntries (size_t amount)
 
size_t getRebalanceCount () const
 
void setRebalanceCount (size_t count)
 
void setBalancer (ut_KDBalancer balance)
 
void setMaxLeafNodes (int max_leaf_nodes)
 
void flagDirty ()
 
virtual bool isValid (int) const
 Returns whether the given index should be considered in searches. More...
 
virtual bool isValid (int idx, const UT_KDQueryPt &) const
 
virtual int getInvalidLimit (int maxn) const
 
template<typename QueryPoint >
int findClosest (const QueryPoint &pt, fpreal max_distance_squared)
 
template<typename QueryPoint >
int findClosestQueue (const QueryPoint &pt, ut_KDPQueue &queue, fpreal max_distance_squared)
 
template<typename QueryPoint >
int findClosest (UT_IntArray &list, const QueryPoint &pt, fpreal max_distance_squared, int max_nodes, bool sorted=true)
 
template<typename QueryPoint >
int findClosestQueue (UT_IntArray &list, const QueryPoint &pt, ut_KDPQueue &q, fpreal max_distance_squared, int max_nodes, bool sorted=true)
 
template<typename QueryPoint >
int findClosest (UT_IntArray &list, UT_FloatArray &dist, const QueryPoint &pt, fpreal max_distance_squared, int max_nodes, bool sorted=true)
 
template<typename QueryPoint >
int findClosestQueue (UT_IntArray &list, UT_FloatArray &dist, const QueryPoint &pt, ut_KDPQueue &q, fpreal max_distance_squared, int max_nodes, bool sorted=true)
 
template<typename QueryPoint >
int findNClosest (UT_IntArray &list, const QueryPoint &pt, int max_nodes)
 
template<typename QueryPoint >
int findAllClosest (UT_IntArray &list, const QueryPoint &pt, fpreal max_distance_squared)
 
void traverse (Visitor &visitor)
 
void filterVolume (VolumeData &data, const UT_Vector3 &pos, const UT_Filter &filter, const AggregateVolume &aggdata, int max_nodes)
 
const fprealgetBoxMin ()
 
const fprealgetBoxMax ()
 
- Static Protected Member Functions inherited from UT_KDTree
static ut_KDPQueuePtr createQueue ()
 
- Protected Attributes inherited from GEO_PointTreeT< GA_Offset >
UT_DMatrix4myPointTransform
 
IdxArrayType myIndexList
 This is the mapping from the KD entries into the GDP numbers. More...
 
UT_Vector3Array myPointList
 The list of all the points. More...
 
UT_FloatArray myRadii
 List of radii for each pont. More...
 
bool myIsKDTreeDirty
 
- Protected Attributes inherited from UT_KDTree
fpreal myBMin [UT_KD_MAXDIM]
 
fpreal myBMax [UT_KD_MAXDIM]
 
intmyList
 
UT_Array< KDSplitmySplits
 
UT_Lock myLock
 For protecting tree balancing and bounding box computation. More...
 
size_t myEntries
 This marks the number of entries that have been added to our tree. More...
 
size_t myFullEntries
 
size_t myRebalanceCount
 
int myDim
 
int myMaxLeafNodes
 
bool myBalanced
 
bool myBoxComputed
 
bool myHasRadius
 A faster way to evaluate pointsHaveRadius() at runtime. More...
 
ut_KDBalancer myBalancer
 

Detailed Description

Definition at line 849 of file GU_GroomUtils.h.

Member Function Documentation

void GU_GroomCurveTree::build ( const GEO_Detail gdp,
const GA_PrimitiveGroup primgroup,
const char *  attrib,
bool  enable_multithreading = true 
)

Rebuilds the tree with the given detail and primitive group, This creates a point per primitive using the primitive attribute of the specified name as the point position. if primgroup is NULL then all primitives are used.

void GU_GroomCurveTree::build ( const GEO_Detail gdp,
const GA_PointGroup ptgroup,
bool  enable_multithreading = true 
)
inline

Definition at line 864 of file GU_GroomUtils.h.

void GU_GroomCurveTree::build ( const GEO_Detail gdp,
const GA_PointGroup ptgroup,
const char *  attrib,
bool  enable_multithreading = true 
)
inline

Definition at line 872 of file GU_GroomUtils.h.


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