1.5.1
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) const
 
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() [1/2]

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

◆ PolyElem() [2/2]

PolyElem::PolyElem ( const PolyElem r)

◆ ~PolyElem()

PolyElem::~PolyElem ( )
virtual

Member Function Documentation

◆ closePolyElem()

void PolyElem::closePolyElem ( )

Close the PolyElem if necessary

◆ create()

PolyElem * PolyElem::create ( )
static

◆ createFromNF()

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

◆ getExtension()

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

◆ getSurface()

double PolyElem::getSurface ( ) const

◆ getX() [1/2]

const VectorDouble& PolyElem::getX ( ) const
inline

◆ getX() [2/2]

double PolyElem::getX ( int  i) const
inline

◆ getY() [1/2]

const VectorDouble& PolyElem::getY ( ) const
inline

◆ getY() [2/2]

double PolyElem::getY ( int  i) const
inline

◆ getZmax()

double PolyElem::getZmax ( ) const
inline

◆ getZmin()

double PolyElem::getZmin ( ) const
inline

◆ init()

void PolyElem::init ( const VectorDouble x,
const VectorDouble y,
double  zmin = TEST,
double  zmax = TEST 
)

◆ inside()

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

◆ inside3D()

bool 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 & PolyElem::operator= ( const PolyElem r)

◆ reduceComplexity()

PolyElem PolyElem::reduceComplexity ( double  distmin) const

◆ toString()

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

Interface of AStringable.

Reimplemented from PolyLine2D.

Friends And Related Function Documentation

◆ Polygons

friend class Polygons
friend

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