ImmutablePart Class

  • ImmutablePart
  • class Esri::ArcGISRuntime::ImmutablePart

    Represents a single part of a multipart builder. More...

    Header: #include <ImmutablePart.h>
    Since: Esri::ArcGISRuntime 100.0

    Public Functions

    ImmutablePart()
    ImmutablePart(const Esri::ArcGISRuntime::ImmutablePart &other)
    ImmutablePart(Esri::ArcGISRuntime::ImmutablePart &&other)
    ~ImmutablePart()
    Esri::ArcGISRuntime::Point endPoint() const
    int endPointIndexFromSegmentIndex(int segmentIndex) const
    bool hasCurves() const
    bool isEmpty() const
    Esri::ArcGISRuntime::Point point(int pointIndex) const
    int pointCount() const
    Esri::ArcGISRuntime::ImmutablePointCollection points() const
    Esri::ArcGISRuntime::Segment segment(int segmentIndex) const
    int segmentCount() const
    int segmentIndexFromEndPointIndex(int pointIndex) const
    void segmentIndexFromPointIndex(int pointIndex, int &outStartPointSegmentIndex, int &outEndPointSegmentIndex) const
    int segmentIndexFromStartPointIndex(int pointIndex) const
    Esri::ArcGISRuntime::SpatialReference spatialReference() const
    Esri::ArcGISRuntime::Point startPoint() const
    int startPointIndexFromSegmentIndex(int segmentIndex) const
    Esri::ArcGISRuntime::ImmutablePart &operator=(const Esri::ArcGISRuntime::ImmutablePart &other)
    Esri::ArcGISRuntime::ImmutablePart &operator=(Esri::ArcGISRuntime::ImmutablePart &&other)

    Detailed Description

    Multipart builder is the base class of PolygonBuilder or PolylineBuilder. A part is made up of a collection of segments making the edge of the multipart. Additionally access and modified using the points (vertexes) of segments is available. Adjacent segments which share an end point and a start point are connected and the shared vertex is not duplicated when accessing points. The mutable part can represent gaps between one end point and an adjacent start. However, this is only recommended as a temporary state while modifying a multipart builder, when using GeometryBuilder::toGeometry the gaps are closed with line segments.

    Prior to Esri::ArcGISRuntime 100.12, the only supported segment type was LineSegment.

    From Esri::ArcGISRuntime 100.12, curve segments can be added to a Part and used build polygon and polyline geometries. A part may contain a mix of linear and curve segments.

    See also CubicBezierSegment, EllipticArcSegment, and LineSegment.

    Member Function Documentation

    ImmutablePart::ImmutablePart()

    Default constructor.

    ImmutablePart::ImmutablePart(const Esri::ArcGISRuntime::ImmutablePart &other)

    Copy constructor from other ImmutablePart.

    ImmutablePart::ImmutablePart(Esri::ArcGISRuntime::ImmutablePart &&other)

    Move constructor from other ImmutablePart.

    ImmutablePart::~ImmutablePart()

    Destructor.

    Esri::ArcGISRuntime::Point ImmutablePart::endPoint() const

    Returns the end point of the last segment in the part.

    Returns empty if the collection is empty.

    int ImmutablePart::endPointIndexFromSegmentIndex(int segmentIndex) const

    Gets the end point index from the given segmentIndex.

    Returns the end point index or -1 on error or invalid index.

    bool ImmutablePart::hasCurves() const

    Returns true if the part contains any curve segments.

    Prior to Esri::ArcGISRuntime 100.12, only LineSegment linear segments were available to be added to mutable parts when building geometries.

    From Esri::ArcGISRuntime 100.12, geometry builders support curve segments. This property returns true if any segments where Segment::isCurve is true have been added to the part.

    See also Geometry::hasCurves, GeometryBuilder::hasCurves, and Segment::isCurve.

    bool ImmutablePart::isEmpty() const

    Returns true if the part contains no segments.

    Esri::ArcGISRuntime::Point ImmutablePart::point(int pointIndex) const

    Gets the Point at pointIndex.

    Returns the Point or an empty Point if the index isn't valid.

    int ImmutablePart::pointCount() const

    Returns the count of points in the part.

    The points in the part are the start and end points of segments. Segments can share a point if the end point of one segment matches the start point of the next.

    Esri::ArcGISRuntime::ImmutablePointCollection ImmutablePart::points() const

    Gets the points of the ImmutablePart as an ImmutablePointCollection.

    Returns the end Point.

    Esri::ArcGISRuntime::Segment ImmutablePart::segment(int segmentIndex) const

    Gets the Segment at segmentIndex.

    Returns the Segment or an empty Segment if the index isn't valid.

    int ImmutablePart::segmentCount() const

    Returns the count of segments in the part.

    int ImmutablePart::segmentIndexFromEndPointIndex(int pointIndex) const

    Returns converts from a point index to a segment index that uses the given point as an end point.

    If the point is not an end point, then -1 is returned.

    • pointIndex - Zero-based index of the point.

    void ImmutablePart::segmentIndexFromPointIndex(int pointIndex, int &outStartPointSegmentIndex, int &outEndPointSegmentIndex) const

    Converts from a point index to a segment index of the start point and another segment index containing the end point.

    If the point is not a start or end point, then -1 is set.

    • pointIndex - Zero-based index of the point.
    • outStartPointSegmentIndex - This is set to the segment index using the point as a start point. Can be empty.
    • outEndPointSegmentIndex - This is set to the segment index using the point as an end point. Can be empty.

    int ImmutablePart::segmentIndexFromStartPointIndex(int pointIndex) const

    Returns converts from a point index to a segment index that uses the given point as a start point.

    If the point is not a start point, then -1 is returned.

    • pointIndex - Zero-based index of the point.

    Esri::ArcGISRuntime::SpatialReference ImmutablePart::spatialReference() const

    Returns the spatial reference for the part.

    If the mutable_part does not have a spatial reference empty is returned.

    Esri::ArcGISRuntime::Point ImmutablePart::startPoint() const

    Returns the start point of the first segment in the part.

    Returns empty if the collection is empty.

    int ImmutablePart::startPointIndexFromSegmentIndex(int segmentIndex) const

    Gets the start point index from the given segmentIndex.

    Returns the start point index or -1 on error or invalid index.

    Esri::ArcGISRuntime::ImmutablePart &ImmutablePart::operator=(const Esri::ArcGISRuntime::ImmutablePart &other)

    Assignment operator from other ImmutablePart.

    Esri::ArcGISRuntime::ImmutablePart &ImmutablePart::operator=(Esri::ArcGISRuntime::ImmutablePart &&other)

    Move operator from other ImmutablePart.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.