LuciadCPillar C# 2023.1.04
|
Default geometry provider that works for Features with a DataType using a GeometryDataAnnotation. More...
Public Member Functions | |
DefaultFeatureGeometryProvider () | |
Luciad.Models.Features.Feature | ApplyGeometry (Luciad.Models.Features.Feature originalFeature, Luciad.Geometries.Geometry newGeometry) |
Updates the original Feature using the modified Geometry, and returns it. More... | |
void | Dispose () |
Luciad.Geometries.Geometry | GetGeometry (Luciad.Models.Features.Feature feature) |
Return the geometry for a Feature (for example a Geometry using which a Geometry can be edited or created). More... | |
Luciad.Models.Features.Feature | ApplyGeometry (Luciad.Models.Features.Feature originalFeature, Luciad.Geometries.Geometry newGeometry) |
Updates the original Feature using the modified Geometry, and returns it. More... | |
Luciad.Geometries.Geometry | GetGeometry (Luciad.Models.Features.Feature feature) |
Return the geometry for a Feature (for example a Geometry using which a Geometry can be edited or created). More... | |
Default geometry provider that works for Features with a DataType using a GeometryDataAnnotation.
It is implemented as follows: getGeometry: Calls Feature::findGeometry applyGeometry: Uses Feature::asBuilder to copy-and-edit a feature, and replaces the Geometry value of the property in the GeometryDataAnnotation by a new Geometry
This class should not be used when: The geometry of the feature is not exposed using Feature::findGeometry. The geometry isn't an explicit part of the feature, for example, but you can derive it from other properties on the feature. The returned geometry is not the same as the geometry exposed by Feature::findGeometry. It can be useful to display a distinct geometry when a user edits a feature. For example, when users edit the location and orientation of a vessel, you can show an Ellipse, which also has a location and an orientation. The feature has properties that are derived from the geometry. A simple example is a feature that has a Geometry property, and a property with the length of that geometry. When the Geometry property changes, the length property needs to change as well. You can do so by providing a custom implementation of IFeatureGeometryProvider::applyGeometry that changes the geometry, but also changes the length property.
In these cases, a custom IFeatureGeometryProvider implementation needs to be used. 2020.1
|
inline |
|
inline |
Updates the original Feature using the modified Geometry, and returns it.
This Geometry is not necessarily the same geometry as the one used for painting. See IFeatureGeometryProvider for an example.
originalFeature
the original Feature
newGeometry
a new Geometry to apply on the Feature
a new Feature, based on a modified Geometry
Implements Luciad.Models.Features.IFeatureGeometryProvider.
|
inline |
|
inline |
Return the geometry for a Feature (for example a Geometry using which a Geometry can be edited or created).
This Geometry is not necessarily the same geometry as the one used for painting. See IFeatureGeometryProvider for more information.
feature
the Feature to edit
the Geometry using which a Feature can be edited, or nullptr if the Feature can not be edited using a Geometry
Implements Luciad.Models.Features.IFeatureGeometryProvider.