#include <PolyLine2D.hpp>
|
| PolyLine2D (const VectorDouble &x=VectorDouble(), const VectorDouble &y=VectorDouble()) |
|
| PolyLine2D (const PolyLine2D &m) |
|
PolyLine2D & | operator= (const PolyLine2D &m) |
|
virtual | ~PolyLine2D () |
|
virtual String | toString (const AStringFormat *strfmt=nullptr) const override |
| Interface of AStringable. More...
|
|
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 |
|
| 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 |
|
| 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 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) |
|
◆ PolyLine2D() [1/2]
◆ PolyLine2D() [2/2]
◆ ~PolyLine2D()
PolyLine2D::~PolyLine2D |
( |
| ) |
|
|
virtual |
◆ _deserialize()
bool PolyLine2D::_deserialize |
( |
std::istream & |
is, |
|
|
bool |
verbose = false |
|
) |
| |
|
overrideprotectedvirtual |
◆ _getInterval()
void PolyLine2D::_getInterval |
( |
const PolyPoint2D & |
pldist, |
|
|
int |
nb_neigh, |
|
|
int * |
rfrom, |
|
|
int * |
rt0 |
|
) |
| const |
|
private |
◆ _getNFName()
String PolyLine2D::_getNFName |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
◆ _serialize()
bool PolyLine2D::_serialize |
( |
std::ostream & |
os, |
|
|
bool |
verbose = false |
|
) |
| const |
|
overrideprotectedvirtual |
Serialization (by Point rather than by Coordinate) This is maintained for all classes using this interface for serialization
- Parameters
-
os | Output Stream |
verbose | Verbose flag |
- Returns
Implements ASerializable.
Reimplemented in PolyElem.
◆ _shiftPoint()
Shift a point along a segment
- Parameters
-
[in] | xy1 | Coordinates of the first point |
[in] | xy2 | Coordinates of the second point |
[in] | ratio | Shifting ratio |
[out] | xy0 | Shifted point |
◆ addPoint()
void PolyLine2D::addPoint |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
◆ angleAtPolyline()
double PolyLine2D::angleAtPolyline |
( |
const PolyPoint2D & |
pldist, |
|
|
int |
nb_neigh = 0 |
|
) |
| const |
◆ create()
◆ createFromNF()
PolyLine2D * PolyLine2D::createFromNF |
( |
const String & |
neutralFilename, |
|
|
bool |
verbose = true |
|
) |
| |
|
static |
◆ distanceAlongPolyline()
Find the shortest distance between two points (x1,y1) and (x2,y2) which belong to the current polyline
- Returns
- Minimum distance
- Parameters
-
◆ distanceAtPolyline()
double PolyLine2D::distanceAtPolyline |
( |
const PolyPoint2D & |
pldist, |
|
|
const VectorDouble & |
target, |
|
|
int |
nb_neigh |
|
) |
| const |
◆ distanceBetweenPoints()
double PolyLine2D::distanceBetweenPoints |
( |
double |
ap, |
|
|
double |
al, |
|
|
const VectorDouble & |
xy1, |
|
|
const VectorDouble & |
xy2 |
|
) |
| const |
Find the shortest distance between two points (x1,y1) and (x2,y2) passing through a polyline
- Returns
- Minimum distance
- Parameters
-
[in] | ap | Coefficient applied to the projected distances |
[in] | al | Coefficient applied to the distance along line |
[in] | xy1 | Coordinates of the first point |
[in] | xy2 | Coordinates of the second point |
◆ getNPoints()
int PolyLine2D::getNPoints |
( |
| ) |
const |
|
inline |
◆ getPLIndex()
Returns the point of the PolyLine located at shortest distance from Target
- Returns
- PolyPoint2D structure
- Parameters
-
[in] | xy0 | Coordinates of the target point |
◆ getPoint()
◆ getX() [1/2]
◆ getX() [2/2]
double PolyLine2D::getX |
( |
int |
i | ) |
const |
|
inline |
◆ getXmax()
double PolyLine2D::getXmax |
( |
| ) |
const |
|
inline |
◆ getXmin()
double PolyLine2D::getXmin |
( |
| ) |
const |
|
inline |
◆ getY() [1/2]
◆ getY() [2/2]
double PolyLine2D::getY |
( |
int |
i | ) |
const |
|
inline |
◆ getYmax()
double PolyLine2D::getYmax |
( |
| ) |
const |
|
inline |
◆ getYmin()
double PolyLine2D::getYmin |
( |
| ) |
const |
|
inline |
◆ init()
◆ operator=()
◆ setX()
◆ setY()
◆ toString()
◆ _x
◆ _y
The documentation for this class was generated from the following files: