A constraint on Point
editing.
More...
#include <luciad/geometries/constraints/IPointConstraint.h>
|
virtual | ~IPointConstraint ()=default |
|
virtual std::shared_ptr< Point > | apply (const std::shared_ptr< Point > &oldPoint, const std::shared_ptr< Point > &newPoint, const PointChange &change)=0 |
| Applies this constraint on a pending change. More...
|
|
virtual std::shared_ptr< Point > | apply (const std::shared_ptr< Point > &point)=0 |
| Applies this constraint on a point without a (known) change. More...
|
|
A constraint on Point
editing.
This can for example be configured on a PointHandlesProvider
.
- Since
- 2020.1
◆ ~IPointConstraint()
virtual luciad::IPointConstraint::~IPointConstraint |
( |
| ) |
|
|
virtualdefault |
◆ apply() [1/2]
virtual std::shared_ptr< Point > luciad::IPointConstraint::apply |
( |
const std::shared_ptr< Point > & |
oldPoint, |
|
|
const std::shared_ptr< Point > & |
newPoint, |
|
|
const PointChange & |
change |
|
) |
| |
|
pure virtual |
Applies this constraint on a pending change.
- Parameters
-
oldPoint | the base Point on which the change is performed, cannot be nullptr . |
newPoint | the result of the change, without any constraints applied, cannot be nullptr . |
change | the change that was applied. |
- Returns
- the resulting Point, after applying this constraint on the pending change. If the constraint does not apply, simply return the
newPoint
. Cannot be nullptr
.
◆ apply() [2/2]
virtual std::shared_ptr< Point > luciad::IPointConstraint::apply |
( |
const std::shared_ptr< Point > & |
point | ) |
|
|
pure virtual |
Applies this constraint on a point without a (known) change.
- Parameters
-
point | the point to constrain, cannot be nullptr . |
- Returns
- the resulting point, after applying this constraint. If the constraint does not apply, simply return the
point
. Cannot be nullptr
.