Blender  V2.59
Public Member Functions
BOP_Mesh Class Reference

#include <BOP_Mesh.h>

List of all members.

Public Member Functions

 BOP_Mesh ()
 ~BOP_Mesh ()
BOP_Index addVertex (MT_Point3 point)
BOP_Index addFace (BOP_Face *face)
BOP_Index addFace (BOP_Face3 *face)
BOP_Index addFace (BOP_Face4 *face)
BOP_VertexgetVertex (BOP_Index v)
BOP_FacegetFace (BOP_Index v)
BOP_EdgegetEdge (BOP_Index v)
BOP_EdgegetEdge (BOP_Face *face, unsigned int edge)
BOP_EdgegetEdge (BOP_Face3 *face, unsigned int edge)
BOP_EdgegetEdge (BOP_Face4 *face, unsigned int edge)
BOP_EdgegetEdge (BOP_Index v1, BOP_Index v2)
bool getIndexEdge (BOP_Index v1, BOP_Index v2, BOP_Index &e)
BOP_VertexsgetVertexs ()
BOP_EdgesgetEdges ()
BOP_FacesgetFaces ()
BOP_FacegetFace (BOP_Index v1, BOP_Index v2, BOP_Index v3)
bool getIndexFace (BOP_Index v1, BOP_Index v2, BOP_Index v3, BOP_Index &f)
unsigned int getNumVertexs ()
unsigned int getNumEdges ()
unsigned int getNumFaces ()
unsigned int getNumVertexs (BOP_TAG tag)
unsigned int getNumFaces (BOP_TAG tag)
BOP_Index replaceVertexIndex (BOP_Index oldIndex, BOP_Index newIndex)
void rehashVertex (BOP_Index oldIndex, BOP_Index newIndex, BOP_Index otherIndex)
bool isClosedMesh ()
void print ()
void printFormat ()
void printFormat (BOP_Faces *faces)
void saveFormat (BOP_Faces *faces, char *filename)
void printFace (BOP_Face *face, int col=0)
void testPlane (BOP_Face *face)
void testMesh ()
void updatePlanes ()

Detailed Description

Definition at line 56 of file BOP_Mesh.h.


Constructor & Destructor Documentation

BOP_Mesh::BOP_Mesh ( )

Definition at line 44 of file BOP_Mesh.cpp.

References NULL.

BOP_Mesh::~BOP_Mesh ( )

Destroys a mesh.

Definition at line 58 of file BOP_Mesh.cpp.

References BLI_freelistN(), MEM_freeN(), and NULL.


Member Function Documentation

BOP_Index BOP_Mesh::addFace ( BOP_Face face)

Adds a new face.

Parameters:
facemesh face
Returns:
mesh face index

Definition at line 235 of file BOP_Mesh.cpp.

References BOP_Face::size().

Referenced by BOP_addFace(), BOP_addMesh(), and clean_nonmanifold().

BOP_Index BOP_Mesh::addFace ( BOP_Face3 face)

Adds a new triangle.

Parameters:
facemesh triangle
Returns:
mesh face index

Definition at line 248 of file BOP_Mesh.cpp.

References BOP_Vertex::addEdge(), BOP_Edge::addFace(), BROKEN, getIndexEdge(), BOP_Face::getVertex(), getVertex(), and BOP_Face::setTAG().

BOP_Index BOP_Mesh::addFace ( BOP_Face4 face)

Adds a new quad.

Parameters:
facemesh quad
Returns:
mesh face index

Definition at line 295 of file BOP_Mesh.cpp.

References BOP_Vertex::addEdge(), BOP_Edge::addFace(), BROKEN, getIndexEdge(), BOP_Face::getVertex(), getVertex(), and BOP_Face::setTAG().

BOP_Index BOP_Mesh::addVertex ( MT_Point3  p)

Adds a new vertex.

Parameters:
pvertex point
Returns:
mesh vertex index

Definition at line 93 of file BOP_Mesh.cpp.

Referenced by BOP_addMesh(), and BOP_getVertexIndex().

BOP_Edge * BOP_Mesh::getEdge ( BOP_Index  i)

Returns the mesh edge with the specified index.

Parameters:
iedge index
Returns:
edge with the specified index

Definition at line 623 of file BOP_Mesh.cpp.

References i.

BOP_Edge * BOP_Mesh::getEdge ( BOP_Face face,
unsigned int  edge 
)

Returns the mesh edge on the specified face and relative edge index.

Parameters:
facemesh face
edgeface relative edge index
Returns:
mesh edge on the specified face and relative index, NULL otherwise

Definition at line 491 of file BOP_Mesh.cpp.

References BOP_Face::size().

BOP_Edge * BOP_Mesh::getEdge ( BOP_Face3 face,
unsigned int  edge 
)

Returns the mesh edge on the specified triangle and relative edge index.

Parameters:
facemesh triangle
edgeface relative edge index
Returns:
mesh edge on the specified triangle and relative index, NULL otherwise

Definition at line 505 of file BOP_Mesh.cpp.

References BOP_Face::getVertex(), and NULL.

BOP_Edge * BOP_Mesh::getEdge ( BOP_Face4 face,
unsigned int  edge 
)

Returns the mesh edge on the specified quad and relative edge index.

Parameters:
facemesh quad
edgeface relative edge index
Returns:
mesh edge on the specified quad and relative index, NULL otherwise

Definition at line 525 of file BOP_Mesh.cpp.

References BOP_Face::getVertex(), and NULL.

BOP_Edge * BOP_Mesh::getEdge ( BOP_Index  v1,
BOP_Index  v2 
)

Returns the mesh edge with the specified vertex indexs.

Parameters:
v1vertex index
v2vertex index
Returns:
mesh edge with the specified vertex indexs, NULL otherwise

Definition at line 385 of file BOP_Mesh.cpp.

References HASH, EdgeEntry::index, EdgeEntry::next, NULL, EdgeEntry::v1, and EdgeEntry::v2.

BOP_Edges & BOP_Mesh::getEdges ( )

Returns the edges set of this mesh.

Returns:
edges set

Definition at line 594 of file BOP_Mesh.cpp.

Referenced by clean_nonmanifold().

BOP_Face * BOP_Mesh::getFace ( BOP_Index  i)

Returns the mesh face with the specified index.

Parameters:
iface index
Returns:
face with the specified index

Definition at line 633 of file BOP_Mesh.cpp.

References i.

Referenced by BOP_getOppositeFace(), BOP_mergeVertexs(), clean_nonmanifold(), and deleteFace().

BOP_Face * BOP_Mesh::getFace ( BOP_Index  v1,
BOP_Index  v2,
BOP_Index  v3 
)

Returns the mesh face with the specified vertex indexs.

Parameters:
v1vertex index
v2vertex index
v3vertex index
Returns:
mesh edge with the specified vertex indexs, NULL otherwise

Definition at line 548 of file BOP_Mesh.cpp.

References NULL.

BOP_Faces & BOP_Mesh::getFaces ( )

Returns the faces set of this mesh.

Returns:
faces set

Definition at line 603 of file BOP_Mesh.cpp.

Referenced by BOP_exportMesh(), deleteFace(), and removeBrokenFaces().

bool BOP_Mesh::getIndexEdge ( BOP_Index  v1,
BOP_Index  v2,
BOP_Index e 
)

Returns the mesh edge index with the specified vertex indexs.

Parameters:
v1vertex index
v2vertex index
eedge index with the specified vertex indexs
Returns:
true if there is a mesh edge with the specified vertex indexs, false otherwise

Definition at line 427 of file BOP_Mesh.cpp.

References HASH, EdgeEntry::index, EdgeEntry::next, EdgeEntry::v1, and EdgeEntry::v2.

Referenced by addFace().

bool BOP_Mesh::getIndexFace ( BOP_Index  v1,
BOP_Index  v2,
BOP_Index  v3,
BOP_Index f 
)

Returns the mesh face index with the specified vertex indexs.

Parameters:
v1vertex index
v2vertex index
v3vertex index
fface index with the specified vertex indexs
Returns:
true if there is a mesh face with the specified vertex indexs, false otherwise

Definition at line 567 of file BOP_Mesh.cpp.

unsigned int BOP_Mesh::getNumEdges ( )

Returns the number of edges of this mesh.

Returns:
number of edges

Definition at line 651 of file BOP_Mesh.cpp.

unsigned int BOP_Mesh::getNumFaces ( )

Returns the number of faces of this mesh.

Returns:
number of faces

Definition at line 660 of file BOP_Mesh.cpp.

Referenced by BOP_intersectCoplanarFaces(), BOP_intersectNonCoplanarFaces(), and BOP_mergeVertexs().

unsigned int BOP_Mesh::getNumFaces ( BOP_TAG  tag)

Returns the number of faces of this mesh with the specified tag.

Returns:
number of faces with the specified tag

Definition at line 682 of file BOP_Mesh.cpp.

unsigned int BOP_Mesh::getNumVertexs ( )

Returns the number of vertices of this mesh.

Returns:
number of vertices

Definition at line 642 of file BOP_Mesh.cpp.

Referenced by BOP_addMesh(), and BOP_intersectionBoolOp().

unsigned int BOP_Mesh::getNumVertexs ( BOP_TAG  tag)

Returns the number of vertices of this mesh with the specified tag.

Returns:
number of vertices with the specified tag

Definition at line 669 of file BOP_Mesh.cpp.

BOP_Vertex * BOP_Mesh::getVertex ( BOP_Index  i)
BOP_Vertexs & BOP_Mesh::getVertexs ( )

Returns the vertices set of this mesh.

Returns:
vertices set

Definition at line 585 of file BOP_Mesh.cpp.

Referenced by BOP_exportMesh().

bool BOP_Mesh::isClosedMesh ( )

Definition at line 790 of file BOP_Mesh.cpp.

References BROKEN, BOP_Edge::getFaces(), and i.

Referenced by BOP_performBooleanOperation().

void BOP_Mesh::print ( )
void BOP_Mesh::printFace ( BOP_Face face,
int  col = 0 
)
void BOP_Mesh::printFormat ( )
void BOP_Mesh::printFormat ( BOP_Faces faces)
void BOP_Mesh::rehashVertex ( BOP_Index  o,
BOP_Index  n,
BOP_Index  x 
)

replace one vertex with another in the hash list

Parameters:
oold mesh vertex index
nnew mesh vertex index
xedge's other mesh vertex index

Definition at line 156 of file BOP_Mesh.cpp.

References BLI_addtail(), BLI_remlink(), ListBase::first, HASH, ListBase::last, MEM_freeN(), MEM_mallocN(), EdgeEntry::next, NULL, EdgeEntry::v1, and EdgeEntry::v2.

Referenced by replaceVertexIndex().

BOP_Index BOP_Mesh::replaceVertexIndex ( BOP_Index  oldIndex,
BOP_Index  newIndex 
)
void BOP_Mesh::saveFormat ( BOP_Faces faces,
char *  filename 
)
void BOP_Mesh::testMesh ( )

Referenced by BOP_intersectionBoolOp().

void BOP_Mesh::testPlane ( BOP_Face face)
void BOP_Mesh::updatePlanes ( )

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