LuciadCPillar 2024.0.05
|
Represents a polyline. More...
#include <luciad/geometries/Polyline.h>
Public Member Functions | |
~Polyline () override | |
Coordinate | computePoint (double parameter) const override |
Computes a point of the curve, defined by the given parameter. More... | |
Bounds | getBounds () const override |
Returns the bounds for the geometry object. More... | |
std::shared_ptr< Curve > | getCurveAt (size_t index) const override |
Returns the curve for the requested index. More... | |
size_t | getCurveCount () const override |
Returns the number of curves in this composite. More... | |
LineInterpolationType | getInterpolationType () const |
Returns the interpolation type of the line segment. More... | |
double | getLength2D () const override |
Returns the length of the curve. More... | |
Coordinate | getPoint (size_t index) const |
Returns the coordinate for the requested index. More... | |
size_t | getPointCount () const |
Returns the number of points in the polyline. More... | |
const std::vector< Coordinate > & | getPoints () const |
Returns the list of points of this polyline. More... | |
std::shared_ptr< luciad::CoordinateReference > | getReference () const override |
Returns the coordinate reference of the geometry. More... | |
std::shared_ptr< Polyline > | insertPoint (size_t index, Coordinate newLocation) const |
Creates a new Polyline with an newly inserted control point. More... | |
std::shared_ptr< Polyline > | movePoint (size_t index, Coordinate newLocation) const |
Creates a new Polyline with a moved control point. More... | |
std::shared_ptr< Polyline > | removePoint (size_t index) const |
Creates a new Polyline with a control point removed. More... | |
std::shared_ptr< Polyline > | translate (Coordinate translation) const |
Translates the entire polyline. More... | |
Public Member Functions inherited from luciad::CompositeCurve | |
~CompositeCurve () override | |
Coordinate | computePoint (double parameter) const override |
Computes a point of the curve, defined by the given parameter. More... | |
Bounds | getBounds () const override |
Returns the bounds for the geometry object. More... | |
virtual std::shared_ptr< Curve > | getCurveAt (size_t index) const |
Returns the curve for the requested index. More... | |
virtual size_t | getCurveCount () const |
Returns the number of curves in this composite. More... | |
double | getLength2D () const override |
Returns the length of the curve. More... | |
std::shared_ptr< CoordinateReference > | getReference () const override |
Returns the coordinate reference of the geometry. More... | |
virtual Coordinate | computePoint (double parameter) const =0 |
Computes a point of the curve, defined by the given parameter. More... | |
virtual double | getLength2D () const =0 |
Returns the length of the curve. More... | |
Public Member Functions inherited from luciad::Geometry | |
virtual | ~Geometry ()=default |
virtual Bounds | getBounds () const =0 |
Returns the bounds for the geometry object. More... | |
virtual std::shared_ptr< CoordinateReference > | getReference () const =0 |
Returns the coordinate reference of the geometry. More... | |
Protected Member Functions | |
size_t | getHash () const override |
Returns the hash value for this geometry. More... | |
size_t | getHash () const override |
Returns the hash value for this geometry. More... | |
virtual size_t | getHash () const =0 |
Returns the hash value for this geometry. More... | |
Represents a polyline.
|
override |
|
overridevirtual |
Computes a point of the curve, defined by the given parameter.
parameter | the parameter value, within [0,1] , to compute the point location for. |
luciad::InvalidArgumentException | if parameter is not within [0,1] , or if the point could not be computed. For example, when the curve is defined by invalid points. |
Reimplemented from luciad::CompositeCurve.
|
overridevirtual |
Returns the bounds for the geometry object.
luciad::InvalidArgumentException | if the bounds could not be computed. For example, when the geometry is defined by invalid points. |
Reimplemented from luciad::CompositeCurve.
|
overridevirtual |
Returns the curve for the requested index.
index | the curve index |
luciad::InvalidArgumentException | when requesting an invalid index. |
Reimplemented from luciad::CompositeCurve.
|
overridevirtual |
Returns the number of curves in this composite.
Reimplemented from luciad::CompositeCurve.
|
overrideprotectedvirtual |
Returns the hash value for this geometry.
Reimplemented from luciad::CompositeCurve.
LineInterpolationType luciad::Polyline::getInterpolationType | ( | ) | const |
Returns the interpolation type of the line segment.
One of
|
overridevirtual |
Returns the length of the curve.
luciad::InvalidArgumentException | if the length could not be computed. For example, when the curve is defined by invalid points. |
Reimplemented from luciad::CompositeCurve.
Coordinate luciad::Polyline::getPoint | ( | size_t | index | ) | const |
Returns the coordinate for the requested index.
index | the index of the requested point. |
luciad::InvalidArgumentException | when requesting an invalid index. |
size_t luciad::Polyline::getPointCount | ( | ) | const |
Returns the number of points in the polyline.
const std::vector< Coordinate > & luciad::Polyline::getPoints | ( | ) | const |
Returns the list of points of this polyline.
|
overridevirtual |
Returns the coordinate reference of the geometry.
Reimplemented from luciad::CompositeCurve.
std::shared_ptr< Polyline > luciad::Polyline::insertPoint | ( | size_t | index, |
Coordinate | newLocation | ||
) | const |
Creates a new Polyline with an newly inserted control point.
index | the index of the newly inserted control point. Should be in [0, getPointCount()] . For index 0, a new point will be added at the start of the Polyline. For index getPointCount(), a new point will be added at the end of the Polyline. For other index values, a point will be added between 2 other points. |
newLocation | the location of the new point |
luciad::InvalidArgumentException | for an invalid index |
std::shared_ptr< Polyline > luciad::Polyline::movePoint | ( | size_t | index, |
Coordinate | newLocation | ||
) | const |
Creates a new Polyline with a moved control point.
index | the index of the point to move. Should be in [0, getPointCount() - 1] . |
newLocation | the new location of the point |
luciad::InvalidArgumentException | for an invalid index |
std::shared_ptr< Polyline > luciad::Polyline::removePoint | ( | size_t | index | ) | const |
Creates a new Polyline with a control point removed.
This methods returns a copy of the polyline if its point count is less or equal to 2.
index | the index of the point to be removed. Should be in [0, getPointCount() - 1] . |
luciad::InvalidArgumentException | for an invalid index |
std::shared_ptr< Polyline > luciad::Polyline::translate | ( | Coordinate | translation | ) | const |
Translates the entire polyline.
Note: when the polyline is defined in a geodetic reference and uses geodetic interpolation, the translation is not performed by translating the points one by one. Instead, a translation method is used that better preserves the shape of the polyline when moving it towards (or away from) the poles.
translation | the translation vector |