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

#include <GU_OBBTree.h>

+ Inheritance diagram for GU_OBBTree:

Public Types

typedef BV_OBBTree BaseClass
 
- Public Types inherited from BV_OBBTree
typedef BV_Tree BaseClass
 
- Public Types inherited from BV_Tree
enum  BV_Status { BV_PASS, BV_FAIL_ROTATIONS_UNSUPPORTED, BV_FAIL_BAD_TYPE, BV_FAIL }
 

Public Member Functions

 GU_OBBTree ()
 
 GU_OBBTree (const GU_OBBTree &)
 
GU_OBBTreeoperator= (const GU_OBBTree &)
 
void createDebugTree (GU_Detail &gdp, int depth=-1, int prim=-1) const
 
- Public Member Functions inherited from BV_OBBTree
 BV_OBBTree ()
 
 BV_OBBTree (const BV_OBBTree &)
 
 ~BV_OBBTree () override
 
BV_OBBTreeoperator= (const BV_OBBTree &)
 
const char * getType () const override
 
const BV_TreecastTo (const char *type) const override
 
BV_TreecastTo (const char *type) override
 
void buildLazy (BV_LeafIterator &leafIt)
 
void getRootOBB (UT_Matrix4 &xform, UT_Vector3 &radii) const
 
void setUseConvexHull (bool bValue)
 
bool getUseConvexHull ()
 
- Public Member Functions inherited from BV_Tree
 BV_Tree ()
 
virtual ~BV_Tree ()
 
BV_Treeclone () const
 
int64 getMemoryUsage () const
 
int getNumLeaves () const
 
void build (BV_LeafIterator &leafIt)
 Construct a volume hierarchy from the given primitives. More...
 
void updateExtents (BV_LeafIterator &leafIt)
 
void save (std::ostream &os, bool onlyStructure) const
 
bool load (UT_IStream &is, bool onlyStructure)
 
BV_Status intersect (BV_Callback &callback, const BV_Tree &treeb, const UT_DMatrix4 &xforma, const UT_DMatrix4 &xformb, fpreal tol=0.001F) const
 
BV_Status intersect (BV_Callback &callback, const BV_Tree &treeb, fpreal tol=0.001F) const
 Static boxes only! More...
 
BV_Status intersect (BV_Callback &callback, const BV_Tree &treeb, const UT_DMatrix4 &startxforma, const UT_DMatrix4 &startxformb, const UT_DMatrix4 &endxforma, const UT_DMatrix4 &endxformb, fpreal tol=0.001F) const
 Moving boxes only! More...
 
BV_Status intersect (BV_Callback &callback, const BV_Tree &treeb, const UT_DMatrix4 &xforma, const UT_DMatrix4 &startxforma, const UT_DMatrix4 &startxformb, const UT_DMatrix4 &xformb, const UT_DMatrix4 &endxforma, const UT_DMatrix4 &endxformb, fpreal tol=0.001F) const
 Moving boxes only! More...
 

Additional Inherited Members

- Protected Member Functions inherited from BV_OBBTree
BV_TreecloneSubclass () const override
 
int64 getMemoryUsageSubclass () const override
 
int getNumLeavesSubclass () const override
 
void buildSubclass (BV_LeafIterator &leafIt) override
 
void updateExtentsSubclass (BV_LeafIterator &leafIt) override
 
BV_Status intersectSubclass (BV_Callback &callback, const BV_Tree &treeb, const UT_DMatrix4 &startxforma, const UT_DMatrix4 &startxformb, const UT_DMatrix4 &endxforma, const UT_DMatrix4 &endxformb, fpreal tol) const override
 WARNING: not thread-safe if tree was lazily built! More...
 
BV_OBBgetRoot ()
 
void buildInternal (BV_LeafIterator &leafIt, bool lazy)
 
BV_OBBcreateTree (int startprim, int numleaves, const UT_Matrix3 &rootBasis, const UT_Vector3 &rootPos, int depth=-1)
 
void createChildren (BV_OBB &root, int depth=-1)
 
bool updateExtentsRecurse (BV_OBB &node, const UT_Matrix3 &parentBasis, const UT_Vector3 &parentPos)
 
void getBounds (const UT_Matrix3 &basis, UT_BoundingBox &bbox, bool &firstPrim)
 
void calcOBB (BV_OBB &node)
 
void calcSize (BV_OBB &node)
 
bool computeConvexHull (const TPointArray &source_points_in, TSimpleTriangleArray &final_triangles_out)
 
bool doConvexHullIteration (BV_CHDataManager &data_manager, TTriArray &working_triangles)
 
bool intersectRecurse (BV_Callback &callback, const BV_OBBTree &treeb, const BV_OBB &a, const BV_OBB &b, const bvTransform &t1, const bvTransform &t2, const bvTransform &t3, const bvTransform &t4, fpreal tol, int identities) const
 
void calculateSortKeys (bvLeaf *prims, int numleaves, UT_Matrix3 &basis, int axis) const
 
void saveSubclass (std::ostream &os, bool onlyStructure) const override
 Saving and loading only works for non-lazy building. More...
 
bool loadSubclass (UT_IStream &is, bool onlyStructure) override
 Saving and loading only works for non-lazy building. More...
 
- Protected Member Functions inherited from BV_Tree
 BV_Tree (const BV_Tree &tree)
 
- Static Protected Member Functions inherited from BV_OBBTree
static int compareLeaves (const void *t1, const void *t2)
 
- Protected Attributes inherited from BV_OBBTree
BV_OBBmyRoot
 
UT_Array< bvLeafmyLeaves
 
BV_LeafIteratormyLeafIt
 
bool myUseConvexHullForBBoxes
 

Detailed Description

This is a simple extension to BV_OBBTree that includes debug output capability.

Definition at line 19 of file GU_OBBTree.h.

Member Typedef Documentation

Definition at line 22 of file GU_OBBTree.h.

Constructor & Destructor Documentation

GU_OBBTree::GU_OBBTree ( )
GU_OBBTree::GU_OBBTree ( const GU_OBBTree )

Member Function Documentation

void GU_OBBTree::createDebugTree ( GU_Detail gdp,
int  depth = -1,
int  prim = -1 
) const

Create a GU_Detail showing the OBBs at each level of the hierarchy.

If the depth parameter is non-negative, then only leaves at the given depth level are included. If the onlyLeaf parameter is non-negative, then only boxes containing that primitive are included.

GU_OBBTree& GU_OBBTree::operator= ( const GU_OBBTree )

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