1.8.0
CCC
 
Loading...
Searching...
No Matches
gstlrn::PolyElem Class Reference

#include <PolyElem.hpp>

Inheritance diagram for gstlrn::PolyElem:
gstlrn::PolyLine2D gstlrn::AStringable gstlrn::ASerializable

Public Member Functions

 PolyElem (const 1 &x=1(), const 1 &y=1(), double zmin=TEST, double zmax=TEST)
 
 PolyElem (const PolyElem &r)
 
PolyElemoperator= (const PolyElem &r)
 
virtual ~PolyElem ()
 
String toString (const AStringFormat *strfmt=nullptr) const override
 
const & getX () const
 
const & getY () const
 
double getX (Id i) const
 
double getY (Id i) const
 
double getZmax () const
 
double getZmin () const
 
void init (const 1 &x, const 1 &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 1 &coor)
 
bool inside3D (double zz) const
 
PolyElem reduceComplexity (double distmin) const
 
- Public Member Functions inherited from gstlrn::PolyLine2D
 PolyLine2D (const 1 &x=1(), const 1 &y=1())
 
 PolyLine2D (const PolyLine2D &m)
 
PolyLine2Doperator= (const PolyLine2D &m)
 
virtual ~PolyLine2D ()
 
String toString (const AStringFormat *strfmt=nullptr) const override
 Interface of AStringable.
 
Id getNPoints () const
 
void init (const 1 &x, const 1 &y)
 
const & getX () const
 
const & getY () const
 
double getX (Id i) const
 
double getY (Id i) const
 
 getPoint (Id i) const
 
double getXmin () const
 
double getYmin () const
 
double getXmax () const
 
double getYmax () const
 
void addPoint (double x, double y)
 
void setX (const 1 &x)
 
void setY (const 1 &y)
 
PolyPoint2D getPLIndex (const 1 &xy0) const
 
double distanceBetweenPoints (double ap, double al, const 1 &xy1, const 1 &xy2) const
 
double distanceAlongPolyline (const PolyPoint2D &pldist1, const PolyPoint2D &pldist2) const
 
double angleAtPolyline (const PolyPoint2D &pldist, Id nb_neigh=0) const
 
double distanceAtPolyline (const PolyPoint2D &pldist, const 1 &target, Id nb_neigh) const
 
- Public Member Functions inherited from gstlrn::AStringable
 AStringable ()
 
 AStringable (const AStringable &r)
 
AStringableoperator= (const AStringable &r)
 
virtual ~AStringable ()
 
virtual void display (const AStringFormat *strfmt=nullptr) const final
 
virtual void display (Id level) const final
 
- Public Member Functions inherited from gstlrn::ASerializable
 ASerializable ()
 
 ASerializable (const ASerializable &r)
 
ASerializableoperator= (const ASerializable &r)
 
 ASerializable (ASerializable &&r) noexcept
 
ASerializableoperator= (ASerializable &&r) noexcept
 
virtual ~ASerializable ()
 
bool dumpToNF (const String &NFFilename, const EFormatNF &format=EFormatNF::fromKey("DEFAULT"), bool verbose=false) const
 Dump the contents of an object into an Output File using a given Output NF Format.
 
void setDefaultFormatNF (const EFormatNF &format)
 

Static Public Member Functions

static PolyElemcreate ()
 
static PolyElemcreateFromNF (const String &NFFilename, bool verbose=true)
 
- Static Public Member Functions inherited from gstlrn::PolyLine2D
static PolyLine2DcreateFromNF (const String &NFFilename, bool verbose=true)
 
static PolyLine2Dcreate (const 1 &x=1(), const 1 &y=1())
 
- Static Public Member Functions inherited from gstlrn::ASerializable
static String buildFileName (Id status, const String &filename, bool ensureDirExist=false)
 
static String getFileIdentity (const String &filename, bool verbose=false)
 
static void setPrefixName (const String &prefixName)
 
static void unsetPrefixName ()
 
static const StringgetPrefixName ()
 

Friends

class Polygons
 

Constructor & Destructor Documentation

◆ PolyElem() [1/2]

gstlrn::PolyElem::PolyElem ( const 1 &  x = 1(),
const 1 &  y = 1(),
double  zmin = TEST,
double  zmax = TEST 
)

◆ PolyElem() [2/2]

gstlrn::PolyElem::PolyElem ( const PolyElem r)

◆ ~PolyElem()

gstlrn::PolyElem::~PolyElem ( )
virtual

Member Function Documentation

◆ closePolyElem()

void gstlrn::PolyElem::closePolyElem ( )

Close the PolyElem if necessary

◆ create()

PolyElem * gstlrn::PolyElem::create ( )
static

◆ createFromNF()

PolyElem * gstlrn::PolyElem::createFromNF ( const String NFFilename,
bool  verbose = true 
)
static

◆ getExtension()

void gstlrn::PolyElem::getExtension ( double *  xmin,
double *  xmax,
double *  ymin,
double *  ymax 
) const

◆ getSurface()

double gstlrn::PolyElem::getSurface ( ) const

◆ getX() [1/2]

const & gstlrn::PolyElem::getX ( ) const
inline

◆ getX() [2/2]

double gstlrn::PolyElem::getX ( Id  i) const
inline

◆ getY() [1/2]

const & gstlrn::PolyElem::getY ( ) const
inline

◆ getY() [2/2]

double gstlrn::PolyElem::getY ( Id  i) const
inline

◆ getZmax()

double gstlrn::PolyElem::getZmax ( ) const
inline

◆ getZmin()

double gstlrn::PolyElem::getZmin ( ) const
inline

◆ init()

void gstlrn::PolyElem::init ( const 1 &  x,
const 1 &  y,
double  zmin = TEST,
double  zmax = TEST 
)

◆ inside()

bool gstlrn::PolyElem::inside ( const 1 &  coor)

Check if one point belongs to a 2-D polyelem

Returns
True if the point belongs to the polygon; False otherwise
Parameters
[in]coorVector giving the coordinates of the target point

◆ inside3D()

bool gstlrn::PolyElem::inside3D ( double  zz) const

Check if one point belongs to a vertical interval of a (limited) polyelem

Returns
True if the point belongs to the polygon; False otherwise
Parameters
[in]zzarray of point coordinates of the point along Z or TEST

◆ operator=()

PolyElem & gstlrn::PolyElem::operator= ( const PolyElem r)

◆ reduceComplexity()

PolyElem gstlrn::PolyElem::reduceComplexity ( double  distmin) const

◆ toString()

String gstlrn::PolyElem::toString ( const AStringFormat strfmt = nullptr) const
overridevirtual

Reimplemented from gstlrn::AStringable.

Friends And Related Symbol Documentation

◆ Polygons

friend class Polygons
friend

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