|
Blender
V2.59
|
#include <BOP_BSPNode.h>
Public Member Functions | |
| BOP_BSPNode (const MT_Plane3 &plane) | |
| ~BOP_BSPNode () | |
| unsigned int | addFace (const BOP_BSPPoints &pts, 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 | simplifiedClassifyFace (const MT_Point3 &p1, const MT_Point3 &p2, const MT_Point3 &p3, const MT_Plane3 &plane) const |
| void | setInChild (BOP_BSPNode *inChild) |
| void | setOutChild (BOP_BSPNode *outChild) |
| BOP_BSPNode * | getInChild () |
| BOP_BSPNode * | getOutChild () |
| bool | isLeaf () const |
| void | setPlane (const MT_Plane3 &plane) |
| MT_Plane3 & | getPlane () |
| unsigned int | getDeep () const |
| void | print (unsigned int deep) |
Protected Member Functions | |
| BOP_TAG | testPoint (const MT_Point3 &p) const |
| BOP_TAG | classifyFaceIN (const MT_Point3 &p1, const MT_Point3 &p2, const MT_Point3 &p3, const MT_Plane3 &plane) const |
| BOP_TAG | classifyFaceOUT (const MT_Point3 &p1, const MT_Point3 &p2, const MT_Point3 &p3, const MT_Plane3 &plane) const |
| BOP_TAG | simplifiedClassifyFaceIN (const MT_Point3 &p1, const MT_Point3 &p2, const MT_Point3 &p3, const MT_Plane3 &plane) const |
| BOP_TAG | simplifiedClassifyFaceOUT (const MT_Point3 &p1, const MT_Point3 &p2, const MT_Point3 &p3, const MT_Plane3 &plane) const |
| bool | hasSameOrientation (const MT_Plane3 &plane) const |
| int | compChildren () const |
| int | splitTriangle (MT_Point3 *res, const MT_Plane3 &plane, const MT_Point3 &p1, const MT_Point3 &p2, const MT_Point3 &p3, const BOP_TAG tag) const |
Protected Attributes | |
| BOP_BSPNode * | m_inChild |
| BOP_BSPNode * | m_outChild |
| MT_Plane3 | m_plane |
| unsigned int | m_deep |
Definition at line 43 of file BOP_BSPNode.h.
| BOP_BSPNode::BOP_BSPNode | ( | const MT_Plane3 & | plane | ) |
Constructs a new BSP node.
| plane | split plane. |
Definition at line 44 of file BOP_BSPNode.cpp.
References NULL.
| BOP_BSPNode::~BOP_BSPNode | ( | ) |
| unsigned int BOP_BSPNode::addFace | ( | const BOP_BSPPoints & | pts, |
| const MT_Plane3 & | plane | ||
| ) |
Adds a new face to this BSP tree.
| pts | vector containing face points |
| plane | face plane. |
Definition at line 67 of file BOP_BSPNode.cpp.
References BOP_intersectPlane(), IN, MT_max(), NULL, ON, and OUT.
| BOP_TAG BOP_BSPNode::classifyFace | ( | const MT_Point3 & | p1, |
| const MT_Point3 & | p2, | ||
| const MT_Point3 & | p3, | ||
| const MT_Plane3 & | plane | ||
| ) | const |
Classifies a face using its coordinates and plane.
| p1 | first point. |
| p2 | second point. |
| p3 | third point. |
| plane | face plane. |
Definition at line 170 of file BOP_BSPNode.cpp.
References BOP_addON(), BOP_compTAG(), BOP_createTAG(), BOP_intersectPlane(), BOP_isInsideCircle(), IN_IN_IN, IN_IN_ON, IN_IN_OUT, IN_ON_IN, IN_ON_ON, IN_ON_OUT, IN_OUT_IN, IN_OUT_ON, IN_OUT_OUT, INOUT, ON_IN_IN, ON_IN_ON, ON_IN_OUT, ON_ON_IN, ON_ON_ON, ON_ON_OUT, ON_OUT_IN, ON_OUT_ON, ON_OUT_OUT, OUT_IN_IN, OUT_IN_ON, OUT_IN_OUT, OUT_ON_IN, OUT_ON_ON, OUT_ON_OUT, OUT_OUT_IN, OUT_OUT_ON, OUT_OUT_OUT, and UNCLASSIFIED.
| BOP_TAG BOP_BSPNode::classifyFaceIN | ( | const MT_Point3 & | p1, |
| const MT_Point3 & | p2, | ||
| const MT_Point3 & | p3, | ||
| const MT_Plane3 & | plane | ||
| ) | const [protected] |
Classifies a face through IN subtree.
| p1 | firts face vertex. |
| p2 | second face vertex. |
| p3 | third face vertex. |
| plane | face plane. |
Definition at line 376 of file BOP_BSPNode.cpp.
| BOP_TAG BOP_BSPNode::classifyFaceOUT | ( | const MT_Point3 & | p1, |
| const MT_Point3 & | p2, | ||
| const MT_Point3 & | p3, | ||
| const MT_Plane3 & | plane | ||
| ) | const [protected] |
Classifies a face through OUT subtree.
| p1 | firts face vertex. |
| p2 | second face vertex. |
| p3 | third face vertex. |
| plane | face plane. |
Definition at line 394 of file BOP_BSPNode.cpp.
| int BOP_BSPNode::compChildren | ( | ) | const [protected] |
Comparation between both childrens.
Definition at line 501 of file BOP_BSPNode.cpp.
References NULL.
| unsigned int BOP_BSPNode::getDeep | ( | ) | const [inline] |
Definition at line 103 of file BOP_BSPNode.h.
References m_deep.
| BOP_BSPNode* BOP_BSPNode::getInChild | ( | ) | [inline] |
Definition at line 97 of file BOP_BSPNode.h.
References m_inChild.
| BOP_BSPNode* BOP_BSPNode::getOutChild | ( | ) | [inline] |
Definition at line 98 of file BOP_BSPNode.h.
References m_outChild.
| MT_Plane3& BOP_BSPNode::getPlane | ( | ) | [inline] |
Definition at line 101 of file BOP_BSPNode.h.
References m_plane.
| bool BOP_BSPNode::hasSameOrientation | ( | const MT_Plane3 & | plane | ) | const [protected] |
Determine if the input plane have the same orientation of the node plane.
| plane | plane to test. |
Definition at line 492 of file BOP_BSPNode.cpp.
References BOP_orientation().
| bool BOP_BSPNode::isLeaf | ( | ) | const [inline] |
Definition at line 99 of file BOP_BSPNode.h.
References m_inChild, and m_outChild.
| void BOP_BSPNode::print | ( | unsigned int | deep | ) |
| void BOP_BSPNode::setInChild | ( | BOP_BSPNode * | inChild | ) | [inline] |
Definition at line 95 of file BOP_BSPNode.h.
References m_inChild.
| void BOP_BSPNode::setOutChild | ( | BOP_BSPNode * | outChild | ) | [inline] |
Definition at line 96 of file BOP_BSPNode.h.
References m_outChild.
| void BOP_BSPNode::setPlane | ( | const MT_Plane3 & | plane | ) | [inline] |
Definition at line 100 of file BOP_BSPNode.h.
References m_plane.
| BOP_TAG BOP_BSPNode::simplifiedClassifyFace | ( | const MT_Point3 & | p1, |
| const MT_Point3 & | p2, | ||
| const MT_Point3 & | p3, | ||
| const MT_Plane3 & | plane | ||
| ) | const |
Simplified classification (optimized but requires that the face is not INOUT; only works correctly with faces completely IN or OUT).
| p1 | firts face vertex. |
| p2 | second face vertex. |
| p3 | third face vertex. |
| plane | face plane. |
Definition at line 414 of file BOP_BSPNode.cpp.
References BOP_createTAG(), IN, IN_IN_IN, and OUT_OUT_OUT.
| BOP_TAG BOP_BSPNode::simplifiedClassifyFaceIN | ( | const MT_Point3 & | p1, |
| const MT_Point3 & | p2, | ||
| const MT_Point3 & | p3, | ||
| const MT_Plane3 & | plane | ||
| ) | const [protected] |
Simplified classify through IN subtree.
| p1 | firts face vertex. |
| p2 | second face vertex. |
| p3 | third face vertex. |
| plane | face plane. |
Definition at line 458 of file BOP_BSPNode.cpp.
| BOP_TAG BOP_BSPNode::simplifiedClassifyFaceOUT | ( | const MT_Point3 & | p1, |
| const MT_Point3 & | p2, | ||
| const MT_Point3 & | p3, | ||
| const MT_Plane3 & | plane | ||
| ) | const [protected] |
Simplified classify through OUT subtree.
| p1 | firts face vertex. |
| p2 | second face vertex. |
| p3 | third face vertex. |
| plane | face plane. |
Definition at line 476 of file BOP_BSPNode.cpp.
| int BOP_BSPNode::splitTriangle | ( | MT_Point3 * | res, |
| const MT_Plane3 & | plane, | ||
| const MT_Point3 & | p1, | ||
| const MT_Point3 & | p2, | ||
| const MT_Point3 & | p3, | ||
| const BOP_TAG | tag | ||
| ) | const [protected] |
Extract a subtriangle from input triangle, is used for simplified classification. The subtriangle is obtained spliting the input triangle by input plane.
| res | output subtriangle result. |
| plane | spliter plane. |
| p1 | first triangle point. |
| p2 | second triangle point. |
| p3 | third triangle point. |
| tag | triangle orientation respect the plane. |
Definition at line 524 of file BOP_BSPNode.cpp.
References BOP_intersectPlane(), IN_IN_OUT, IN_ON_OUT, IN_OUT_IN, IN_OUT_ON, IN_OUT_OUT, ON_IN_OUT, ON_OUT_IN, OUT_IN_IN, OUT_IN_ON, OUT_IN_OUT, OUT_ON_IN, and OUT_OUT_IN.
Tests the point situation respect the node plane.
| p | point to test. |
Definition at line 156 of file BOP_BSPNode.cpp.
References BOP_classify(), and BOP_createTAG().
unsigned int BOP_BSPNode::m_deep [protected] |
Definition at line 49 of file BOP_BSPNode.h.
Referenced by getDeep().
BOP_BSPNode* BOP_BSPNode::m_inChild [protected] |
Definition at line 46 of file BOP_BSPNode.h.
Referenced by getInChild(), isLeaf(), and setInChild().
BOP_BSPNode* BOP_BSPNode::m_outChild [protected] |
Definition at line 47 of file BOP_BSPNode.h.
Referenced by getOutChild(), isLeaf(), and setOutChild().
MT_Plane3 BOP_BSPNode::m_plane [protected] |
Definition at line 48 of file BOP_BSPNode.h.
Referenced by getPlane(), and setPlane().