ArcGISMutablePart

Namespace: Esri::GameEngine::Geometry
Class: Esri/GameEngine/Geometry/ArcGISMutablePart
Since: 1.0.0

Summary

Represents a single part of a multipart builder.

Constructors

ArcGISMutablePart(const ArcGISSpatialReference&)

Creates a part with a specified spatial reference.

Since 1.0.0

Arguments
NameTypeConstSummary
spatialReference
Yes

A spatial reference object, can be null.

Properties

PropertyTypeNullableReadonlySummary
Yes
Yes

The end point of the last segment in the part. Returns null if the collection is empty.

No
Yes

True if the part contains any curve segments, false otherwise.

No
Yes

Indicates if the part contains no segments.

No
Yes

The count of points in the part.

No
Yes

The count of segments in the part.

Yes
No

The spatial reference for the part.

Yes
Yes

The start point of the first segment in the part. Returns null if the collection is empty.

EndPoint

ArcGISPoint GetEndPoint() const

The end point of the last segment in the part. Returns null if the collection is empty.

HasCurves

bool GetHasCurves() const

True if the part contains any curve segments, false otherwise.

Both linear segments (represented by ArcGISLineSegment) and curve segments (represented by ArcGISCubicBezierSegment or ArcGISEllipticArcSegment) are supported in an ArcGISMutablePart. This property returns true if any curve segments (ArcGISSegment::IsCurve is true) are currently present in this part.

IsEmpty

bool GetIsEmpty() const

Indicates if the part contains no segments.

PointCount

size_t GetPointCount() const

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.

SegmentCount

size_t GetSegmentCount() const

The count of segments in the part.

SpatialReference

ArcGISSpatialReference GetSpatialReference() const

The spatial reference for the part.

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

StartPoint

ArcGISPoint GetStartPoint() const

The start point of the first segment in the part. Returns null if the collection is empty.

Methods

SignatureReturn TypeSummary

AddPoint(double, double)

size_t

Add a new point to the end of the part by specifying the points x,y coordinates. A new line segment is added to connect the new point to the previous.

AddPoint(double, double, double)

size_t

Add a new point to the end of the part by specifying the points x,y,z coordinates. A new line segment is added to connect the new point to the previous.

AddPoint(const ArcGISPoint&)

size_t

Add a new point to the end of the part. A new line segment is added to connect the new point to the previous.

AddSegment(const ArcGISSegment&)

size_t

Add segment to the end of the part.

GetEndPointIndexFromSegmentIndex(size_t)

size_t

For a segment at a specified segment_index the method returns the point index of the segment's end point.

GetPoint(size_t)

ArcGISPoint

Returns a point at a specified point index.

GetPoints()

ArcGISImmutablePointCollection

Returns all the points that are the vertexes of the part.

GetSegment(size_t)

ArcGISSegment

Gets a segment at a specified segment index.

GetSegmentIndexFromEndPointIndex(size_t)

size_t

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.

GetSegmentIndexFromPointIndex(size_t, size_t, size_t)

void

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.

GetSegmentIndexFromStartPointIndex(size_t)

size_t

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.

GetStartPointIndexFromSegmentIndex(size_t)

size_t

For a segment at a specified segment_index the method returns the point index of the segment's start point.

InsertPoint(size_t, double, double)

void

Inserts a point specified by its x,y coordinates into the part at the specified point index. Line segments are added to connect the point to adjacent segments.

InsertPoint(size_t, double, double, double)

void

Inserts a point specified by its x,y,z coordinate into the part at the specified point index. Line segments are added to connect the point to adjacent segments.

InsertPoint(size_t, const ArcGISPoint&)

void

Inserts a point into the part at the specified point index. Line segments are added to connect the point to adjacent segments.

InsertSegment(size_t, const ArcGISSegment&)

void

Inserts a segment into the part at the specified index.

RemoveAll()

void

Remove all segments from the part.

RemovePoint(size_t)

void

Removes a point from the part. Segments connecting to this point are removed and the gap filled with a new line segment.

RemoveSegment(size_t)

void

Remove a segment at the specified index from the part.

SetPoint(size_t, const ArcGISPoint&)

void

Replace a point in the part at the specified point index. Segments that use this point are changed.

SetSegment(size_t, const ArcGISSegment&)

void

Replaces a segment at the specified index in the part.

AddPoint

size_t AddPoint(double x, double y)

Add a new point to the end of the part by specifying the points x,y coordinates. A new line segment is added to connect the new point to the previous.

Since 1.0.0

Arguments
NameTypeConstSummary
x
No

The x-coordinate of the new point.

y
No

The y-coordinate of the new point.

Returns size_t

the point index where the point was added. If an error occurred, then -1 is returned.

AddPoint

size_t AddPoint(double x, double y, double z)

Add a new point to the end of the part by specifying the points x,y,z coordinates. A new line segment is added to connect the new point to the previous.

Since 1.0.0

Arguments
NameTypeConstSummary
x
No

The x-coordinate of the new point.

y
No

The y-coordinate of the new point.

z
No

The z-coordinate of the new point.

Returns size_t

the point index where the point was added. If an error occurred then -1 is returned.

AddPoint

size_t AddPoint(const ArcGISPoint& point)

Add a new point to the end of the part. A new line segment is added to connect the new point to the previous.

Since 1.0.0

Arguments
NameTypeConstSummary
point
Yes

The point to add.

Returns size_t

the point index where the point was added. If an error occurred then -1 is returned.

AddSegment

size_t AddSegment(const ArcGISSegment& segment)

Add segment to the end of the part.

Since 1.0.0

Arguments
NameTypeConstSummary
segment
Yes

The segment.

Returns size_t

The segment index where the segment was added. If an error occurred, then -1 is returned.

GetEndPointIndexFromSegmentIndex

size_t GetEndPointIndexFromSegmentIndex(size_t segmentIndex) const

For a segment at a specified segment_index the method returns the point index of the segment's end point.

Since 1.0.0

Arguments
NameTypeConstSummary
segmentIndex
No

Zero-based index of the segment.

Returns size_t

A point index

GetPoint

ArcGISPoint GetPoint(size_t pointIndex) const

Returns a point at a specified point index.

Since 1.0.0

Arguments
NameTypeConstSummary
pointIndex
No

Zero-based index of the point.

Returns ArcGISPoint

An ArcGISPoint.

GetPoints

Returns all the points that are the vertexes of the part.

Since 1.0.0

Returns ArcGISImmutablePointCollection

The immutable collections of points.

GetSegment

ArcGISSegment GetSegment(size_t segmentIndex) const

Gets a segment at a specified segment index.

Since 1.0.0

Arguments
NameTypeConstSummary
segmentIndex
No

Zero-based index of the segment.

Returns ArcGISSegment

An ArcGISSegment.

GetSegmentIndexFromEndPointIndex

size_t GetSegmentIndexFromEndPointIndex(size_t pointIndex) const

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.

Since 1.0.0

Arguments
NameTypeConstSummary
pointIndex
No

Zero-based index of the point.

Returns size_t

The segment index containing the end point or max size_t if the segment is not found.

GetSegmentIndexFromPointIndex

void GetSegmentIndexFromPointIndex(size_t pointIndex, size_t* outStartPointSegmentIndex, size_t* 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.

Since 1.0.0

Arguments
NameTypeConstSummary
pointIndex
No

Zero-based index of the point.

outStartPointSegmentIndex
No

This is set to the segment index using the point as a start point. Can be null.

outEndPointSegmentIndex
No

This is set to the segment index using the point as an end point. Can be null.

Returns void

GetSegmentIndexFromStartPointIndex

size_t GetSegmentIndexFromStartPointIndex(size_t pointIndex) const

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.

Since 1.0.0

Arguments
NameTypeConstSummary
pointIndex
No

Zero-based index of the point.

Returns size_t

The segment index containing the start point. If point is not a start point, then -1 is returned.

GetStartPointIndexFromSegmentIndex

size_t GetStartPointIndexFromSegmentIndex(size_t segmentIndex) const

For a segment at a specified segment_index the method returns the point index of the segment's start point.

Since 1.0.0

Arguments
NameTypeConstSummary
segmentIndex
No

Zero-based index of the segment.

Returns size_t

A point index

InsertPoint

void InsertPoint(size_t pointIndex, double x, double y)

Inserts a point specified by its x,y coordinates into the part at the specified point index. Line segments are added to connect the point to adjacent segments.

Since 1.0.0

Arguments
NameTypeConstSummary
pointIndex
No

Zero-based index of the point.

x
No

The x-coordinate of the new point.

y
No

The y-coordinate of the new point.

Returns void

InsertPoint

void InsertPoint(size_t pointIndex, double x, double y, double z)

Inserts a point specified by its x,y,z coordinate into the part at the specified point index. Line segments are added to connect the point to adjacent segments.

Since 1.0.0

Arguments
NameTypeConstSummary
pointIndex
No

Zero-based index of the point.

x
No

The x-coordinate of the new point.

y
No

The y-coordinate of the new point.

z
No

The z-coordinate of the new point.

Returns void

InsertPoint

void InsertPoint(size_t pointIndex, const ArcGISPoint& point)

Inserts a point into the part at the specified point index. Line segments are added to connect the point to adjacent segments.

Since 1.0.0

Arguments
NameTypeConstSummary
pointIndex
No

Zero-based index of the point.

point
Yes

The point to insert.

Returns void

InsertSegment

void InsertSegment(size_t segmentIndex, const ArcGISSegment& segment)

Inserts a segment into the part at the specified index.

Since 1.0.0

Arguments
NameTypeConstSummary
segmentIndex
No

Zero-based index of the segment.

segment
Yes

The segment to insert.

Returns void

RemoveAll

void RemoveAll()

Remove all segments from the part.

Since 1.0.0

Returns void

RemovePoint

void RemovePoint(size_t pointIndex)

Removes a point from the part. Segments connecting to this point are removed and the gap filled with a new line segment.

Since 1.0.0

Arguments
NameTypeConstSummary
pointIndex
No

Zero-based index of the point.

Returns void

RemoveSegment

void RemoveSegment(size_t segmentIndex)

Remove a segment at the specified index from the part.

Since 1.0.0

Arguments
NameTypeConstSummary
segmentIndex
No

Zero-based index of the segment.

Returns void

SetPoint

void SetPoint(size_t pointIndex, const ArcGISPoint& point)

Replace a point in the part at the specified point index. Segments that use this point are changed.

Since 1.0.0

Arguments
NameTypeConstSummary
pointIndex
No

Zero-based index of the point.

point
Yes

The point.

Returns void

SetSegment

void SetSegment(size_t segmentIndex, const ArcGISSegment& segment)

Replaces a segment at the specified index in the part.

Since 1.0.0

Arguments
NameTypeConstSummary
segmentIndex
No

Zero-based index of the segment.

segment
Yes

The segment to be set into the collection.

Returns void

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