LuciadCPillar C# 2023.1.04
|
This class can create polyline instances. More...
Public Member Functions | |
PolylineCreator (Luciad.Geodesy.CoordinateReference reference) | |
void | Dispose () |
Luciad.Controllers.EventResult | OnEvent (Luciad.Input.IInputEvent inputEvent, Luciad.Create.Features.FeatureCreateContext context) |
Handles the given event, and returns if the event was handled or not. More... | |
void | Start (Luciad.Create.Geometries.IGeometryCreateCallback callback, Luciad.Create.Features.FeatureCreateContext context) |
This method is called to start creation. More... | |
Luciad.Controllers.EventResult | OnEvent (Luciad.Input.IInputEvent inputEvent, Luciad.Create.Features.FeatureCreateContext context) |
Handles the given event, and returns if the event was handled or not. More... | |
void | Start (Luciad.Create.Geometries.IGeometryCreateCallback callback, Luciad.Create.Features.FeatureCreateContext context) |
This method is called to start creation. More... | |
Properties | |
Luciad.Geometries.Constraints.IPolylineConstraint | Constraint [get, set] |
Luciad.Create.LineCreationMode | LineCreationMode [get, set] |
Luciad.Geodesy.LineInterpolationType | LineInterpolationType [get, set] |
uint | MaxPointCount [get, set] |
uint | MinPointCount [get, set] |
This class can create polyline instances.
It reacts on input events to create polylines. The event handling behavior can be restricted based on the currently set line creation mode. The events handled in Click mode are: Click events to append one point, and start inserting a new one. This results in changes that are luciad::ChangeStatus::InProgressKeyPoint, or luciad::ChangeStatus::Finished when reaching the maximum point count. Mouse move events to position the next individual point. This results in changes that are luciad::ChangeStatus::InProgress. Double click or long touch press events to append a point, and finish creation. Long touch press events are only reacted upon if points were previously added via touch tap. This results in changes that are luciad::ChangeStatus::Finished, or luciad::ChangeStatus::InProgressKeyPoint when the maximum point count is not reached yet.
The events handled in Freehand mode are: Drag events to continuously add points. Creation starts, with points being added as long as the drag event is ongoing, and creation is finished when dragging stops. Points are not added on every Drag event, indeed a heuristic is used to only add a point when the distance to the previous point or the curvature is high enough. This results in changes that are luciad::ChangeStatus::InProgressKeyPoint if a new point is added, luciad::ChangeStatus::InProgress if the drag move does not trigger a new point (i.e. the distance is too short compared to the previous point), or luciad::ChangeStatus::Finished when the drag ends.
In Automatic mode (the default creation mode), the first event since creation is started determines how polyline points are added. If the first event is a mouse click or touch tap, events are added in Click mode. If a drag event is initiated, points are added in Freehand mode. It is possible to constrain polyline creation using: A minimum point count A maximum point count A constraint
This class does not allow you to interactively choose the elevation of the points. The elevation will by default be set to 0. 2020.1
|
inline |
|
inline |
|
inline |
Handles the given event, and returns if the event was handled or not.
context
the context, cannot be nullptr
inputEvent
an event, cannot be nullptr
if the event was consumed or not
NullArgumentException
when nullptr is passed.
Implements Luciad.Create.Geometries.IGeometryCreator.
|
inline |
This method is called to start creation.
After this call, IGeometryCreator::onEvent can be called. When a IGeometryCreator was started, it can not be started again until it has finished. Implementations of this method are encouraged to throw an exception in that case to signal a programming error by the caller of this method.
context
the context, cannot be nullptr
callback
the callback to signal geometry changes, and whether creation for the geometry has finished, cannot be nullptr.
NullArgumentException
when nullptr is passed.
Implements Luciad.Create.Geometries.IGeometryCreator.
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |