Developer Documentation
TriangleBSPCoreT< BSPTraits > Class Template Reference
Inheritance diagram for TriangleBSPCoreT< BSPTraits >:
BSPImplT< TriangleBSPCoreT< BSPTraits > > TriangleBSPT< BSPTraits >

Public Types

typedef BSPTraits Traits
typedef BSPTraits::Point Point
typedef BSPTraits::Handle Handle
typedef BSPTraits::Node Node
typedef Point::value_type Scalar
typedef ACG::Geometry::PlaneT< Scalar > Plane
typedef std::vector< Handle > Handles
typedef Handles::iterator HandleIter

Public Member Functions

 TriangleBSPCoreT (const BSPTraits &_traits)
 ~TriangleBSPCoreT ()
void reserve (size_t _n)
 Reserve memory for _n entries.
void push_back (Handle _h)
 Add a handle to the BSP.
bool empty ()
size_t size ()
void build (unsigned int _max_handles, unsigned int _max_depth)
template<typename MeshT >
void visualizeTree (MeshT *_object, int _max_depth)
 Create a PolyMesh object that visualizes the bounding boxes of the BSP tree. More...

Protected Attributes

BSPTraits traits_
Handles handles_
Node * root_
int nodes
int n_triangles

Private Member Functions

 TriangleBSPCoreT (const TriangleBSPCoreT &rhs)
TriangleBSPCoreToperator= (const TriangleBSPCoreT &rhs)
void _build (Node *_node, unsigned int _max_handles, unsigned int _depth)

Detailed Description

template<class BSPTraits>
class TriangleBSPCoreT< BSPTraits >

Definition at line 77 of file TriangleBSPCoreT.hh.

Constructor & Destructor Documentation

template<class BSPTraits>
TriangleBSPCoreT< BSPTraits >::TriangleBSPCoreT ( const BSPTraits &  _traits)

Constructor: need traits that define the types and give us the points by traits_.point(PointHandle)

Definition at line 96 of file TriangleBSPCoreT.hh.

Member Function Documentation

template<class BSPTraits >
void TriangleBSPCoreT< BSPTraits >::build ( unsigned int  _max_handles,
unsigned int  _max_depth 

Build the tree.

_max_handlesMaximum number of vertices per leaf.
_max_depthMaximum depth.

Definition at line 72 of file

template<class BSPTraits>
bool TriangleBSPCoreT< BSPTraits >::empty ( )
size() == 0

Definition at line 112 of file TriangleBSPCoreT.hh.

template<class BSPTraits>
size_t TriangleBSPCoreT< BSPTraits >::size ( )
The number of triangles contained in the tree.

Definition at line 117 of file TriangleBSPCoreT.hh.

template<class BSPTraits>
template<typename MeshT >
void TriangleBSPCoreT< BSPTraits >::visualizeTree ( MeshT *  _object,
int  _max_depth 

Create a PolyMesh object that visualizes the bounding boxes of the BSP tree.

_objectThe output mesh which the tree will be written into
_max_depthThe maximal depth that will be visualized

Definition at line 132 of file TriangleBSPCoreT.hh.

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