Blender V2.61 - r43446
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 40 of file BOP_BSPTree.cpp.

References m_bspBB, m_root, and NULL.

BOP_BSPTree::~BOP_BSPTree ( ) [virtual]

Destroys a BSP tree.

Definition at line 49 of file BOP_BSPTree.cpp.

References m_bspBB, m_root, and 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 74 of file BOP_BSPTree.cpp.

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

Referenced by addMesh().

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 89 of file BOP_BSPTree.cpp.

References BOP_BBox::add(), BOP_BSPNode::addFace(), m_bbox, m_root, and 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 60 of file BOP_BSPTree.cpp.

References addFace().

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 120 of file BOP_BSPTree.cpp.

References BOP_BSPNode::classifyFace(), m_root, 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 139 of file BOP_BSPTree.cpp.

References BOP_BSPNode::classifyFace(), BOP_Face::getPlane(), m_bspBB, 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 174 of file BOP_BSPTree.cpp.

References BOP_BSPNode::getDeep(), m_root, and 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 185 of file BOP_BSPTree.cpp.

References m_root, NULL, and BOP_BSPNode::print().

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 159 of file BOP_BSPTree.cpp.

References m_root, NULL, OUT, and BOP_BSPNode::simplifiedClassifyFace().

Referenced by BOP_meshClassify().


Member Data Documentation

Definition at line 46 of file BOP_BSPTree.h.

Referenced by addFace().

Definition at line 45 of file BOP_BSPTree.h.

Referenced by BOP_BSPTree(), filterFace(), and ~BOP_BSPTree().


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