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

#include <PolyLine2D.hpp>

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

Public Member Functions

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

Constructor & Destructor Documentation

◆ PolyLine2D() [1/2]

gstlrn::PolyLine2D::PolyLine2D ( const 1 &  x = 1(),
const 1 &  y = 1() 
)

◆ PolyLine2D() [2/2]

gstlrn::PolyLine2D::PolyLine2D ( const PolyLine2D m)

◆ ~PolyLine2D()

gstlrn::PolyLine2D::~PolyLine2D ( )
virtual

Member Function Documentation

◆ addPoint()

void gstlrn::PolyLine2D::addPoint ( double  x,
double  y 
)

◆ angleAtPolyline()

double gstlrn::PolyLine2D::angleAtPolyline ( const PolyPoint2D pldist,
Id  nb_neigh = 0 
) const

◆ create()

PolyLine2D * gstlrn::PolyLine2D::create ( const 1 &  x = 1(),
const 1 &  y = 1() 
)
static

◆ createFromNF()

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

◆ distanceAlongPolyline()

double gstlrn::PolyLine2D::distanceAlongPolyline ( const PolyPoint2D pldist1,
const PolyPoint2D pldist2 
) const

Find the shortest distance between two points (x1,y1) and (x2,y2) which belong to the current polyline

Returns
Minimum distance
Parameters
[in]pldist1First PolyPoint2D structure
[in]pldist2Second PolyPoint2D structure

◆ distanceAtPolyline()

double gstlrn::PolyLine2D::distanceAtPolyline ( const PolyPoint2D pldist,
const 1 &  target,
Id  nb_neigh 
) const

◆ distanceBetweenPoints()

double gstlrn::PolyLine2D::distanceBetweenPoints ( double  ap,
double  al,
const 1 &  xy1,
const 1 &  xy2 
) const

Find the shortest distance between two points (x1,y1) and (x2,y2) passing through a polyline

Returns
Minimum distance
Parameters
[in]apCoefficient applied to the projected distances
[in]alCoefficient applied to the distance along line
[in]xy1Coordinates of the first point
[in]xy2Coordinates of the second point

◆ getNPoints()

Id gstlrn::PolyLine2D::getNPoints ( ) const
inline

◆ getPLIndex()

PolyPoint2D gstlrn::PolyLine2D::getPLIndex ( const 1 &  xy0) const

Returns the point of the PolyLine located at shortest distance from Target

Returns
PolyPoint2D structure
Parameters
[in]xy0Coordinates of the target point

◆ getPoint()

gstlrn::PolyLine2D::getPoint ( Id  i) const

◆ getX() [1/2]

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

◆ getX() [2/2]

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

◆ getXmax()

double gstlrn::PolyLine2D::getXmax ( ) const
inline

◆ getXmin()

double gstlrn::PolyLine2D::getXmin ( ) const
inline

◆ getY() [1/2]

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

◆ getY() [2/2]

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

◆ getYmax()

double gstlrn::PolyLine2D::getYmax ( ) const
inline

◆ getYmin()

double gstlrn::PolyLine2D::getYmin ( ) const
inline

◆ init()

void gstlrn::PolyLine2D::init ( const 1 &  x,
const 1 &  y 
)

◆ operator=()

PolyLine2D & gstlrn::PolyLine2D::operator= ( const PolyLine2D m)

◆ setX()

void gstlrn::PolyLine2D::setX ( const 1 &  x)
inline

◆ setY()

void gstlrn::PolyLine2D::setY ( const 1 &  y)
inline

◆ toString()

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

Interface of AStringable.

Reimplemented from gstlrn::AStringable.

Friends And Related Symbol Documentation

◆ Faults

friend class Faults
friend

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