Blender  V2.59
Public Member Functions | Protected Attributes
BOP_BSPTree Class Reference

#include <BOP_BSPTree.h>

List of all members.

Public Member Functions

 BOP_BSPTree ()
virtual ~BOP_BSPTree ()
void addMesh (BOP_Mesh *mesh, BOP_Faces &facesList)
void addFace (BOP_Mesh *mesh, BOP_Face *face)
virtual void addFace (const MT_Point3 &p1, const MT_Point3 &p2, const MT_Point3 &p3, const MT_Plane3 &plane)
BOP_TAG classifyFace (const MT_Point3 &p1, const MT_Point3 &p2, const MT_Point3 &p3, const MT_Plane3 &plane) const
BOP_TAG filterFace (const MT_Point3 &p1, const MT_Point3 &p2, const MT_Point3 &p3, BOP_Face *face)
BOP_TAG simplifiedClassifyFace (const MT_Point3 &p1, const MT_Point3 &p2, const MT_Point3 &p3, const MT_Plane3 &plane) const
unsigned int getDeep () const
void print ()
void setRoot (BOP_BSPNode *root)
BOP_BSPNodegetRoot () const

Protected Attributes

BOP_BSPNodem_root
BOP_BSPNodem_bspBB
BOP_BBox m_bbox

Detailed Description

Definition at line 41 of file BOP_BSPTree.h.


Constructor & Destructor Documentation

BOP_BSPTree::BOP_BSPTree ( )

Constructs a new BSP tree.

Definition at line 41 of file BOP_BSPTree.cpp.

References NULL.

BOP_BSPTree::~BOP_BSPTree ( ) [virtual]

Destroys a BSP tree.

Definition at line 50 of file BOP_BSPTree.cpp.

References NULL.


Member Function Documentation

void BOP_BSPTree::addFace ( BOP_Mesh mesh,
BOP_Face face 
)

Adds a new face into bsp tree.

Parameters:
meshInput data for BSP tree.
faceindex to mesh face.

Definition at line 75 of file BOP_BSPTree.cpp.

References BOP_Face::getPlane(), BOP_Face::getVertex(), and BOP_Mesh::getVertex().

void BOP_BSPTree::addFace ( const MT_Point3 p1,
const MT_Point3 p2,
const MT_Point3 p3,
const MT_Plane3 plane 
) [virtual]

Adds new facee to the bsp-tree.

Parameters:
p1first face point.
p2second face point.
p3third face point.
planeface plane.

Definition at line 90 of file BOP_BSPTree.cpp.

References NULL.

void BOP_BSPTree::addMesh ( BOP_Mesh mesh,
BOP_Faces facesList 
)

Adds all mesh faces to BSP tree.

Parameters:
meshmesh to add.
facesListface list to add.

Definition at line 61 of file BOP_BSPTree.cpp.

Referenced by BOP_intersectionBoolOp().

BOP_TAG BOP_BSPTree::classifyFace ( const MT_Point3 p1,
const MT_Point3 p2,
const MT_Point3 p3,
const MT_Plane3 plane 
) const

Tests face vs bsp-tree (returns where is the face respect bsp planes).

Parameters:
p1first face triangle point.
p2secons face triangle point.
p3third face triangle point.
planeface plane.
Returns:
BSP_IN, BSP_OUT or BSP_IN_OUT

Definition at line 121 of file BOP_BSPTree.cpp.

References NULL, and OUT.

Referenced by BOP_meshFilter().

BOP_TAG BOP_BSPTree::filterFace ( const MT_Point3 p1,
const MT_Point3 p2,
const MT_Point3 p3,
BOP_Face face 
)

Filters a face using the BSP bounding infomation.

Parameters:
p1first face triangle point.
p2secons face triangle point.
p3third face triangle point.
faceface to test.
Returns:
UNCLASSIFIED, BSP_IN, BSP_OUT or BSP_IN_OUT

Definition at line 140 of file BOP_BSPTree.cpp.

References BOP_Face::getPlane(), NULL, and UNCLASSIFIED.

Referenced by BOP_simplifiedMeshFilter().

unsigned int BOP_BSPTree::getDeep ( ) const

Returns the deep of this BSP tree.

Returns:
tree deep

Definition at line 175 of file BOP_BSPTree.cpp.

References NULL.

Referenced by BOP_intersectionBoolOp().

BOP_BSPNode* BOP_BSPTree::getRoot ( ) const [inline]

Definition at line 72 of file BOP_BSPTree.h.

References m_root.

void BOP_BSPTree::print ( )

Prints debug information.

Definition at line 186 of file BOP_BSPTree.cpp.

References NULL.

void BOP_BSPTree::setRoot ( BOP_BSPNode root) [inline]

Definition at line 71 of file BOP_BSPTree.h.

References m_root, and MakeCursor::root.

BOP_TAG BOP_BSPTree::simplifiedClassifyFace ( const MT_Point3 p1,
const MT_Point3 p2,
const MT_Point3 p3,
const MT_Plane3 plane 
) const

Tests face vs bsp-tree (returns where is the face respect bsp planes).

Parameters:
p1first face triangle point.
p2secons face triangle point.
p3third face triangle point.
planeface plane.
Returns:
BSP_IN, BSP_OUT or BSP_IN_OUT

Definition at line 160 of file BOP_BSPTree.cpp.

References NULL, and OUT.

Referenced by BOP_meshClassify().


Member Data Documentation

Definition at line 46 of file BOP_BSPTree.h.

Definition at line 45 of file BOP_BSPTree.h.

Definition at line 44 of file BOP_BSPTree.h.

Referenced by getRoot(), and setRoot().


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