LuciadCPillar 2024.0.04
|
A translate action performs a translation of a geometry or feature. More...
#include <luciad/edit/handles/ITranslateEditAction.h>
Public Member Functions | |
virtual | ~ITranslateEditAction ()=default |
virtual void | translate (Coordinate translation, EventStatus translateStatus, ChangeStatus changeStatus)=0 |
Performs a translation. More... | |
Static Public Member Functions | |
static std::shared_ptr< ITranslateEditAction > | create (std::function< void(Coordinate, EventStatus, ChangeStatus)> function) |
Creates a default ITranslateEditAction instance that always delegates the ITranslateEditAction::translate methods to the given function. More... | |
A translate action performs a translation of a geometry or feature.
This translation is non-incremental. For example when translating a Geometry, this means that consecutive calls to the ITranslateEditAction::translate
method should be applied to the same initial geometry. So consecutive calls should not apply a translation on the result of the previous translation.
You can distinguish between different stages of the translation using the translation status
parameter. It allows to make a distinction between the start and end of the translation, and intermediate updates.
|
virtualdefault |
|
static |
Creates a default ITranslateEditAction instance that always delegates the ITranslateEditAction::translate methods to the given function.
This is a convenience method that allows you to reduce boiler plate code using lambdas.
function | the function that is called by ITranslateEditAction::translate |
|
pure virtual |
Performs a translation.
translation | the translation to perform |
translateStatus | Used to indicate that a translation has started, is in progress, or has ended. This parameter is useful to determine on which object a change needs to be applied. For example when translation starts , this action should determine an 'initial state' on which the next (update and end ) translate calls will be applied. This initial state can be discarded after EventStatus::End has been passed. It is guaranteed that a translate sequence will contain at least 1 Start, and 1 End call. |
changeStatus | the status of the change. Can be used to distinguish between intermediate changes and a keypoint change. |