HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BV_LeafIterator Class Referenceabstract

#include <BV_LeafIterator.h>

+ Inheritance diagram for BV_LeafIterator:

Public Member Functions

 BV_LeafIterator ()
 
virtual ~BV_LeafIterator ()
 
void advance ()
 Advance iterator to next leaf. More...
 
void jump (int leafId)
 Random access: jump to given leaf id. More...
 
bool atEnd () const
 
void rewind ()
 Reset to first leaf. More...
 
int getLeafId () const
 Get id of current leaf. More...
 
UT_Vector3 calcBarycenter () const
 Get barycenter of current leaf. More...
 
bool isDisabled () const
 Test if the current leaf is disabled. More...
 
void advanceVertex ()
 Get number of vertices bounding current leaf. More...
 
bool atEndVertex () const
 
void rewindVertex ()
 
UT_Vector4 getVertex () const
 Get given bounding vertex of current leaf. More...
 
virtual fpreal getVertexRadius () const
 
void setSkipDupVerts (bool flag)
 
bool getSkipDupVerts () const
 

Protected Member Functions

virtual void advanceSubclass ()=0
 
virtual void jumpSubclass (int leafId)=0
 
virtual bool atEndSubclass () const =0
 
virtual void rewindSubclass ()=0
 
virtual int getLeafIdSubclass () const =0
 
virtual UT_Vector3 calcBarycenterSubclass () const =0
 
virtual bool isDisabledSubclass () const
 
virtual void advanceVertexSubclass ()=0
 
virtual bool atEndVertexSubclass () const =0
 
virtual void rewindVertexSubclass ()=0
 
virtual UT_Vector4 getVertexSubclass () const =0
 
virtual void setSkipDupVertsSubclass (bool flag)=0
 

Detailed Description

Iterator for leaves to be enclosed by bounding volume. Iterator retrieves info about each leaf:

  • a set of vertices forming a bounding volume for the leaf
  • barycenter (centroid) of leaf

Optionally, the iterator may be able to skip duplicate vertices - i.e., if leaves in the set share vertices.

Definition at line 25 of file BV_LeafIterator.h.

Constructor & Destructor Documentation

BV_LeafIterator::BV_LeafIterator ( )
virtual BV_LeafIterator::~BV_LeafIterator ( )
virtual

Member Function Documentation

void BV_LeafIterator::advance ( )
inline

Advance iterator to next leaf.

Definition at line 32 of file BV_LeafIterator.h.

virtual void BV_LeafIterator::advanceSubclass ( )
protectedpure virtual

Implemented in GU_BVLeafIterator, and SIM_BVLeafIterator.

void BV_LeafIterator::advanceVertex ( )
inline

Get number of vertices bounding current leaf.

Definition at line 60 of file BV_LeafIterator.h.

virtual void BV_LeafIterator::advanceVertexSubclass ( )
protectedpure virtual

Implemented in GU_BVLeafIterator, and SIM_BVLeafIterator.

bool BV_LeafIterator::atEnd ( ) const
inline

Test to see if we've passed the last leaf. Note: returns false on the last leaf, and true if we've advanced past the last leaf.

Definition at line 40 of file BV_LeafIterator.h.

virtual bool BV_LeafIterator::atEndSubclass ( ) const
protectedpure virtual

Implemented in GU_BVLeafIterator, and SIM_BVLeafIterator.

bool BV_LeafIterator::atEndVertex ( ) const
inline

Definition at line 62 of file BV_LeafIterator.h.

virtual bool BV_LeafIterator::atEndVertexSubclass ( ) const
protectedpure virtual

Implemented in GU_BVLeafIterator, and SIM_BVLeafIterator.

UT_Vector3 BV_LeafIterator::calcBarycenter ( ) const
inline

Get barycenter of current leaf.

Definition at line 50 of file BV_LeafIterator.h.

virtual UT_Vector3 BV_LeafIterator::calcBarycenterSubclass ( ) const
protectedpure virtual

Implemented in GU_BVLeafIterator, and SIM_BVLeafIterator.

int BV_LeafIterator::getLeafId ( ) const
inline

Get id of current leaf.

Definition at line 47 of file BV_LeafIterator.h.

virtual int BV_LeafIterator::getLeafIdSubclass ( ) const
protectedpure virtual

Implemented in GU_BVLeafIterator, and SIM_BVLeafIterator.

bool BV_LeafIterator::getSkipDupVerts ( ) const
inline

Definition at line 79 of file BV_LeafIterator.h.

UT_Vector4 BV_LeafIterator::getVertex ( ) const
inline

Get given bounding vertex of current leaf.

Definition at line 67 of file BV_LeafIterator.h.

virtual fpreal BV_LeafIterator::getVertexRadius ( ) const
inlinevirtual

Gets radius to expand each vertex for calculation of the bounding volume.

Definition at line 71 of file BV_LeafIterator.h.

virtual UT_Vector4 BV_LeafIterator::getVertexSubclass ( ) const
protectedpure virtual

Implemented in GU_BVLeafIterator, and SIM_BVLeafIterator.

bool BV_LeafIterator::isDisabled ( ) const
inline

Test if the current leaf is disabled.

Definition at line 53 of file BV_LeafIterator.h.

virtual bool BV_LeafIterator::isDisabledSubclass ( ) const
protectedvirtual
void BV_LeafIterator::jump ( int  leafId)
inline

Random access: jump to given leaf id.

Definition at line 35 of file BV_LeafIterator.h.

virtual void BV_LeafIterator::jumpSubclass ( int  leafId)
protectedpure virtual

Implemented in GU_BVLeafIterator, and SIM_BVLeafIterator.

void BV_LeafIterator::rewind ( )
inline

Reset to first leaf.

Definition at line 43 of file BV_LeafIterator.h.

virtual void BV_LeafIterator::rewindSubclass ( )
protectedpure virtual

Implemented in GU_BVLeafIterator, and SIM_BVLeafIterator.

void BV_LeafIterator::rewindVertex ( )
inline

Definition at line 64 of file BV_LeafIterator.h.

virtual void BV_LeafIterator::rewindVertexSubclass ( )
protectedpure virtual

Implemented in GU_BVLeafIterator, and SIM_BVLeafIterator.

void BV_LeafIterator::setSkipDupVerts ( bool  flag)
inline

Flag: hint to skip duplicate points when iterating over vertices of leaves. TODO: this is obsolete and possibly broken; it's also dangerous when combined with a non-zero vertex radius. Remove it.

Definition at line 77 of file BV_LeafIterator.h.

virtual void BV_LeafIterator::setSkipDupVertsSubclass ( bool  flag)
protectedpure virtual

Implemented in GU_BVLeafIterator, and SIM_BVLeafIterator.


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