Fade2.5D Documentation pages v2.03
Delaunay Features
GEOM_FADE25D::FadeExport Struct Reference

FadeExport is a simple struct to export triangulation data. More...

#include <FadeExport.h>

Public Member Functions

 FadeExport (const FadeExport &other)
 
void copy (const FadeExport &other)
 
void extractTriangleNeighborships (std::vector< std::pair< int, int > > &vNeigs) const
 Determine index-pairs of adjacent triangles.
 
void getCoordinates (int vtxIdx, double &x, double &y, double &z) const
 Get the coorinates for a certain vertex index. More...
 
void getCornerIndices (int triIdx, int &vtxIdx0, int &vtxIdx1, int &vtxIdx2) const
 Get the corner indices of a certain triangle. More...
 
int getCustomIndex (int vtxIdx) const
 Get the custom vertex index. More...
 
void getNormal (int triIdx, double &x, double &y, double &z) const
 Get the normal vector of a triangle.
 
void lexiSort ()
 Sort the points lexicographically. More...
 
FadeExportoperator= (const FadeExport &other)
 
bool operator== (const FadeExport &other) const
 
void print () const
 Print data for demonstration purposes.
 
void reset ()
 Reset the object. More...
 
bool writeObj (const char *filename) const
 Write an *.obj file (supported by virtually any 3D viewer)
 

Public Attributes

double * aCoords
 Cartesian coordinates (dim*numPoints)
 
int * aCustomIndices
 Custom indices of the points (only when exported)
 
int * aTriangles
 3 counterclockwise oriented vertex-indices per triangle (3*numTriangles)
 
int dim
 Dimension.
 
int numCustomIndices
 number of custom indices (same as numPoints when exported, otherwise 0)
 
int numPoints
 number of points
 
int numTriangles
 number of triangles
 

Detailed Description

This data structure is there to get data out of Fade easily and memory efficiently. The source code of this class is deliberately included in the header file so that users can take over the code to their individual project.

Have a look at the Examples.

Member Function Documentation

◆ getCoordinates()

void GEOM_FADE25D::FadeExport::getCoordinates ( int  vtxIdx,
double &  x,
double &  y,
double &  z 
) const
inline
Parameters
vtxIdx[in] vertex index
x,y,z[out] coordinates

◆ getCornerIndices()

void GEOM_FADE25D::FadeExport::getCornerIndices ( int  triIdx,
int &  vtxIdx0,
int &  vtxIdx1,
int &  vtxIdx2 
) const
inline
Parameters
triIdx[in] triangle index
vtxIdx0,vtxIdx1,vtxIdx2[out] corner indices

◆ getCustomIndex()

int GEOM_FADE25D::FadeExport::getCustomIndex ( int  vtxIdx) const
inline
Returns
the (optional) custom index of the vertex with the index vtxIdx or -1 if the vertex indices have not been exported.

◆ lexiSort()

void GEOM_FADE25D::FadeExport::lexiSort ( )

This method sorts the points lexicographically to provide better reproducibility.

◆ reset()

void GEOM_FADE25D::FadeExport::reset ( )
inline

This method deletes all contained data


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