OMToolkit 1.0 The polygonal mesh processing tool.

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
OMToolkit::OMTriBSPTree Class Reference

`#include <OMTriBSPTree.h>`

## Public Types
typedef OMToolkit::Types::ModuleMeshd | MeshT
typedef MeshT::Point | PointT
typedef MeshT::FaceHandle | FaceHT
typedef MeshT::VertexHandle | VertexHT
typedef PointT::value_type | ScalarT

## Public Member Functions
| OMTriBSPTree (MeshT *mesh)
void | getPassingFace (PointT &origin, PointT &vector, FaceHT &face)
void | getAllPassingFaces (PointT &origin, PointT &vector, std::vector< FaceHT > &faces)
void | ConstructTree ()

## Static Public Member Functions
static bool | sortXFunc (TriCenter const &first, TriCenter const &second)
static bool | sortYFunc (TriCenter const &first, TriCenter const &second)
static bool | sortZFunc (TriCenter const &first, TriCenter const &second)
static bool | sortIndexFunc (TriCenter const &first, TriCenter const &second)

## Public Attributes
TreeElement * | m_root
MeshT * | m_mesh
std::vector< TriCenter > | m_sorted

## Detailed Description

BSP Tree class

## Member Typedef Documentation

typedef MeshT::FaceHandle OMToolkit::OMTriBSPTree::FaceHT

Face handle Type

typedef OMToolkit::Types::ModuleMeshd OMToolkit::OMTriBSPTree::MeshT

Mesh Type

typedef MeshT::Point OMToolkit::OMTriBSPTree::PointT

Point Type

typedef PointT::value_type OMToolkit::OMTriBSPTree::ScalarT

Scalar type used in vectors

typedef MeshT::VertexHandle OMToolkit::OMTriBSPTree::VertexHT

Vertex handle Type

## Constructor & Destructor Documentation

OMToolkit::OMTriBSPTree::OMTriBSPTree | ( | MeshT * | mesh | ) |

Constructor - creates a BSP from a mesh

Parameters

  mesh | Pointer to a mesh
  maxPointsInElement | Maximum number of vertices in one tree cell

## Member Function Documentation

void OMToolkit::OMTriBSPTree::ConstructTree | ( |  | ) |

Aux function for tree construction (used in constructor)

Parameters

  maxPointsInElement | Maximum number of vertices in one tree cell

void OMToolkit::OMTriBSPTree::getAllPassingFaces | ( | PointT & | origin,
|  | PointT & | vector,
|  | std::vector< FaceHT > & | faces
| ) |  |

Function returns all intersected triangles

Parameters

  origin | Ray origin - intersection is computed also in inverse direction
  vector | Ray direction
  faces | Returned face handles

void OMToolkit::OMTriBSPTree::getPassingFace | ( | PointT & | origin,
|  | PointT & | vector,
|  | FaceHT & | face
| ) |  |

Function returns a nearest intersected triangle (both directions)

Parameters

  origin | Ray origin - intersection is computed also in inverse direction
  vector | Ray direction
  face | Returned face handle

bool OMToolkit::OMTriBSPTree::sortIndexFunc | ( | TriCenter const & | first,
|  | TriCenter const & | second
| ) |  |
| static

Sorting function - index values

bool OMToolkit::OMTriBSPTree::sortXFunc | ( | TriCenter const & | first,
|  | TriCenter const & | second
| ) |  |
| static

Sorting function - X axis values

bool OMToolkit::OMTriBSPTree::sortYFunc | ( | TriCenter const & | first,
|  | TriCenter const & | second
| ) |  |
| static

Sorting function - Y axis values

bool OMToolkit::OMTriBSPTree::sortZFunc | ( | TriCenter const & | first,
|  | TriCenter const & | second
| ) |  |
| static

Sorting function - Z axis values

## Member Data Documentation

MeshT* OMToolkit::OMTriBSPTree::m_mesh

TreeElement* OMToolkit::OMTriBSPTree::m_root

Root node

std::vector<TriCenter> OMToolkit::OMTriBSPTree::m_sorted

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

- trunk/include/OMToolkit/OMTriBSPTree.h
- trunk/src/toolkit/Toolkit/OMTriBSPTree.cpp