Blender V2.61 - r43446
|
Go to the source code of this file.
Definition in file BOP_Triangulator.cpp.
Adds the new face into the faces set and the mesh and sets it a new tag.
mesh | mesh that contains the faces, edges and vertices |
faces | set of faces that contains oldFace |
face | input face to be added |
tag | tag of the new face |
Definition at line 422 of file BOP_Triangulator.cpp.
References BOP_Mesh::addFace(), BOP_Face::getVertex(), and BOP_Face::setTAG().
Referenced by BOP_triangulateA(), BOP_triangulateB(), BOP_triangulateC_split(), BOP_triangulateD_split(), BOP_triangulateE(), and BOP_triangulateF().
Returns which of vertex v1 or v2 is nearest to u.
mesh | mesh that contains the faces, edges and vertices |
u | reference vertex index |
v1 | first vertex index |
v2 | second vertex index |
Definition at line 530 of file BOP_Triangulator.cpp.
References BOP_comp(), MT_Point3::distance(), BOP_Vertex::getPoint(), and BOP_Mesh::getVertex().
Referenced by BOP_triangulateD_split().
BOP_Index BOP_getTriangleVertex | ( | BOP_Mesh * | mesh, |
BOP_Index | v1, | ||
BOP_Index | v2, | ||
BOP_Index | v3, | ||
BOP_Index | v4 | ||
) |
Returns the vertex (v3 or v4) that splits the quad (v1,v2,v3,v4) in the best pair of triangles.
mesh | mesh that contains the faces, edges and vertices |
v1 | first vertex index |
v2 | second vertex index |
v3 | third vertex index |
v4 | fourth vertex index |
Definition at line 514 of file BOP_Triangulator.cpp.
References BOP_isInsideCircle().
Referenced by BOP_triangulateC_split().
bool BOP_isInsideCircle | ( | BOP_Mesh * | mesh, |
BOP_Index | v1, | ||
BOP_Index | v2, | ||
BOP_Index | v3, | ||
BOP_Index | v4, | ||
BOP_Index | v5 | ||
) |
Computes if vertexs v4 and v5 are not inside the circle defined by v1,v2,v3 (seems to be a nice triangle)
mesh | mesh that contains the faces, edges and vertices |
v1 | first vertex index |
v2 | second vertex index |
v3 | third vertex index |
v4 | fourth vertex index |
v5 | five vertex index |
Definition at line 549 of file BOP_Triangulator.cpp.
References BOP_isInsideCircle(), BOP_Vertex::getPoint(), and BOP_Mesh::getVertex().
Computes if vertex w is not inside the circle defined by v1,v2,v3 (seems to be a nice triangle)
mesh | mesh that contains the faces, edges and vertices |
v1 | first vertex index |
v2 | second vertex index |
v3 | third vertex index |
w | fourth vertex index |
Definition at line 567 of file BOP_Triangulator.cpp.
References BOP_isInsideCircle(), BOP_Vertex::getPoint(), and BOP_Mesh::getVertex().
void BOP_splitQuad | ( | BOP_Mesh * | mesh, |
MT_Plane3 | plane, | ||
BOP_Index | v1, | ||
BOP_Index | v2, | ||
BOP_Index | v3, | ||
BOP_Index | v4, | ||
BOP_Face * | triangles[], | ||
BOP_Index | original | ||
) |
Computes the best quad triangulation.
mesh | mesh that contains the faces, edges and vertices |
plane | plane used to create the news faces |
v1 | first vertex index |
v2 | second vertex index |
v3 | third vertex index |
v4 | fourth vertex index |
triangles | array of faces where the new two faces will be saved |
original | face index to the new faces |
Definition at line 470 of file BOP_Triangulator.cpp.
References BOP_concave(), BOP_isInsideCircle(), BOP_orientation(), BOP_Vertex::getPoint(), and BOP_Mesh::getVertex().
Referenced by BOP_triangulateC_split(), BOP_triangulateE(), and BOP_triangulateF().
void BOP_triangulateA | ( | BOP_Mesh * | mesh, |
BOP_Faces * | faces, | ||
BOP_Face * | face, | ||
BOP_Index | v, | ||
unsigned int | e | ||
) |
Triangulates the face in two new faces by splitting one edge.
* /|\ / | \ / | \ / | \ / | \ *-----x-----*
mesh | mesh that contains the faces, edges and vertices |
faces | set of faces that contains face and will contains new faces |
face | input face to be triangulate |
v | vertex index that intersects the edge |
e | relative edge index used to triangulate the face |
Definition at line 67 of file BOP_Triangulator.cpp.
References BOP_addFace(), BROKEN, BOP_Face::freeBBox(), BOP_Face::getOriginalFace(), BOP_Face::getPlane(), BOP_Face::getSplit(), BOP_Face::getTAG(), BOP_Face::getVertex(), BOP_Face::setSplit(), and BOP_Face::setTAG().
Referenced by triangulate().
Triangulates the face in three new faces by one inner point.
* / \ / \ / \ / x \ / \ *-----------*
mesh | mesh that contains the faces, edges and vertices |
faces | set of faces that contains face and will contains new faces |
face | input face to be triangulate |
v | vertex index that lays inside face |
Definition at line 117 of file BOP_Triangulator.cpp.
References BOP_addFace(), BROKEN, BOP_Face::freeBBox(), BOP_Face::getOriginalFace(), BOP_Face::getPlane(), BOP_Face::getSplit(), BOP_Face::getTAG(), BOP_Face::getVertex(), BOP_Face::setSplit(), and BOP_Face::setTAG().
Referenced by triangulate().
void BOP_triangulateC | ( | BOP_Mesh * | mesh, |
BOP_Faces * | faces, | ||
BOP_Face * | face, | ||
BOP_Index | v1, | ||
BOP_Index | v2 | ||
) |
Triangulates the face in five new faces by two inner points.
* / \ / \ / \ / x x \ / \ *-----------*
mesh | mesh that contains the faces, edges and vertices |
faces | set of faces that contains face and will contains new faces |
face | input face to be triangulate |
v1 | first vertex index that lays inside face |
v2 | second vertex index that lays inside face |
Definition at line 154 of file BOP_Triangulator.cpp.
References BOP_isInsideCircle(), BOP_triangulateC_split(), and BOP_Face::getVertex().
Referenced by triangulate().
void BOP_triangulateC_split | ( | BOP_Mesh * | mesh, |
BOP_Faces * | faces, | ||
BOP_Face * | face, | ||
BOP_Index | v1, | ||
BOP_Index | v2, | ||
BOP_Index | v3, | ||
BOP_Index | v4, | ||
BOP_Index | v5 | ||
) |
Triangulates the face (v1,v2,v3) in five new faces by two inner points (v4,v5), where v1 v4 v5 defines the nice triangle and v4 v5 v2 v3 defines the quad to be tesselated.
mesh | mesh that contains the faces, edges and vertices |
faces | set of faces that contains face and will contains new faces |
face | input face to be triangulate |
v1 | first vertex index that defines the original triangle |
v2 | second vertex index that defines the original triangle |
v3 | third vertex index that defines the original triangle |
v4 | first vertex index that lays inside face |
v5 | second vertex index that lays inside face |
Definition at line 186 of file BOP_Triangulator.cpp.
References BOP_addFace(), BOP_getTriangleVertex(), BOP_splitQuad(), BROKEN, BOP_Face::freeBBox(), BOP_Face::getOriginalFace(), BOP_Face::getPlane(), BOP_Face::getSplit(), BOP_Face::getTAG(), BOP_Face::setSplit(), BOP_Face::setTAG(), and simple_enum_gen::w.
Referenced by BOP_triangulateC().
void BOP_triangulateD | ( | BOP_Mesh * | mesh, |
BOP_Faces * | faces, | ||
BOP_Face * | face, | ||
BOP_Index | v1, | ||
BOP_Index | v2, | ||
unsigned int | e | ||
) |
Triangulates the face in three new faces by splitting twice an edge.
* / \ / \ / \ / \ / \ *---x---x---*
mesh | mesh that contains the faces, edges and vertices |
faces | set of faces that contains face and will contains new faces |
face | input face to be triangulate |
v1 | first vertex index that intersects the edge |
v2 | second vertex index that intersects the edge |
e | relative edge index used to triangulate the face |
Definition at line 239 of file BOP_Triangulator.cpp.
References BOP_triangulateD_split(), and BOP_Face::getVertex().
Referenced by triangulate().
void BOP_triangulateD_split | ( | BOP_Mesh * | mesh, |
BOP_Faces * | faces, | ||
BOP_Face * | face, | ||
BOP_Index | v1, | ||
BOP_Index | v2, | ||
BOP_Index | v3, | ||
BOP_Index | v4, | ||
BOP_Index | v5 | ||
) |
Triangulates the face (v1,v2,v3) in three new faces by splitting twice an edge.
mesh | mesh that contains the faces, edges and vertices |
faces | set of faces that contains face and will contains new faces |
face | input face to be triangulate |
v1 | first vertex index that defines the original triangle |
v2 | second vertex index that defines the original triangle |
v3 | third vertex index that defines the original triangle |
v4 | first vertex index that lays on the edge |
v5 | second vertex index that lays on the edge |
Definition at line 267 of file BOP_Triangulator.cpp.
References BOP_addFace(), BOP_getNearestVertex(), BROKEN, BOP_Face::freeBBox(), BOP_Face::getOriginalFace(), BOP_Face::getPlane(), BOP_Face::getSplit(), BOP_Face::getTAG(), BOP_Face::setSplit(), BOP_Face::setTAG(), and simple_enum_gen::w.
Referenced by BOP_triangulateD().
void BOP_triangulateE | ( | BOP_Mesh * | mesh, |
BOP_Faces * | faces, | ||
BOP_Face * | face, | ||
BOP_Index | v1, | ||
BOP_Index | v2, | ||
unsigned int | e1, | ||
unsigned int | e2 | ||
) |
Triangulates the face in three new faces by splitting two edges.
* / \ / \ x x / \ / \ *-----------*
mesh | mesh that contains the faces, edges and vertices |
faces | set of faces that contains face and will contains new faces |
face | input face to be triangulate |
v1 | vertex index that intersects the first edge |
v1 | vertex index that intersects the second edge |
e1 | first relative edge index used to triangulate the face |
e2 | second relative edge index used to triangulate the face |
Definition at line 307 of file BOP_Triangulator.cpp.
References BOP_addFace(), BOP_splitQuad(), BROKEN, BOP_Face::freeBBox(), BOP_Face::getOriginalFace(), BOP_Face::getPlane(), BOP_Face::getSplit(), BOP_Face::getTAG(), BOP_Face::getVertex(), BOP_Face::setSplit(), and BOP_Face::setTAG().
Referenced by triangulate().
void BOP_triangulateF | ( | BOP_Mesh * | mesh, |
BOP_Faces * | faces, | ||
BOP_Face * | face, | ||
BOP_Index | v1, | ||
BOP_Index | v2, | ||
unsigned int | e | ||
) |
Triangulates the face in four new faces by one edge and one inner point.
* / \ / \ x x \ / \ / \ *-----------*
mesh | mesh that contains the faces, edges and vertices |
faces | set of faces that contains face and will contains new faces |
face | input face to be triangulate |
v1 | vertex index that lays inside face |
v2 | vertex index that intersects the edge |
e | relative edge index used to triangulate the face |
Definition at line 375 of file BOP_Triangulator.cpp.
References BOP_addFace(), BOP_splitQuad(), BROKEN, BOP_Face::freeBBox(), BOP_Face::getOriginalFace(), BOP_Face::getPlane(), BOP_Face::getSplit(), BOP_Face::getTAG(), BOP_Face::getVertex(), BOP_Face::setSplit(), and BOP_Face::setTAG().
Referenced by triangulate().