PolygonKey
- class HPS.PolygonKey : public HPS.GeometryKey
The PolygonKey class is a smart pointer to a database object. It is a handle to a polygon created by SegmentKey.InsertPolygon.
Public Functions
- void Consume (HPS.PolygonKit in_kit)
Completely replaces all settings on this PolygonKit with those set on the specified kit and resets the kit.
- Param in_kit
The kit from which to get the settings to replace on this PolygonKit.
- override void Dispose ()
- HPS.PolygonKey EditPointsByDeletion (ulong in_offset, ulong in_count)
Remove the specified number of points from this PolygonKey at the specified offset.
- Param in_offset
The offset into the points for PolygonKey at which to remove points.
- Param in_count
The number of points to remove.
- Return
A reference to this PolygonKey.
- HPS.PolygonKey EditPointsByInsertion (ulong in_offset, HPS.Point[] in_points)
Add points to this PolygonKey at the specified offset.
- Param in_offset
The offset into the points for PolygonKey at which to add points.
- Param in_points
The points to add to this PolygonKey.
- Return
A reference to this PolygonKey.
- HPS.PolygonKey EditPointsByReplacement (ulong in_offset, HPS.Point[] in_points)
Replace the specified number of points for this PolygonKey at the specified offset.
- Param in_offset
The offset into the points for PolygonKey at which to start replacing points.
- Param in_points
The points to use to replace those on this PolygonKey.
- Return
A reference to this PolygonKey.
- ulong GetPointCount ()
Retrieves the number of points in this polygon.
- Return
The number of points in this polygon.
- override HPS.Type ObjectType ()
This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).
- Return
The declared type of the object in question, which may differ from the true, underlying type.
- PolygonKey ()
The default constructor creates an uninitialized PolygonKey object. The Type() function will return Type.None.
- PolygonKey (HPS.Key in_that)
This constructor creates an PolygonKey object that shares the underlying smart-pointer of the source Key. The copy will only be successful if the source key is really an upcast of a polygon key. Otherwise the copy will fail and the resulting PolygonKey will be invalid.
- PolygonKey (HPS.PolygonKey in_that)
The copy constructor creates a PolygonKey object that shares the underlying smart-pointer of the source PolygonKey.
- Param in_that
The source PolygonKey to copy.
- void Set (HPS.PolygonKit in_kit)
Replace those settings on this PolygonKey with those set on the specified kit.
- Param in_kit
The kit from which to get the settings to replace on this PolygonKey.
- HPS.PolygonKey SetPoints (HPS.Point[] in_points)
Replace the points on this PolygonKey with the specified points.
- Param in_points
The points to use to replace those on this PolygonKey.
- Return
A reference to this PolygonKey.
- void Show (out HPS.PolygonKit out_kit)
Copy the contents of this PolygonKey into the specified kit.
- Param out_kit
The kit to populate with the contents of this PolygonKey.
- bool ShowPoints (out HPS.Point[] out_points)
Show the points for this PolygonKey.
- Param out_points
The points for this PolygonKey.
- Return
true if points were set, false otherwise.
- bool ShowPointsByList (ulong[] in_indices, out HPS.Point[] out_points)
Show a subset of the points for this PolygonKey by list.
- Param in_indices
The list of point indices to show.
- Param out_points
The requested points for this PolygonKey.
- Return
true if all requested points were set, false otherwise.
- bool ShowPointsByRange (ulong in_start_index, ulong in_count, out HPS.Point[] out_points)
Show a subset of the points for this PolygonKey by range.
- Param in_start_index
The first point to show.
- Param in_count
The number of points to show.
- Param out_points
The requested points for this PolygonKey.
- Return
true if all requested points were set, false otherwise.
- HPS.Point[] Triangulate ()
Divides the polygon into triangles. Note that the data associated with this polygon is left untouched. If the polygon is self-intersecting, the intersection points will be calculated and taken into account If an error is encountered while triangulating the polygon, the returned array will be empty.
- Return
An array of points. Each triplet of points represents one of the triangle that was computed. For example, the returned values 0th, 1st and 2nd points represent the first triangle, and the 3rd, 4th and 5th points represent second one, and so forth.