gstlearn
1.0.0
CCC
|
#include <PolyElem.hpp>
Public Member Functions | |
PolyElem (const VectorDouble &x=VectorDouble(), const VectorDouble &y=VectorDouble(), double zmin=TEST, double zmax=TEST) | |
PolyElem (const PolyElem &r) | |
PolyElem & | operator= (const PolyElem &r) |
virtual | ~PolyElem () |
virtual String | toString (const AStringFormat *strfmt=nullptr) const override |
Interface of AStringable. More... | |
const VectorDouble & | getX () const |
const VectorDouble & | getY () const |
double | getX (int i) const |
double | getY (int i) const |
double | getZmax () const |
double | getZmin () const |
void | init (const VectorDouble &x, const VectorDouble &y, double zmin=TEST, double zmax=TEST) |
void | getExtension (double *xmin, double *xmax, double *ymin, double *ymax) const |
double | getSurface () const |
void | closePolyElem () |
bool | inside (const VectorDouble &coor) |
bool | inside3D (double zz) |
PolyElem | reduceComplexity (double distmin) const |
Public Member Functions inherited from PolyLine2D | |
PolyLine2D (const VectorDouble &x=VectorDouble(), const VectorDouble &y=VectorDouble()) | |
PolyLine2D (const PolyLine2D &m) | |
PolyLine2D & | operator= (const PolyLine2D &m) |
virtual | ~PolyLine2D () |
int | getNPoints () const |
void | init (const VectorDouble &x, const VectorDouble &y) |
const VectorDouble & | getX () const |
const VectorDouble & | getY () const |
double | getX (int i) const |
double | getY (int i) const |
VectorDouble | getPoint (int i) const |
double | getXmin () const |
double | getYmin () const |
double | getXmax () const |
double | getYmax () const |
void | addPoint (double x, double y) |
void | setX (const VectorDouble &x) |
void | setY (const VectorDouble &y) |
PolyPoint2D | getPLIndex (const VectorDouble &xy0) const |
double | distanceBetweenPoints (double ap, double al, const VectorDouble &xy1, const VectorDouble &xy2) const |
double | distanceAlongPolyline (const PolyPoint2D &pldist1, const PolyPoint2D &pldist2) const |
double | angleAtPolyline (const PolyPoint2D &pldist, int nb_neigh=0) const |
double | distanceAtPolyline (const PolyPoint2D &pldist, const VectorDouble &target, int nb_neigh) const |
Public Member Functions inherited from AStringable | |
AStringable () | |
AStringable (const AStringable &r) | |
AStringable & | operator= (const AStringable &r) |
virtual | ~AStringable () |
virtual void | display (const AStringFormat *strfmt=nullptr) const final |
virtual void | display (int level) const final |
Public Member Functions inherited from ASerializable | |
ASerializable () | |
ASerializable (const ASerializable &r) | |
ASerializable & | operator= (const ASerializable &r) |
virtual | ~ASerializable () |
bool | deserialize (std::istream &is, bool verbose=true) |
bool | serialize (std::ostream &os, bool verbose=true) const |
bool | dumpToNF (const String &neutralFilename, bool verbose=false) const |
Static Public Member Functions | |
static PolyElem * | create () |
static PolyElem * | createFromNF (const String &neutralFilename, bool verbose=true) |
Static Public Member Functions inherited from PolyLine2D | |
static PolyLine2D * | createFromNF (const String &neutralFilename, bool verbose=true) |
static PolyLine2D * | create (const VectorDouble &x=VectorDouble(), const VectorDouble &y=VectorDouble()) |
Static Public Member Functions inherited from ASerializable | |
static String | buildFileName (int status, const String &filename, bool ensureDirExist=false) |
static String | getHomeDirectory (const String &sub="") |
static String | getWorkingDirectory () |
static String | getTestData (const String &subdir, const String &filename) |
static String | getFileIdentity (const String &filename, bool verbose=false) |
static void | setContainerName (bool useDefault, const String &containerName="", bool verbose=false) |
static void | unsetContainerName () |
static void | setPrefixName (const String &prefixName) |
static void | unsetPrefixName () |
static const String & | getContainerName () |
static const String & | getPrefixName () |
static bool | createDirectory (const String &dir) |
static String | getExecDirectory () |
static String | getDirectory (const String &path) |
Protected Member Functions | |
virtual bool | _deserialize (std::istream &is, bool verbose=false) override |
Interface for ASerializable. More... | |
virtual bool | _serialize (std::ostream &os, bool verbose=false) const override |
String | _getNFName () const override |
Protected Member Functions inherited from ASerializable | |
bool | _fileOpenWrite (const String &filename, std::ofstream &os, bool verbose=false) const |
bool | _fileOpenRead (const String &filename, std::ifstream &is, bool verbose=false) const |
Private Member Functions | |
bool | _isClosed () const |
Private Attributes | |
double | _zmin |
double | _zmax |
Friends | |
class | Polygons |
Additional Inherited Members | |
Static Protected Member Functions inherited from ASerializable | |
static bool | _commentWrite (std::ostream &os, const String &comment) |
template<typename T > | |
static bool | _recordWrite (std::ostream &os, const String &title, const T &val) |
template<typename T > | |
static bool | _recordWriteVec (std::ostream &os, const String &title, const VectorT< T > &vec) |
template<typename T > | |
static bool | _recordRead (std::istream &is, const String &title, T &val) |
template<typename T > | |
static bool | _recordReadVec (std::istream &is, const String &title, VectorT< T > &vec, int nvalues) |
static bool | _onlyBlanks (char *string) |
static bool | _tableRead (std::istream &is, const String &string, int ntab, double *tab) |
static bool | _tableWrite (std::ostream &os, const String &string, int ntab, const VectorDouble &tab) |
PolyElem::PolyElem | ( | const VectorDouble & | x = VectorDouble() , |
const VectorDouble & | y = VectorDouble() , |
||
double | zmin = TEST , |
||
double | zmax = TEST |
||
) |
PolyElem::PolyElem | ( | const PolyElem & | r | ) |
|
virtual |
|
overrideprotectedvirtual |
Interface for ASerializable.
Reimplemented from PolyLine2D.
|
inlineoverrideprotectedvirtual |
Reimplemented from PolyLine2D.
|
private |
|
overrideprotectedvirtual |
Serialization (by Point rather than by Coordinate) This is maintained for all classes using this interface for serialization
os | Output Stream |
verbose | Verbose flag |
Reimplemented from PolyLine2D.
void PolyElem::closePolyElem | ( | ) |
Close the PolyElem if necessary
|
static |
void PolyElem::getExtension | ( | double * | xmin, |
double * | xmax, | ||
double * | ymin, | ||
double * | ymax | ||
) | const |
double PolyElem::getSurface | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void PolyElem::init | ( | const VectorDouble & | x, |
const VectorDouble & | y, | ||
double | zmin = TEST , |
||
double | zmax = TEST |
||
) |
bool PolyElem::inside | ( | const VectorDouble & | coor | ) |
Check if one point belongs to a 2-D polyelem
[in] | coor | Vector giving the coordinates of the target point |
bool PolyElem::inside3D | ( | double | zz | ) |
Check if one point belongs to a vertical interval of a (limited) polyelem
[in] | zz | array of point coordinates of the point along Z or TEST |
PolyElem PolyElem::reduceComplexity | ( | double | distmin | ) | const |
|
overridevirtual |
Interface of AStringable.
Reimplemented from PolyLine2D.
|
friend |
|
private |
|
private |