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 ()
 Destructor.
 
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 67 of file TriangleBSPCoreT.hh.

Constructor & Destructor Documentation

◆ TriangleBSPCoreT()

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

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

Definition at line 86 of file TriangleBSPCoreT.hh.

Member Function Documentation

◆ build()

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

Build the tree.

Parameters
_max_handlesMaximum number of vertices per leaf.
_max_depthMaximum depth.

Definition at line 63 of file TriangleBSPCoreT_impl.hh.

◆ empty()

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

Definition at line 102 of file TriangleBSPCoreT.hh.

◆ size()

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

Definition at line 107 of file TriangleBSPCoreT.hh.

◆ visualizeTree()

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

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

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

Definition at line 122 of file TriangleBSPCoreT.hh.


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