VectorEntity
1.1.0
Medical Data Segmentation Toolkit
|
Container of triangles (polygonal mesh). More...
#include <mctris.h>
Classes | |
struct | STLToken |
Public Types | |
enum | STLState { STATE_INIT, STATE_SOLID, STATE_INSOLID, STATE_FACET, STATE_NORMAL, STATE_INFACET, STATE_OUTER, STATE_INLOOP, STATE_VERTEX, STATE_ENDSOLID, STATE_FINISH } |
enum | STLTokenType { TOKEN_UNKNOWN, TOKEN_ERROR, TOKEN_IDENTIFIER, TOKEN_NUMBER, TOKEN_SOLID, TOKEN_ENDSOLID, TOKEN_FACET, TOKEN_ENDFACET, TOKEN_LOOP, TOKEN_ENDLOOP, TOKEN_OUTER, TOKEN_VERTEX, TOKEN_NORMAL } |
Public Member Functions | |
virtual void | ClearAll () |
Clears all tri currently stored in the container. | |
void | DeRegistrationAll () |
Deregistration of all triangles in the mesh from vertices. | |
template<class S > | |
void | deserialize (mds::mod::CChannelSerializer< S > &Reader) |
Deserializes the triangular mesh. | |
void | Erase (MCTri *del_ent) |
Removes triangle from the mesh. | |
void | EraseEdgesNoTris () |
Erases the container of edges. | |
void | FlipTrisNormal () |
Flip normals of all tris of the tris mesh. | |
MCEdgeS * | GetEdgeS () |
Returns pointer to the container of edges. | |
void | GetTriEdge (MCVertex *_u0, MCVertex *_u1, std::vector< MCTri * > &tri_pole) |
Returns all triangles sharing a given edge. | |
int | GetTriEdgeNumber (MCVertex *_u0, MCVertex *_u1) |
Returns the number of triangles sharing a given edge. | |
MCVerticeS * | GetVerticeS () |
Returns pointer to the container of vertices. | |
bool | LoadSTL (mds::mod::CChannel &Channel) |
Reads polygonal mesh in the binary STL format from a given channel. | |
void | MakeAllTrisEdges () |
Prepares the container of edges. | |
void | MakeTriEdges (MCTri *_tri) |
Adds all edges of a given triangle to the container of edges. | |
MCTriS () | |
Default constructor. | |
MDS_ENTITY_COMPRESSION (mds::mod::CC_RAW) | |
Standard method getEntityCompression(). | |
MDS_ENTITY_NAME ("MCTriS") | |
Standard method getEntityName(). | |
MCTri * | New (MCVertex *_u0, MCVertex *_u1, MCVertex *_u2) |
Creates a new triangle. | |
bool | SaveSTL (mds::mod::CChannel &Channel) |
Writes polygonal mesh to a given channel in the binary STL format. | |
bool | SaveVRML (mds::mod::CChannel &Channel) |
Writes the triangular mesh to a given channel in VRML format. | |
template<class S > | |
void | serialize (mds::mod::CChannelSerializer< S > &Writer) |
Serializes the triangular mesh. | |
bool | TestEdgeExistence (MCVertex *_u0, MCVertex *_u1) |
Checks if a specified edge exists in the mesh. | |
MCTri * | TestExistence (MCVertex *_u0, MCVertex *_u1, MCVertex *_u2) |
Checks if a specified triangle exists in the mesh. | |
bool | TestManifold () |
Checks the triangular mesh is a closed manifold object. | |
~MCTriS () | |
Destructor. | |
Protected Member Functions | |
STLToken | getSTLToken (const char *buffer, mds::tSize &bufferStart, mds::tSize buffer_end) const |
Read STL token form ASCII STL format from buffer buffer starting at position bufferStart and finishing at position bufferEnd . | |
bool | isFloat (const char *buffer, const mds::tSize wordStart, const mds::tSize wordEnd) const |
Checks if word in string buffer buffer starting at position wordStart and ending at position wordEnd is a floating point number. |
Container of triangles (polygonal mesh).
vctl::MCTriS::MCTriS | ( | ) | [inline] |
Default constructor.
vctl::MCTriS::~MCTriS | ( | ) | [inline] |
Destructor.
void MCTriS::ClearAll | ( | ) | [virtual] |
Clears all tri currently stored in the container.
Reimplemented from vctl::MCEntitieS< MCTri >.
void MCTriS::DeRegistrationAll | ( | ) |
Deregistration of all triangles in the mesh from vertices.
void vctl::MCTriS::deserialize | ( | mds::mod::CChannelSerializer< S > & | Reader | ) | [inline] |
Deserializes the triangular mesh.
void MCTriS::Erase | ( | MCTri * | del_ent | ) |
Removes triangle from the mesh.
void MCTriS::EraseEdgesNoTris | ( | ) |
Erases the container of edges.
void MCTriS::FlipTrisNormal | ( | ) |
Flip normals of all tris of the tris mesh.
MCEdgeS* vctl::MCTriS::GetEdgeS | ( | ) | [inline] |
Returns pointer to the container of edges.
MCTriS::STLToken MCTriS::getSTLToken | ( | const char * | buffer, |
mds::tSize & | bufferStart, | ||
mds::tSize | buffer_end | ||
) | const [protected] |
Read STL token form ASCII STL format from buffer buffer
starting at position bufferStart
and finishing at position bufferEnd
.
bufferStart
is then updated to point behind last character of the token.
void MCTriS::GetTriEdge | ( | MCVertex * | _u0, |
MCVertex * | _u1, | ||
std::vector< MCTri * > & | tri_pole | ||
) |
Returns all triangles sharing a given edge.
int MCTriS::GetTriEdgeNumber | ( | MCVertex * | _u0, |
MCVertex * | _u1 | ||
) |
Returns the number of triangles sharing a given edge.
MCVerticeS* vctl::MCTriS::GetVerticeS | ( | ) | [inline] |
Returns pointer to the container of vertices.
bool MCTriS::isFloat | ( | const char * | buffer, |
const mds::tSize | wordStart, | ||
const mds::tSize | wordEnd | ||
) | const [protected] |
Checks if word in string buffer buffer
starting at position wordStart
and ending at position wordEnd
is a floating point number.
bool MCTriS::LoadSTL | ( | mds::mod::CChannel & | Channel | ) |
Reads polygonal mesh in the binary STL format from a given channel.
void MCTriS::MakeAllTrisEdges | ( | ) |
Prepares the container of edges.
void MCTriS::MakeTriEdges | ( | MCTri * | _tri | ) |
Adds all edges of a given triangle to the container of edges.
vctl::MCTriS::MDS_ENTITY_COMPRESSION | ( | mds::mod::CC_RAW | ) |
Standard method getEntityCompression().
vctl::MCTriS::MDS_ENTITY_NAME | ( | "MCTriS" | ) |
Standard method getEntityName().
MCTri * MCTriS::New | ( | MCVertex * | _u0, |
MCVertex * | _u1, | ||
MCVertex * | _u2 | ||
) |
Creates a new triangle.
bool MCTriS::SaveSTL | ( | mds::mod::CChannel & | Channel | ) |
Writes polygonal mesh to a given channel in the binary STL format.
bool MCTriS::SaveVRML | ( | mds::mod::CChannel & | Channel | ) |
Writes the triangular mesh to a given channel in VRML format.
void vctl::MCTriS::serialize | ( | mds::mod::CChannelSerializer< S > & | Writer | ) | [inline] |
Serializes the triangular mesh.
bool MCTriS::TestEdgeExistence | ( | MCVertex * | _u0, |
MCVertex * | _u1 | ||
) |
Checks if a specified edge exists in the mesh.
MCTri * MCTriS::TestExistence | ( | MCVertex * | _u0, |
MCVertex * | _u1, | ||
MCVertex * | _u2 | ||
) |
Checks if a specified triangle exists in the mesh.
bool MCTriS::TestManifold | ( | ) |
Checks the triangular mesh is a closed manifold object.