Geom Software - C++ Programming and Geometry Libraries
Fade2D Documentation pages v1.63
File I/O

Functions

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, 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

◆ readPointsBIN()

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

Reads points from a binary file.

See also
writePointsBIN()

◆ 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
writeSegmentsBIN()

◆ 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.

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

◆ writePointsASCII() [2/2]

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

Write points to an ASCII file

See also
readPointsASCII()

◆ writePointsBIN() [1/2]

bool GEOM_FADE2D::writePointsBIN ( const char *  filename,
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 
)

Writes points to a binary file

See also
readPointsBIN()

◆ 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

See also
readSegmentsBIN()