LuciadCPillar 2024.0.08
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
luciad::PolylineChange Class Referencefinal

Describes a change that was made to a Polyline geometry. More...

#include <luciad/geometries/constraints/IPolylineConstraint.h>

Public Member Functions

 PolylineChange ()
 Constructs an empty polyline change. More...
 
 ~PolylineChange ()
 
void addInsertedPoint (size_t insertedPointIndex)
 Adds the index of the point that is inserted. More...
 
void addMovedPoint (size_t movedPointIndex)
 Adds the index of the point that is moved. More...
 
void addRemovedPoint (size_t removedPointIndex)
 Adds the index of the point that is removed. More...
 
const std::vector< size_t > & getInsertedPoints () const
 Returns the indices of the points in the new polyline that were inserted in this change. More...
 
const std::vector< size_t > & getMovedPoints () const
 Returns the indices of the points in the new polyline that were moved in this change. More...
 
const std::vector< size_t > & getRemovedPoints () const
 Returns the indices of the points in the old polyline that were removed in this change. More...
 
std::optional< CoordinategetTranslation () const
 Returns the translation that was applied on the polyline. More...
 
bool hasPointInserted (size_t index) const
 Returns true if the inserted points of this change contain the given index. More...
 
bool hasPointMoved (size_t index) const
 Returns true if the moved points of this change contain the given index. More...
 
bool hasPointRemoved (size_t index) const
 Returns true if the removed points of this change contain the given index. More...
 
void setTranslation (Coordinate translation)
 Sets the translation that was applied on the polyline. More...
 

Detailed Description

Describes a change that was made to a Polyline geometry.

Since
2020.1

Constructor & Destructor Documentation

◆ PolylineChange()

luciad::PolylineChange::PolylineChange ( )

Constructs an empty polyline change.

◆ ~PolylineChange()

luciad::PolylineChange::~PolylineChange ( )

Member Function Documentation

◆ addInsertedPoint()

void luciad::PolylineChange::addInsertedPoint ( size_t  insertedPointIndex)

Adds the index of the point that is inserted.

Parameters
insertedPointIndexthe index of the point in the new polyline that was inserted in this change.
See also
getInsertedPoints

◆ addMovedPoint()

void luciad::PolylineChange::addMovedPoint ( size_t  movedPointIndex)

Adds the index of the point that is moved.

Parameters
movedPointIndexthe index of the point in the new polyline that was moved in this change.
See also
getMovedPoints

◆ addRemovedPoint()

void luciad::PolylineChange::addRemovedPoint ( size_t  removedPointIndex)

Adds the index of the point that is removed.

Parameters
removedPointIndexthe index of the point in the old polyline that was removed in this change.
See also
getRemovedPoints

◆ getInsertedPoints()

const std::vector< size_t > & luciad::PolylineChange::getInsertedPoints ( ) const

Returns the indices of the points in the new polyline that were inserted in this change.

Returns
the indices of the points in the new polyline that were inserted in this change.

◆ getMovedPoints()

const std::vector< size_t > & luciad::PolylineChange::getMovedPoints ( ) const

Returns the indices of the points in the new polyline that were moved in this change.

This only considers individual point moves, so if the whole polyline was translated, this method can still return false for individual points. For checking whether a translation took place, see getTranslation.

Returns
the indices of the points in the new polyline that were moved in this change.

◆ getRemovedPoints()

const std::vector< size_t > & luciad::PolylineChange::getRemovedPoints ( ) const

Returns the indices of the points in the old polyline that were removed in this change.

Returns
the indices of the points in the old polyline that were removed in this change.

◆ getTranslation()

std::optional< Coordinate > luciad::PolylineChange::getTranslation ( ) const

Returns the translation that was applied on the polyline.

This is the result of use the method translate on the polyline. The value may be std::nullopt if no translation happened.

Returns
the translation that was applied on the polyline.

◆ hasPointInserted()

bool luciad::PolylineChange::hasPointInserted ( size_t  index) const

Returns true if the inserted points of this change contain the given index.

Parameters
indexthe point index in the new polyline.
Returns
true if the inserted points of this change contain the given index.

◆ hasPointMoved()

bool luciad::PolylineChange::hasPointMoved ( size_t  index) const

Returns true if the moved points of this change contain the given index.

Parameters
indexthe point index in the new polyline.
Returns
true if the moved points of this change contain the given index.

◆ hasPointRemoved()

bool luciad::PolylineChange::hasPointRemoved ( size_t  index) const

Returns true if the removed points of this change contain the given index.

Parameters
indexthe point index in the old polyline.
Returns
true if the removed points of this change contain the given index.

◆ setTranslation()

void luciad::PolylineChange::setTranslation ( Coordinate  translation)

Sets the translation that was applied on the polyline.

Parameters
translationthe translation that was applied on the polyline in this change.
See also
getTranslation