LuciadCPillar 2023.1.04
luciad::IPointConstraint Class Referenceabstract

A constraint on Point editing. More...

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

Public Member Functions

virtual ~IPointConstraint ()=default
 
virtual std::shared_ptr< Pointapply (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< Pointapply (const std::shared_ptr< Point > &point)=0
 Applies this constraint on a point without a (known) change. More...
 

Detailed Description

A constraint on Point editing.

This can for example be configured on a PointHandlesProvider.

Since
2020.1

Constructor & Destructor Documentation

◆ ~IPointConstraint()

virtual luciad::IPointConstraint::~IPointConstraint ( )
virtualdefault

Member Function Documentation

◆ 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
oldPointthe base Point on which the change is performed, cannot be nullptr.
newPointthe result of the change, without any constraints applied, cannot be nullptr.
changethe 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
pointthe 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.