1.1.0
CCC
 
PolyElem Class Reference

#include <PolyElem.hpp>

Inheritance diagram for PolyElem:
PolyLine2D AStringable ASerializable

Public Member Functions

 PolyElem (const VectorDouble &x=VectorDouble(), const VectorDouble &y=VectorDouble(), double zmin=TEST, double zmax=TEST)
 
 PolyElem (const PolyElem &r)
 
PolyElemoperator= (const PolyElem &r)
 
virtual ~PolyElem ()
 
virtual String toString (const AStringFormat *strfmt=nullptr) const override
 Interface of AStringable. More...
 
const VectorDoublegetX () const
 
const VectorDoublegetY () 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)
 
PolyLine2Doperator= (const PolyLine2D &m)
 
virtual ~PolyLine2D ()
 
int getNPoints () const
 
void init (const VectorDouble &x, const VectorDouble &y)
 
const VectorDoublegetX () const
 
const VectorDoublegetY () 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)
 
AStringableoperator= (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)
 
ASerializableoperator= (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 PolyElemcreate ()
 
static PolyElemcreateFromNF (const String &neutralFilename, bool verbose=true)
 
- Static Public Member Functions inherited from PolyLine2D
static PolyLine2DcreateFromNF (const String &neutralFilename, bool verbose=true)
 
static PolyLine2Dcreate (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 StringgetContainerName ()
 
static const StringgetPrefixName ()
 
static bool createDirectory (const String &dir)
 
static String getExecDirectory ()
 
static String getDirectory (const String &path)
 

Friends

class Polygons
 

Constructor & Destructor Documentation

PolyElem::PolyElem ( const VectorDouble x = VectorDouble(),
const VectorDouble y = VectorDouble(),
double  zmin = TEST,
double  zmax = TEST 
)
PolyElem::PolyElem ( const PolyElem r)
PolyElem::~PolyElem ( )
virtual

Member Function Documentation

void PolyElem::closePolyElem ( )

Close the PolyElem if necessary

PolyElem * PolyElem::create ( )
static
PolyElem * PolyElem::createFromNF ( const String neutralFilename,
bool  verbose = true 
)
static
void PolyElem::getExtension ( double *  xmin,
double *  xmax,
double *  ymin,
double *  ymax 
) const
double PolyElem::getSurface ( ) const
const VectorDouble& PolyElem::getX ( ) const
inline
double PolyElem::getX ( int  i) const
inline
const VectorDouble& PolyElem::getY ( ) const
inline
double PolyElem::getY ( int  i) const
inline
double PolyElem::getZmax ( ) const
inline
double PolyElem::getZmin ( ) const
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

Returns
True if the point belongs to the polygon; False otherwise
Parameters
[in]coorVector 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

Returns
True if the point belongs to the polygon; False otherwise
Parameters
[in]zzarray of point coordinates of the point along Z or TEST
PolyElem & PolyElem::operator= ( const PolyElem r)
PolyElem PolyElem::reduceComplexity ( double  distmin) const
String PolyElem::toString ( const AStringFormat strfmt = nullptr) const
overridevirtual

Interface of AStringable.

Reimplemented from PolyLine2D.

Friends And Related Function Documentation

friend class Polygons
friend

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