Developer Documentation

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Types | Public Member Functions | Protected Attributes | Private Member Functions | List of all members
TriangleBSPCoreT< BSPTraits > Class Template Reference
Inheritance diagram for TriangleBSPCoreT< 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)
TriangleBSPCoreT & | operator= (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 | ) |
| inline

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.

Parameters

  _max_handles | Maximum number of vertices per leaf.
  _max_depth | Maximum depth.

Definition at line 72 of file TriangleBSPCoreT.cc.

template<class BSPTraits>

bool TriangleBSPCoreT< BSPTraits >::empty | ( |  | ) |
| inline

Returns
  size() == 0

Definition at line 112 of file TriangleBSPCoreT.hh.

template<class BSPTraits>

size_t TriangleBSPCoreT< BSPTraits >::size | ( |  | ) |
| inline

Returns
  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
| ) |  |
| inline

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

Parameters

  _object | The output mesh which the tree will be written into
  _max_depth | The 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:

- ACG/Geometry/bsp/TriangleBSPCoreT.hh
- ACG/Geometry/bsp/TriangleBSPCoreT.cc