Blender V2.61 - r43446
|
#include <BSP_CSGMesh.h>
Public Member Functions | |
bool | SetVertices (std::vector< BSP_MVertex > *verts) |
void | AddPolygon (const int *verts, int num_verts) |
void | AddPolygon (const BSP_MFace &face) |
bool | BuildEdges () |
void | DestroyEdges () |
BSP_CSGMesh * | NewCopy () const |
void | Invert () |
std::vector< BSP_MVertex > & | VertexSet () const |
std::vector< BSP_MFace > & | FaceSet () const |
std::vector< BSP_MEdge > & | EdgeSet () const |
~BSP_CSGMesh () | |
void | FaceVertices (const BSP_FaceInd &f, std::vector< BSP_VertexInd > &output) |
void | FaceEdges (const BSP_FaceInd &f, std::vector< BSP_EdgeInd > &output) |
void | EdgeVertices (const BSP_EdgeInd &e, std::vector< BSP_VertexInd > &output) |
void | EdgeFaces (const BSP_EdgeInd &e, std::vector< BSP_FaceInd > &output) |
void | VertexEdges (const BSP_VertexInd &v, std::vector< BSP_EdgeInd > &output) |
void | VertexFaces (const BSP_VertexInd &v, std::vector< BSP_FaceInd > &output) |
BSP_EdgeInd | FindEdge (const BSP_VertexInd &v1, const BSP_VertexInd &v2) const |
bool | SC_Face (BSP_FaceInd f) |
MT_Plane3 | FacePlane (const BSP_FaceInd &fi) const |
void | ComputeFacePlanes () |
int | CountTriangles () const |
Static Public Member Functions | |
static BSP_CSGMesh * | New () |
Definition at line 45 of file BSP_CSGMesh.h.
BSP_CSGMesh::~BSP_CSGMesh | ( | ) |
Definition at line 349 of file BSP_CSGMesh.cpp.
References NULL.
void BSP_CSGMesh::AddPolygon | ( | const int * | verts, |
int | num_verts | ||
) |
Definition at line 137 of file BSP_CSGMesh.cpp.
References copy(), FacePlane(), BSP_MFace::m_plane, BSP_MFace::m_verts, MT_assert, and NULL.
void BSP_CSGMesh::AddPolygon | ( | const BSP_MFace & | face | ) |
Definition at line 164 of file BSP_CSGMesh.cpp.
bool BSP_CSGMesh::BuildEdges | ( | ) |
Definition at line 173 of file BSP_CSGMesh.cpp.
References DestroyEdges(), FaceSet(), BSP_MFace::m_verts, and NULL.
Referenced by BOP_exportMesh(), and Carve_exportMesh().
void BSP_CSGMesh::ComputeFacePlanes | ( | ) |
Recompute Face plane equations. essential if you have been messing with the object.
Definition at line 624 of file BSP_CSGMesh.cpp.
References FacePlane(), FaceSet(), and i.
int BSP_CSGMesh::CountTriangles | ( | ) | const |
Count the number of trinagles in the mesh. This is not the same as the number of polygons.
Definition at line 638 of file BSP_CSGMesh.cpp.
void BSP_CSGMesh::DestroyEdges | ( | ) |
Definition at line 219 of file BSP_CSGMesh.cpp.
References NULL, and VertexSet().
Referenced by BuildEdges().
void BSP_CSGMesh::EdgeFaces | ( | const BSP_EdgeInd & | e, |
std::vector< BSP_FaceInd > & | output | ||
) |
vector< BSP_MEdge > & BSP_CSGMesh::EdgeSet | ( | ) | const |
Definition at line 343 of file BSP_CSGMesh.cpp.
Referenced by LOD_ManMesh2::EdgeFaces(), LOD_ManMesh2::EdgeVertices(), LOD_ManMesh2::FaceEdges(), FindEdge(), SC_Face(), and LOD_ManMesh2::VertexFaces().
void BSP_CSGMesh::EdgeVertices | ( | const BSP_EdgeInd & | e, |
std::vector< BSP_VertexInd > & | output | ||
) |
void BSP_CSGMesh::FaceEdges | ( | const BSP_FaceInd & | f, |
std::vector< BSP_EdgeInd > & | output | ||
) |
Referenced by SC_Face().
MT_Plane3 BSP_CSGMesh::FacePlane | ( | const BSP_FaceInd & | fi | ) | const |
Return the face plane equation
Definition at line 590 of file BSP_CSGMesh.cpp.
References MT_Vector3::cross(), FaceSet(), i, length(), MT_Vector3::length(), BSP_MFace::m_verts, MT_fuzzyZero(), and VertexSet().
Referenced by AddPolygon(), ComputeFacePlanes(), and SC_Face().
vector< BSP_MFace > & BSP_CSGMesh::FaceSet | ( | ) | const |
Definition at line 336 of file BSP_CSGMesh.cpp.
Referenced by BOP_exportMesh(), BSP_CSGMesh_FaceIt_Construct(), BSP_CSGMesh_FaceIt_Done(), BSP_CSGMesh_FaceIt_Reset(), BSP_CSGMesh_FaceIt_Step(), BuildEdges(), Carve_exportMesh(), ComputeFacePlanes(), CountTriangles(), LOD_ManMesh2::FaceEdges(), FacePlane(), LOD_ManMesh2::FaceVertices(), Invert(), SC_Face(), and LOD_ManMesh2::VertexFaces().
void BSP_CSGMesh::FaceVertices | ( | const BSP_FaceInd & | f, |
std::vector< BSP_VertexInd > & | output | ||
) |
Referenced by SC_Face().
BSP_EdgeInd BSP_CSGMesh::FindEdge | ( | const BSP_VertexInd & | v1, |
const BSP_VertexInd & | v2 | ||
) | const |
Definition at line 243 of file BSP_CSGMesh.cpp.
References credits_svn_gen::e, EdgeSet(), CTR_TaggedIndex< 24, 0x00ffffff >::Empty(), BSP_MEdge::m_verts, and VertexSet().
void BSP_CSGMesh::Invert | ( | ) |
Definition at line 104 of file BSP_CSGMesh.cpp.
References FaceSet().
BSP_CSGMesh * BSP_CSGMesh::New | ( | ) | [static] |
Definition at line 60 of file BSP_CSGMesh.cpp.
Referenced by BOP_newEmptyMesh(), Carve_exportMesh(), and NewCopy().
BSP_CSGMesh * BSP_CSGMesh::NewCopy | ( | ) | const |
Definition at line 67 of file BSP_CSGMesh.cpp.
References addon::engine::free(), New(), and NULL.
bool BSP_CSGMesh::SC_Face | ( | BSP_FaceInd | f | ) |
Sanity checkers
Definition at line 513 of file BSP_CSGMesh.cpp.
References MT_Vector3::cross(), EdgeSet(), fabs(), FaceEdges(), FacePlane(), FaceSet(), FaceVertices(), i, length(), BSP_MFace::m_verts, MT_assert, MT_fuzzyZero(), MakeCursor::root, MT_Plane3::signedDistance(), and VertexSet().
bool BSP_CSGMesh::SetVertices | ( | std::vector< BSP_MVertex > * | verts | ) |
Referenced by BOP_newEmptyMesh(), and Carve_exportMesh().
void BSP_CSGMesh::VertexEdges | ( | const BSP_VertexInd & | v, |
std::vector< BSP_EdgeInd > & | output | ||
) |
Referenced by LOD_ManMesh2::FaceEdges().
void BSP_CSGMesh::VertexFaces | ( | const BSP_VertexInd & | v, |
std::vector< BSP_FaceInd > & | output | ||
) |
vector< BSP_MVertex > & BSP_CSGMesh::VertexSet | ( | ) | const |
Definition at line 329 of file BSP_CSGMesh.cpp.
Referenced by BOP_exportMesh(), BSP_CSGMesh_VertexIt_Done(), BSP_CSGMesh_VertexIt_Reset(), BSP_CSGMeshVertexIt_Construct(), Carve_exportMesh(), DestroyEdges(), FacePlane(), FindEdge(), SC_Face(), LOD_ManMesh2::VertexEdges(), and LOD_ManMesh2::VertexFaces().