Geom Software - C++ Programming and Geometry Libraries
Fade2D Documentation pages v1.55
Free Functions

Functions

void GEOM_FADE2D::getDirectedEdges (std::vector< Triangle2 *> &vT, std::vector< Edge2 > &vDirectedEdgesOut)
 Get directed edge The directed edges of vT are returned vDirectedEdgesOut. Directed means that each edge (a,b) with two adjacent triangles in vT is returned twice, as edge(a,b) and edge(b,a).
 
void GEOM_FADE2D::getUndirectedEdges (std::vector< Triangle2 *> &vT, std::vector< Edge2 > &vUndirectedEdgesOut)
 Get undirected edges. More...
 
std::string GEOM_FADE2D::getFade2DVersion ()
 Get the Fade2D version string.
 
int GEOM_FADE2D::getMajorVersionNumber ()
 Get the major version number.
 
int GEOM_FADE2D::getMinorVersionNumber ()
 Get the minor version number.
 
int GEOM_FADE2D::getRevisionNumber ()
 Get the revision version number.
 
bool GEOM_FADE2D::isRelease ()
 Check if a RELEASE or a DEBUG version is used.
 
void GEOM_FADE2D::getBorders (const std::vector< Triangle2 *> &vT, std::vector< Segment2 > &vBorderSegmentsOut)
 Get Borders. More...
 
bool GEOM_FADE2D::sortRing (std::vector< Segment2 > &vRing)
 Sort a vector of Segments. More...
 
Orientation2 GEOM_FADE2D::getOrientation2 (const Point2 *p0, const Point2 *p1, const Point2 *p2)
 Get the orientation of three points. More...
 
Orientation2 GEOM_FADE2D::getOrientation2_mt (const Point2 *p0, const Point2 *p1, const Point2 *p2)
 Get Orientation2 (MT) More...
 
bool GEOM_FADE2D::writePointsASCII (const char *filename, const std::vector< Point2 *> &vPointsIn)
 Write points to an ASCII file. More...
 
bool GEOM_FADE2D::writePointsASCII (const char *filename, const std::vector< Point2 > &vPointsIn)
 Write points to an ASCII file. More...
 
bool GEOM_FADE2D::readXY (const char *filename, std::vector< Point2 > &vPointsOut)
 Read (x y) points. More...
 
bool GEOM_FADE2D::writePointsBIN (const char *filename, const std::vector< Point2 > &vPointsIn)
 Write points to a binary file. More...
 
bool GEOM_FADE2D::writePointsBIN (const char *filename, std::vector< Point2 *> &vPointsIn)
 Write points to a binary file. More...
 
bool GEOM_FADE2D::readPointsBIN (const char *filename, std::vector< Point2 > &vPointsIn)
 Read points from a binary file. More...
 
bool GEOM_FADE2D::writeSegmentsBIN (const char *filename, std::vector< Segment2 > &vSegmentsIn)
 Write segments to a binary file. More...
 
bool GEOM_FADE2D::readSegmentsBIN (const char *filename, std::vector< Segment2 > &vSegmentsOut)
 Read segments from a binary file. More...
 

Detailed Description

Function Documentation

◆ getBorders()

void GEOM_FADE2D::getBorders ( const std::vector< Triangle2 *> &  vT,
std::vector< Segment2 > &  vBorderSegmentsOut 
)

Computes the border of the triangles in vT. The border consists of all edges having only one adjacent triangle in vT.

Parameters
[in]vTare the input triangles
[out]vBorderSegmentsOutis used to return all border segments

◆ getOrientation2()

Orientation2 GEOM_FADE2D::getOrientation2 ( const Point2 p0,
const Point2 p1,
const Point2 p2 
)

This function returns the exact orientation of the points p0, p1, p2 Possible values are
ORIENTATION2_COLLINEAR if p0, p1, p2 are located on a line,
ORIENTATION2_CCW if p0, p1, p2 are counterclockwise oriented
ORIENTATION2_CW if p0, p1, p2 are clockwise oriented
Not thread-safe but a bit faster than the thread-safe version

◆ getOrientation2_mt()

Orientation2 GEOM_FADE2D::getOrientation2_mt ( const Point2 p0,
const Point2 p1,
const Point2 p2 
)
See also
Orientation2 getOrientation2(const Point2* p0,const Point2* p1,const Point2* p2);

This version is thread-safe.

◆ getUndirectedEdges()

void GEOM_FADE2D::getUndirectedEdges ( std::vector< Triangle2 *> &  vT,
std::vector< Edge2 > &  vUndirectedEdgesOut 
)

A unique set of edges of vT is returned.

◆ readPointsBIN()

bool GEOM_FADE2D::readPointsBIN ( const char *  filename,
std::vector< Point2 > &  vPointsIn 
)

Reads points from a binary file of type 20 or 30

See also
bool writePointsBIN(const char* filename,const std::vector<Point2>& vPointsIn)

◆ readSegmentsBIN()

bool GEOM_FADE2D::readSegmentsBIN ( const char *  filename,
std::vector< Segment2 > &  vSegmentsOut 
)

Reads segments from a binary file of type 21 or 31

See also
bool writeSegmentsBIN(const char* filename,std::vector<Segment2>& vSegmentsIn);

◆ readXY()

bool GEOM_FADE2D::readXY ( const char *  filename,
std::vector< Point2 > &  vPointsOut 
)

Reads points from an ASCII file. Expected file format: Two coordinates (x y) per line, whitespace separated.

◆ sortRing()

bool GEOM_FADE2D::sortRing ( std::vector< Segment2 > &  vRing)

The segments in vRing are reoriented and sorted such that subsequent segments join at the endpoints.

◆ writePointsASCII() [1/2]

bool GEOM_FADE2D::writePointsASCII ( const char *  filename,
const std::vector< Point2 *> &  vPointsIn 
)

Writes points to an ASCII file, two coordinates (x y) per line, whitespace separated.

Note
Data exchange through ASCII files is easy and convenient but floating point coordinates are not necessarily exact when represented as decimal numbers. If the tiny rounding errors can't be accepted in your setting you are advised to write binary files, (use writePointsBIN(const char* filename,const std::vector<Point2>& vPointsIn))

◆ writePointsASCII() [2/2]

bool GEOM_FADE2D::writePointsASCII ( const char *  filename,
const std::vector< Point2 > &  vPointsIn 
)
See also
bool writePointsASCII(const char* filename,const std::vector<Point2*>& vPointsIn);

◆ writePointsBIN() [1/2]

bool GEOM_FADE2D::writePointsBIN ( const char *  filename,
const std::vector< Point2 > &  vPointsIn 
)

File format:
int filetype (20)
size_t numPoints (vPointsIn.size())
double x0
double y0
double z0
...
double xn
double yn
double zn

◆ writePointsBIN() [2/2]

bool GEOM_FADE2D::writePointsBIN ( const char *  filename,
std::vector< Point2 *> &  vPointsIn 
)
See also
writePointsBIN(const char* filename,const std::vector<Point2>& vPointsIn);

◆ writeSegmentsBIN()

bool GEOM_FADE2D::writeSegmentsBIN ( const char *  filename,
std::vector< Segment2 > &  vSegmentsIn 
)

Binary file format:
int filetype (21)
size_t numSegments (vSegmentsIn.size())
double x0_source
double y0_source
double x0_target
double y0_target
...
double xn_source
double yn_source
double xn_target
double yn_target