VectorEntity  1.1.0
Medical Data Segmentation Toolkit
Classes | Public Types | Public Member Functions | Protected Member Functions
vctl::MCTriS Class Reference

Container of triangles (polygonal mesh). More...

#include <mctris.h>

Inheritance diagram for vctl::MCTriS:
Inheritance graph
[legend]

List of all members.

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.
MCEdgeSGetEdgeS ()
 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.
MCVerticeSGetVerticeS ()
 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().
MCTriNew (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.
MCTriTestExistence (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.

Detailed Description

Container of triangles (polygonal mesh).

Todo:
Udelat iteratory pro prochazeni kontejneru entit (vertices, edges, tris, tetras).

Constructor & Destructor Documentation

vctl::MCTriS::MCTriS ( ) [inline]

Default constructor.

vctl::MCTriS::~MCTriS ( ) [inline]

Destructor.


Member Function Documentation

void MCTriS::ClearAll ( ) [virtual]

Clears all tri currently stored in the container.

Reimplemented from vctl::MCEntitieS< MCTri >.

Deregistration of all triangles in the mesh from vertices.

template<class S >
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.

  • Deregistration of the triangle from its vertices.
  • Removes the triangle from the sorting queue.

Erases the container of edges.

Flip normals of all tris of the tris mesh.

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.

Returns the number of triangles sharing a given edge.

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.

Returns:
false on failure.

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().

Standard method getEntityName().

MCTri * MCTriS::New ( MCVertex _u0,
MCVertex _u1,
MCVertex _u2 
)

Creates a new triangle.

  • Checks existence of the triangle!
  • Returns pointer to the new triangle or a previously created one.
bool MCTriS::SaveSTL ( mds::mod::CChannel &  Channel)

Writes polygonal mesh to a given channel in the binary STL format.

Returns:
false on failure.
bool MCTriS::SaveVRML ( mds::mod::CChannel &  Channel)

Writes the triangular mesh to a given channel in VRML format.

Returns:
false on failure.
template<class S >
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.

  • Returns pointer to the found triangle, NULL otherwise.

Checks the triangular mesh is a closed manifold object.


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