Geom Software - C++ Programming and Geometry Libraries
WOF Documentation pages v1.16
GEOM_WOF::Mesh Class Reference

3D Mesh class More...

#include <Mesh.h>

Public Member Functions

 Mesh (RMesh *pRMesh)
 Constructor.
 
 ~Mesh ()
 Destructor.
 
 Mesh (const Mesh &)=delete
 
Meshoperator= (const Mesh &)=delete
 
size_t getNumT () const
 Get the number of triangles.
 
void getTriangles (std::vector< Point3 * > &vTriangleCorners) const
 Get Triangles. More...
 
void getPoints (std::vector< Point3 * > &vPoints) const
 Get Points. More...
 
void contrastSpread (double lowerSkipFrac=.01, double upperSkipFrac=.01)
 Get the Mesh as Vertices and Indices. More...
 
void colorizeFilledHoles ()
 Colorize filled holes. More...
 
void getVertexIndexData (std::vector< Point3 * > &vVertices, std::vector< int > &vCornerIndices) const
 
bool writePly_BIN (const std::string &name) const
 Write Ply (Binary) More...
 
bool writePly_ASCII (const std::string &name) const
 Write Ply (ASCII) More...
 
bool writeGeomview_ASCII (const std::string &name) const
 Write Geomview. More...
 
bool writeStl_ASCII (const std::string &name) const
 Write STL (ASCII) More...
 
void printStatistics (const std::string &name) const
 Print Statistics. More...
 
double getAverageEdgeLength () const
 Get the average edge length. More...
 

Detailed Description

The Mesh is a 3D triangle mesh.

Member Function Documentation

◆ colorizeFilledHoles()

void GEOM_WOF::Mesh::colorizeFilledHoles ( )

Vertices in filled holes are by default black. Approximate colors from the hole boundaries.

◆ contrastSpread()

void GEOM_WOF::Mesh::contrastSpread ( double  lowerSkipFrac = .01,
double  upperSkipFrac = .01 
)
Parameters
vVertices[out] The vertices of the Mesh
vCornerIndices[out] Three subsequent indices for each triangle. The indices refer to points in vVertices and thus the index range starts with 0.
Note
There are file formats (e.g., *.obj) where the first index must be 1, not 0! Simply increment the indices by 1 then.

Contrast spreading

RGB contrast spreading.

Parameters
lowerSkipFracis by default 0.01 which means the lower 1 % of all values is set to 0.
upperSkipFracis by default 0.01 which means the upper 1 % of all values is set to 255.

◆ getAverageEdgeLength()

double GEOM_WOF::Mesh::getAverageEdgeLength ( ) const

Computes and returns the average edge length

◆ getPoints()

void GEOM_WOF::Mesh::getPoints ( std::vector< Point3 * > &  vPoints) const
Parameters
[out]vPointsis used to return the vertex pointers

◆ getTriangles()

void GEOM_WOF::Mesh::getTriangles ( std::vector< Point3 * > &  vTriangleCorners) const
Parameters
[out]vTriangleCornersis used to return the triangles as 3 vertex pointers per triangle. The order of the corners per triangle is counterclockwise.

◆ printStatistics()

void GEOM_WOF::Mesh::printStatistics ( const std::string &  name) const

Prints mesh statistics to stdout

Parameters
nameserves as arbitrary identifier that is also printed to stdout

◆ writeGeomview_ASCII()

bool GEOM_WOF::Mesh::writeGeomview_ASCII ( const std::string &  name) const

Writes a file for the Geomview viewer

Parameters
name[in] is the output filename.

◆ writePly_ASCII()

bool GEOM_WOF::Mesh::writePly_ASCII ( const std::string &  name) const

Writes an ASCII PLY file

Parameters
name[in] is the output filename.

◆ writePly_BIN()

bool GEOM_WOF::Mesh::writePly_BIN ( const std::string &  name) const

Writes a binary PLY file

Parameters
name[in] is the output filename.

◆ writeStl_ASCII()

bool GEOM_WOF::Mesh::writeStl_ASCII ( const std::string &  name) const

Writes an ASCII STL file

Parameters
name[in] is the output filename.

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