Blender V2.61 - r43446
|
Go to the source code of this file.
Defines | |
#define | sA_sB 12 |
#define | sB_sA 21 |
#define | sX_sA 31 |
#define | sA_sX 13 |
#define | sX_sB 32 |
#define | sB_sX 23 |
#define | sX_sX 33 |
#define | sA_sA_sB 112 |
#define | sB_sB_sA 221 |
#define | sB_sA_sA 211 |
#define | sA_sB_sB 122 |
#define | sA_sB_sA 121 |
#define | sB_sA_sB 212 |
#define | sA_sX_sB 132 |
#define | sB_sX_sA 231 |
#define | sX_sA_sB 312 |
#define | sX_sB_sA 321 |
#define | sA_sB_sX 123 |
#define | sB_sA_sX 213 |
#define | sA_sA_sB_sB 1122 |
#define | sB_sB_sA_sA 2211 |
#define | sA_sB_sA_sB 1212 |
#define | sB_sA_sB_sA 2121 |
#define | sA_sB_sB_sA 1221 |
#define | sB_sA_sA_sB 2112 |
Functions | |
void | BOP_intersectCoplanarFaces (BOP_Mesh *mesh, BOP_Faces *facesB, BOP_Face *faceA, BOP_Face *faceB, bool invert) |
void | BOP_intersectCoplanarFaces (BOP_Mesh *mesh, BOP_Faces *facesB, BOP_Face *faceB, BOP_Segment sA, MT_Plane3 planeA, bool invert) |
void | BOP_intersectNonCoplanarFaces (BOP_Mesh *mesh, BOP_Faces *facesA, BOP_Faces *facesB, BOP_Face *faceA, BOP_Face *faceB) |
void | BOP_getPoints (BOP_Mesh *mesh, BOP_Face *faceA, BOP_Segment &sA, MT_Plane3 planeB, MT_Point3 *points, unsigned int *faces, unsigned int &size, unsigned int faceValue) |
void | BOP_mergeSort (MT_Point3 *points, unsigned int *face, unsigned int &size, bool &invertA, bool &invertB) |
void | BOP_createXS (BOP_Mesh *mesh, BOP_Face *faceA, BOP_Face *faceB, BOP_Segment sA, BOP_Segment sB, bool invert, BOP_Segment *segments) |
void | BOP_createXS (BOP_Mesh *mesh, BOP_Face *faceA, BOP_Face *faceB, MT_Plane3 planeA, MT_Plane3 planeB, BOP_Segment sA, BOP_Segment sB, bool invert, BOP_Segment *segments) |
BOP_Index | BOP_getVertexIndex (BOP_Mesh *mesh, MT_Point3 point, unsigned int cfgA, unsigned int cfgB, BOP_Index vA, BOP_Index vB, bool invert) |
BOP_Index | BOP_getVertexIndex (BOP_Mesh *mesh, MT_Point3 point, unsigned int cfg, BOP_Index v) |
void | triangulate (BOP_Mesh *mesh, BOP_Faces *faces, BOP_Face *face, BOP_Segment s) |
BOP_Face * | BOP_getOppositeFace (BOP_Mesh *mesh, BOP_Faces *faces, BOP_Face *face, BOP_Edge *edge) |
bool | BOP_overlap (MT_Vector3 normal, MT_Point3 p1, MT_Point3 p2, MT_Point3 p3, MT_Point3 q1, MT_Point3 q2, MT_Point3 q3) |
void | BOP_mergeVertexs (BOP_Mesh *mesh, unsigned int firstFace) |
void | BOP_Face2Face (BOP_Mesh *mesh, BOP_Faces *facesA, BOP_Faces *facesB) |
void | BOP_sew (BOP_Mesh *mesh, BOP_Faces *facesA, BOP_Faces *facesB) |
bool | BOP_containsFace (BOP_Faces *faces, BOP_Face *face) |
void | BOP_removeOverlappedFaces (BOP_Mesh *mesh, BOP_Faces *facesA, BOP_Faces *facesB) |
Definition in file BOP_Face2Face.cpp.
#define sA_sA_sB 112 |
Definition at line 50 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sA_sA_sB_sB 1122 |
Definition at line 63 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sA_sB 12 |
Definition at line 42 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sA_sB_sA 121 |
Definition at line 54 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sA_sB_sA_sB 1212 |
Definition at line 65 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sA_sB_sB 122 |
Definition at line 53 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sA_sB_sB_sA 1221 |
Definition at line 67 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sA_sB_sX 123 |
Definition at line 60 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sA_sX 13 |
Definition at line 45 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sA_sX_sB 132 |
Definition at line 56 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sB_sA 21 |
Definition at line 43 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sB_sA_sA 211 |
Definition at line 52 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sB_sA_sA_sB 2112 |
Definition at line 68 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sB_sA_sB 212 |
Definition at line 55 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sB_sA_sB_sA 2121 |
Definition at line 66 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sB_sA_sX 213 |
Definition at line 61 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sB_sB_sA 221 |
Definition at line 51 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sB_sB_sA_sA 2211 |
Definition at line 64 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sB_sX 23 |
Definition at line 47 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sB_sX_sA 231 |
Definition at line 57 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sX_sA 31 |
Definition at line 44 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sX_sA_sB 312 |
Definition at line 58 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sX_sB 32 |
Definition at line 46 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sX_sB_sA 321 |
Definition at line 59 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
#define sX_sX 33 |
Definition at line 48 of file BOP_Face2Face.cpp.
Referenced by BOP_createXS().
Returns if a face is in the set of faces.
faces | set of faces |
face | face to be searched |
Definition at line 1120 of file BOP_Face2Face.cpp.
Referenced by BOP_getOppositeFace().
void BOP_createXS | ( | BOP_Mesh * | mesh, |
BOP_Face * | faceA, | ||
BOP_Face * | faceB, | ||
BOP_Segment | sA, | ||
BOP_Segment | sB, | ||
bool | invert, | ||
BOP_Segment * | segments | ||
) |
Computes the x-segment of two segments (the shared interval). The segments needs to have sA.m_cfg1 > 0 && sB.m_cfg1 > 0 .
mesh | mesh that contains the faces, edges and vertices |
faceA | face of object A |
faceB | face of object B |
sA | segment of intersection between faceA and planeB |
sB | segment of intersection between faceB and planeA |
invert | indicates if faceA has priority over faceB |
segmemts | array of the output x-segments |
Definition at line 661 of file BOP_Face2Face.cpp.
References BOP_Face::getPlane(), and invert().
Referenced by BOP_intersectCoplanarFaces(), and BOP_intersectNonCoplanarFaces().
void BOP_createXS | ( | BOP_Mesh * | mesh, |
BOP_Face * | faceA, | ||
BOP_Face * | faceB, | ||
MT_Plane3 | planeA, | ||
MT_Plane3 | planeB, | ||
BOP_Segment | sA, | ||
BOP_Segment | sB, | ||
bool | invert, | ||
BOP_Segment * | segments | ||
) |
Computes the x-segment of two segments (the shared interval). The segments needs to have sA.m_cfg1 > 0 && sB.m_cfg1 > 0 .
mesh | mesh that contains the faces, edges and vertices |
faceA | face of object A |
faceB | face of object B |
planeA | plane of faceA |
planeB | plane of faceB |
sA | segment of intersection between faceA and planeB |
sB | segment of intersection between faceB and planeA |
invert | indicates if faceA has priority over faceB |
segmemts | array of the output x-segments |
Definition at line 684 of file BOP_Face2Face.cpp.
References BOP_getPoints(), BOP_getVertexIndex(), BOP_mergeSort(), BOP_Segment::createUndefinedCfg(), BOP_Segment::getConfig(), i, BOP_Segment::invert(), label(), BOP_Segment::m_cfg1, BOP_Segment::m_cfg2, BOP_Segment::m_v1, BOP_Segment::m_v2, sA_sA_sB, sA_sA_sB_sB, sA_sB, sA_sB_sA, sA_sB_sA_sB, sA_sB_sB, sA_sB_sB_sA, sA_sB_sX, sA_sX, sA_sX_sB, sB_sA, sB_sA_sA, sB_sA_sA_sB, sB_sA_sB, sB_sA_sB_sA, sB_sA_sX, sB_sB_sA, sB_sB_sA_sA, sB_sX, sB_sX_sA, size(), BOP_Segment::sort(), sX_sA, sX_sA_sB, sX_sB, sX_sB_sA, and sX_sX.
Computes intersections between faces of both lists.
mesh | mesh that contains the faces, edges and vertices |
facesA | set of faces from object A |
facesB | set of faces from object B |
Two optimizations were added here: 1) keep the bounding box for a face once it's created; this is especially important for B faces, since they were being created and recreated over and over 2) associate a "split" index in the faceB vector with each A face; when an A face is split, we will not need to recheck any B faces have already been checked against that original A face
Definition at line 161 of file BOP_Face2Face.cpp.
References BOP_containsPoint(), BOP_intersectCoplanarFaces(), BOP_intersectNonCoplanarFaces(), BOP_orientation(), BROKEN, BOP_Face::getBBox(), BOP_Face::getPlane(), BOP_Face::getSplit(), BOP_Face::getTAG(), BOP_Face::getVertex(), BOP_Mesh::getVertex(), BOP_BBox::intersect(), NULL, PHANTOM, BOP_Face::setBBox(), and BOP_Face::setSplit().
Referenced by BOP_intersectionBoolOp().
BOP_Face * BOP_getOppositeFace | ( | BOP_Mesh * | mesh, |
BOP_Faces * | faces, | ||
BOP_Face * | face, | ||
BOP_Edge * | edge | ||
) |
Returns the first face of faces that shares the input edge of face.
mesh | mesh that contains the faces, edges and vertices |
faces | set of faces |
face | input face |
edge | face's edge |
Definition at line 1140 of file BOP_Face2Face.cpp.
References BOP_containsFace(), BROKEN, BOP_Mesh::getFace(), BOP_Edge::getFaces(), BOP_Face::getTAG(), and NULL.
Referenced by triangulate().
void BOP_getPoints | ( | BOP_Mesh * | mesh, |
BOP_Face * | faceA, | ||
BOP_Segment & | sA, | ||
MT_Plane3 | planeB, | ||
MT_Point3 * | points, | ||
unsigned int * | faces, | ||
unsigned int & | size, | ||
unsigned int | faceValue | ||
) |
Obtains the points of the segment created from the intersection between faceA and planeB.
mesh | mesh that contains the faces, edges and vertices |
faceA | intersected face |
sA | segment of the intersection between faceA and planeB |
planeB | intersected plane |
points | array of points where the new points are saved |
faces | array of relative face index to the points |
size | size of arrays points and faces |
faceValue | relative face index of new points |
Definition at line 430 of file BOP_Face2Face.cpp.
References BOP_splitEdge(), BOP_Segment::getEdge(), BOP_Vertex::getPoint(), BOP_Segment::getVertex(), BOP_Mesh::getVertex(), BOP_Segment::isDefined(), BOP_Segment::isEdge(), BOP_Segment::isVertex(), BOP_Segment::m_cfg1, BOP_Segment::m_cfg2, BOP_Segment::m_v1, BOP_Segment::m_v2, and size().
Referenced by BOP_createXS().
Computes the vertex index of a point.
mesh | mesh that contains the faces, edges and vertices |
cfg | configuration of point |
v | vertex index of point |
Definition at line 1018 of file BOP_Face2Face.cpp.
References BOP_Mesh::addVertex(), and BOP_Segment::isVertex().
BOP_Index BOP_getVertexIndex | ( | BOP_Mesh * | mesh, |
MT_Point3 | point, | ||
unsigned int | cfgA, | ||
unsigned int | cfgB, | ||
BOP_Index | vA, | ||
BOP_Index | vB, | ||
bool | invert | ||
) |
Computes the vertex index of a point.
mesh | mesh that contains the faces, edges and vertices |
point | input point |
cfgA | configuration of point on faceA |
cfgB | configuration of point on faceB |
vA | vertex index of point on faceA |
vB | vertex index of point on faceB |
invert | indicates if vA has priority over vB |
Definition at line 983 of file BOP_Face2Face.cpp.
References BOP_Mesh::addVertex(), BOP_Segment::isVertex(), and BOP_Mesh::replaceVertexIndex().
Referenced by BOP_createXS().
void BOP_intersectCoplanarFaces | ( | BOP_Mesh * | mesh, |
BOP_Faces * | facesB, | ||
BOP_Face * | faceB, | ||
BOP_Segment | sA, | ||
MT_Plane3 | planeA, | ||
bool | invert | ||
) |
Triangulates faceB using segment sA and planeA.
mesh | mesh that contains the faces, edges and vertices |
facesB | set of faces from object B |
faceB | face from object B |
sA | segment to intersect with faceB |
planeA | plane to intersect with faceB |
invert | indicates if sA has priority over faceB |
Definition at line 347 of file BOP_Face2Face.cpp.
References BOP_createXS(), BOP_mergeVertexs(), BOP_splitFace(), BOP_Mesh::getNumFaces(), BOP_Segment::isDefined(), BOP_Segment::m_cfg1, NULL, and triangulate().
void BOP_intersectCoplanarFaces | ( | BOP_Mesh * | mesh, |
BOP_Faces * | facesB, | ||
BOP_Face * | faceA, | ||
BOP_Face * | faceB, | ||
bool | invert | ||
) |
Triangulates faceB using edges of faceA that both are complanars.
mesh | mesh that contains the faces, edges and vertices |
facesB | set of faces from object B |
faceA | face from object A |
faceB | face from object B |
invert | indicates if faceA has priority over faceB |
Definition at line 272 of file BOP_Face2Face.cpp.
References BROKEN, BOP_Segment::createVertexCfg(), MT_Vector3::cross(), BOP_Face::getOriginalFace(), BOP_Face::getPlane(), BOP_Face::getTAG(), BOP_Face::getVertex(), BOP_Mesh::getVertex(), BOP_Segment::m_cfg1, BOP_Segment::m_cfg2, BOP_Segment::m_v1, BOP_Segment::m_v2, MT_Vector3::normalized(), MT_Vector3::safe_normalized(), MT_Tuple4::x(), MT_Tuple4::y(), and MT_Tuple4::z().
Referenced by BOP_Face2Face(), and BOP_sew().
void BOP_intersectNonCoplanarFaces | ( | BOP_Mesh * | mesh, |
BOP_Faces * | facesA, | ||
BOP_Faces * | facesB, | ||
BOP_Face * | faceA, | ||
BOP_Face * | faceB | ||
) |
Triangulates faceB using edges of faceA that both are not complanars.
mesh | mesh that contains the faces, edges and vertices |
facesB | set of faces from object B |
faceA | face from object A |
faceB | face from object B |
Definition at line 374 of file BOP_Face2Face.cpp.
References BOP_createXS(), BOP_mergeVertexs(), BOP_splitFace(), BOP_Mesh::getNumFaces(), BOP_Face::getPlane(), BOP_Segment::isDefined(), BOP_Segment::m_cfg1, and triangulate().
Referenced by BOP_Face2Face().
void BOP_mergeSort | ( | MT_Point3 * | points, |
unsigned int * | face, | ||
unsigned int & | size, | ||
bool & | invertA, | ||
bool & | invertB | ||
) |
Sorts the colinear points and relative face indices.
points | array of points where the new points are saved |
faces | array of relative face index to the points |
size | size of arrays points and faces |
invertA | indicates if points of same relative face had been exchanged |
Definition at line 480 of file BOP_Face2Face.cpp.
References BOP_fuzzyZero(), distance(), MT_Point3::distance(), i, and size().
Referenced by BOP_createXS().
void BOP_mergeVertexs | ( | BOP_Mesh * | mesh, |
unsigned int | firstFace | ||
) |
Tests if faces since firstFace have all vertexs non-coincident of colinear, otherwise repairs the mesh.
mesh | mesh that contains the faces, edges and vertices |
firstFace | first face index to be tested |
Definition at line 404 of file BOP_Face2Face.cpp.
References BOP_collinear(), BROKEN, BOP_Mesh::getFace(), BOP_Mesh::getNumFaces(), BOP_Face::getTAG(), BOP_Face::getVertex(), BOP_Mesh::getVertex(), PHANTOM, and BOP_Face::setTAG().
Referenced by BOP_intersectCoplanarFaces(), and BOP_intersectNonCoplanarFaces().
bool BOP_overlap | ( | MT_Vector3 | normal, |
MT_Point3 | p1, | ||
MT_Point3 | p2, | ||
MT_Point3 | p3, | ||
MT_Point3 | q1, | ||
MT_Point3 | q2, | ||
MT_Point3 | q3 | ||
) |
Computes if triangle p1,p2,p3 is overlapped with triangle q1,q2,q3.
normal | normal of the triangle p1,p2,p3 |
p1 | point of first triangle |
p2 | point of first triangle |
p3 | point of first triangle |
q1 | point of second triangle |
q2 | point of second triangle |
q3 | point of second triangle |
Definition at line 1217 of file BOP_Face2Face.cpp.
References BOP_classify(), BOP_createTAG(), MT_Vector3::cross(), IN_IN_IN, and OUT_OUT_OUT.
Referenced by BOP_removeOverlappedFaces().
Removes faces from facesB that are overlapped with anyone from facesA.
mesh | mesh that contains the faces, edges and vertices |
facesA | set of faces from object A |
facesB | set of faces from object B |
Definition at line 1171 of file BOP_Face2Face.cpp.
References BOP_containsPoint(), BOP_overlap(), BROKEN, BOP_Face::getPlane(), BOP_Face::getTAG(), BOP_Face::getVertex(), BOP_Mesh::getVertex(), i, OVERLAPPED, BOP_Face::setTAG(), MT_Tuple4::x(), MT_Tuple4::y(), and MT_Tuple4::z().
Referenced by BOP_intersectionBoolOp().
Computes intesections of coplanars faces from object A with faces from object B.
mesh | mesh that contains the faces, edges and vertices |
facesA | set of faces from object A |
facesB | set of faces from object B |
Definition at line 235 of file BOP_Face2Face.cpp.
References BOP_containsPoint(), BOP_intersectCoplanarFaces(), BOP_orientation(), BROKEN, BOP_Face::getPlane(), BOP_Face::getTAG(), BOP_Face::getVertex(), BOP_Mesh::getVertex(), and PHANTOM.
Referenced by BOP_intersectionBoolOp().
void triangulate | ( | BOP_Mesh * | mesh, |
BOP_Faces * | faces, | ||
BOP_Face * | face, | ||
BOP_Segment | s | ||
) |
Triangulates the input face according to the specified segment.
mesh | mesh that contains the faces, edges and vertices |
faces | set of faces that contains the original face and the new triangulated faces |
face | face to be triangulated |
s | segment used to triangulate face |
Definition at line 1038 of file BOP_Face2Face.cpp.
References BOP_getOppositeFace(), BOP_triangulateA(), BOP_triangulateB(), BOP_triangulateC(), BOP_triangulateD(), BOP_triangulateE(), BOP_triangulateF(), credits_svn_gen::e, BOP_Segment::getEdge(), BOP_Face::getEdgeIndex(), BOP_Edge::getVertex1(), BOP_Edge::getVertex2(), BOP_Segment::isEdge(), BOP_Segment::isIn(), BOP_Segment::isUndefined(), BOP_Segment::isVertex(), BOP_Segment::m_cfg1, BOP_Segment::m_cfg2, BOP_Segment::m_v1, BOP_Segment::m_v2, and NULL.
Referenced by BOP_intersectCoplanarFaces(), and BOP_intersectNonCoplanarFaces().