This class provides utility methods for Observable instance for PolylineRing.
More...
#include <luciad/geometries/observable/ObservablePolylineRingUtil.h>
This class provides utility methods for Observable instance for PolylineRing.
- Since
- 2020.1
◆ ObservablePolylineRingUtil()
luciad::ObservablePolylineRingUtil::ObservablePolylineRingUtil |
( |
| ) |
|
|
delete |
◆ derivePointAtIndex()
static std::shared_ptr< Observable< std::shared_ptr< Point > > > luciad::ObservablePolylineRingUtil::derivePointAtIndex |
( |
const std::shared_ptr< Observable< std::shared_ptr< PolylineRing > > > & |
observablePolylineRing, |
|
|
size_t |
index |
|
) |
| |
|
static |
Derives an Observable
Point
from the given observable polyline ring that represents the point at the given index.
This observable point will be updated when the given observable polyline ring changes.
Notes:
- When the observable polyline ring contains a
nullptr
value, the observable point instance will contain a nullptr
value too.
- When the given index >= point count, the observable point instance will contain a
nullptr
value.
Observable::setValue
will throw an exception for derived instances.
- Parameters
-
observablePolylineRing | an observable polyline ring from which to derive the point |
index | the point index |
- Returns
- a derived Observable
◆ derivePointOnSegment()
static std::shared_ptr< Observable< std::shared_ptr< Point > > > luciad::ObservablePolylineRingUtil::derivePointOnSegment |
( |
const std::shared_ptr< Observable< std::shared_ptr< PolylineRing > > > & |
observablePolylineRing, |
|
|
size_t |
segmentIndex, |
|
|
double |
parameter |
|
) |
| |
|
static |
Derives an Observable
Point
from the given observable polyline ring that represents a point on a segment of the polyline ring.
This observable point will be updated when the given observable polyline ring changes.
Notes:
- When the observable polyline ring contains a
nullptr
value, the observable point instance will contain a nullptr
value too.
- When the given segmentIndex >= point count, the observable point instance will contain a
nullptr
value.
Observable::setValue
will throw an exception for derived instances.
- Parameters
-
observablePolylineRing | an observable polyline ring from which to derive the point |
segmentIndex | a segment index: a value between [0, pointCount - 2]. For example: segment index 0 corresponds with the segment between the points with index 0 and 1. |
parameter | a parameter value between [0, 1] that determines which point of the segment is chosen. This can for example be 0.5, to get the middle of the segment |
- Returns
- a derived Observable