LineKey
-
class
LineKey
: public HPS::GeometryKey The LineKey class is a smart pointer to a database object. It is a handle to a line inserted via SegmentKey::InsertLine.
Public Functions
-
void
Consume
(LineKit &in_kit) Completely replaces all settings on this LineKey with those set on the specified kit and resets the kit.
Parameters: in_kit – The kit from which to get the settings to replace on this LineKey.
-
LineKey &
EditPointsByDeletion
(size_t in_offset, size_t in_count) Removes points from the point list for this LineKey.
Parameters: - in_offset – The offset into the point list for the line at which to start removing points. This value must be such that in_offset<point_count for deletion to succeed.
- in_count – The number of points to delete from the point list for the line. This value must be such that in_offset+in_count<=point_count for the deletion to succeed.
Returns: A reference to this LineKey.
-
LineKey &
EditPointsByInsertion
(size_t in_offset, PointArray const &in_points) Adds points to the point list for this LineKey.
Parameters: - in_offset – The offset into the point list for the line at which to insert points. This value must be such that in_offset <= point_count for insertion to succeed.
- in_points – The points to insert into the point list at the specified offset.
Returns: A reference to this LineKey.
-
LineKey &
EditPointsByInsertion
(size_t in_offset, size_t in_count, Point const in_points[]) Adds points to the point list for this LineKey.
Parameters: - in_offset – The offset into the point list for the line at which to insert points. This value must be such that in_offset <= point_count for insertion to succeed.
- in_count – Size of the following array.
- in_points – The points to insert into the point list at the specified offset.
Returns: A reference to this LineKey.
-
LineKey &
EditPointsByReplacement
(size_t in_offset, PointArray const &in_points) Replaces points in the point list for this LineKey.
Parameters: - in_offset – The offset into the point list for the line at which to start replacing points. This value must be such that in_offset<point_count for replacement to succeed.
- in_points – The points to use to replace those in the point list at the specified offset. This size of the array must be such that in_offset+in_points.size()<=point_count for the replacement to succeed.
Returns: A reference to this LineKey.
-
LineKey &
EditPointsByReplacement
(size_t in_offset, size_t in_count, Point const in_points[]) Replaces points in the point list for this LineKey.
Parameters: - in_offset – The offset into the point list for the line at which to start replacing points. This value must be such that in_offset<point_count for replacement to succeed.
- in_count – Size of the following array. This value must be such that in_offset+in_count<=point_count for the replacement to succeed.
- in_points – The points to use to replace those in the point list at the specified offset.
Returns: A reference to this LineKey.
-
size_t
GetPointCount
() const Retrieves the number of points in this line.
Returns: The number of points in this line.
-
LineKey
() The default constructor creates an uninitialized LineKey object. The Type() function will return Type::None.
-
explicit
LineKey
(Key const &in_that) This constructor creates a LineKey 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 Line key. Otherwise the copy will fail and the resulting LineKey will be invalid.
Parameters: in_name – The source Key to copy.
-
LineKey
(LineKey &&in_that) The move constructor creates a LineKey by transferring the underlying impl of the rvalue reference to this LineKey thereby avoiding a copy and allocation.
Parameters: in_that – An rvalue reference to a LineKey to take the impl from.
-
LineKey
(LineKey const &in_that) The copy constructor creates a LineKey object that shares the underlying smart-pointer of the source LineKey.
Parameters: in_that – The source LineKey to copy.
-
inline virtual HPS::Type
ObjectType
() const 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).
Returns: The declared type of the object in question, which may differ from the true, underlying type.
-
LineKey &
operator=
(LineKey &&in_that) The move assignment operator transfers the underlying impl of the rvalue reference to this LineKey thereby avoiding a copy.
Parameters: in_that – An rvalue reference to a LineKey to take the impl from. Returns: A reference to this LineKey.
-
LineKey &
operator=
(LineKey const &in_that) Associate this LineKey with the same underlying impl as the source LineKey.
Parameters: in_that – The source LineKey for the assignment. Returns: A reference to this LineKey.
-
void
Set
(LineKit const &in_kit) Copies the source LineKit into this LineKit.
Parameters: in_kit – The source LineKit to copy.
-
LineKey &
SetPointCoordinateSpace
(LineCoordinateSpaceArray const &in_spaces) Sets the coordinate space to use for each point of this line. The default is Line::CoordinateSpace::Object.
Parameters: in_spaces – The coordinate spaces for each point in the line. Returns: A reference to this LineKey.
-
LineKey &
SetPointCoordinateSpace
(size_t in_count, Line::CoordinateSpace const in_spaces[]) Sets the coordinate space to use for each point of this line. The default is Line::CoordinateSpace::Object.
Parameters: - in_count – Size of the following array.
- in_spaces – The coordinate spaces for each point in the line.
Returns: A reference to this LineKey.
-
LineKey &
SetPointCoordinateSpace
(size_t in_count, size_t const in_indices[], Line::CoordinateSpace const in_spaces[]) Sets the coordinate space to use for each point of this line. The default is Line::CoordinateSpace::Object.
Parameters: - in_count – The number of points to unset.
- in_indices – The list of point indices to unset.
- in_spaces – The coordinate spaces for each point in the line.
Returns: A reference to this LineKey.
-
LineKey &
SetPointCoordinateSpace
(SizeTArray const &in_indices, LineCoordinateSpaceArray const &in_spaces) Sets the coordinate space to use for each point of this line. The default is Line::CoordinateSpace::Object.
Parameters: - in_indices – The list of point indices to unset.
- in_spaces – The coordinate spaces for each point in the line.
Returns: A reference to this LineKey.
-
LineKey &
SetPoints
(PointArray const &in_points) Sets the points for this LineKey.
Parameters: in_points – The points for this LineKey. Returns: A reference to this LineKey.
-
LineKey &
SetPoints
(PointArray const &in_points, LineCoordinateSpaceArray const &in_spaces) Sets the points for this LineKey.
Parameters: - in_points – The points for this LineKey.
- in_spaces – The coordinate spaces for each point in the line.
Returns: A reference to this LineKey.
-
LineKey &
SetPoints
(size_t in_count, Point const in_points[]) Sets the points for this LineKey.
Parameters: - in_count – Size of the following array.
- in_points – The points for this LineKey.
Returns: A reference to this LineKey.
-
LineKey &
SetPoints
(size_t in_count, Point const in_points[], Line::CoordinateSpace const in_spaces[]) Sets the points for this LineKey.
Parameters: - in_count – Size of the following array.
- in_points – The points for this LineKey.
- in_spaces – The coordinate spaces for each point in the line.
Returns: A reference to this LineKey.
-
void
Show
(LineKit &out_kit) const Copies this LineKit into the given LineKit.
Parameters: out_kit – The LineKit to populate with the contents of this LineKit.
-
bool
ShowPointCoordinateSpace
(LineCoordinateSpaceArray &out_spaces) const Shows the coordinate space that is being used for the points at the specified indices.
Parameters: out_spaces – The coordinate spaces for each all points on this line. Returns: true if line coordinates could be retrieved for this line false otherwise.
-
bool
ShowPointCoordinateSpace
(size_t in_count, size_t const in_indices[], LineCoordinateSpaceArray &out_spaces) const Shows the coordinate space that is being used for the points at the specified indices.
Parameters: - in_count – The number of points to show.
- in_indices – The list of point indices to show.
- out_spaces – The coordinate spaces for each index specified.
Returns: true if line coordinates could be retrieved for this line false otherwise.
-
bool
ShowPointCoordinateSpace
(SizeTArray const &in_indices, LineCoordinateSpaceArray &out_spaces) const Shows the coordinate space that is being used for the points at the specified indices.
Parameters: - in_indices – The list of point indices to show.
- out_spaces – The coordinate spaces for each index specified.
Returns: true if line coordinates could be retrieved for this line false otherwise.
-
bool
ShowPoints
(PointArray &out_points) const Shows the points for this LineKey.
Parameters: out_points – The points for this LineKey. Returns: true if points were set, false otherwise.
-
bool
ShowPoints
(PointArray &out_points, LineCoordinateSpaceArray &out_coordinate_spaces) const Shows the points for this LineKey.
Parameters: - out_points – The points for this LineKey.
- out_coordinate_spaces – The coordinate spaces for each point in this line.
Returns: true if points were set, false otherwise.
-
bool
ShowPointsByList
(size_t in_count, size_t const in_indices[], PointArray &out_points) const Show a subset of the points for this LineKey by list.
Parameters: - in_count – The number of points to show.
- in_indices – The list of point indices to show.
- out_points – The requested points for this LineKey.
Returns: true if all requested points were set, false otherwise.
-
bool
ShowPointsByList
(SizeTArray const &in_indices, PointArray &out_points) const Show a subset of the points for this LineKey by list.
Parameters: - in_indices – The list of point indices to show.
- out_points – The requested points for this LineKey.
Returns: true if all requested points were set, false otherwise.
-
bool
ShowPointsByRange
(size_t in_start_index, size_t in_count, PointArray &out_points) const Show a subset of the points for this LineKey by range.
Parameters: - in_start_index – The first point to show.
- in_count – The number of points to show.
- out_points – The requested points for this LineKey.
Returns: true if all requested points were set, false otherwise.
-
LineKey &
UnsetPointCoordinateSpace
() Unsets the coordinate space for all points on this line back to Coordinate::Space::Object.
Returns: A reference to this LineKey.
-
LineKey &
UnsetPointCoordinateSpace
(size_t in_count, size_t const in_indices[]) Unsets the coordinate space for specified points on this line back to Coordinate::Space::Object.
Parameters: - in_count – The number of points to unset.
- in_indices – The list of point indices to unset.
Returns: A reference to this LineKey.
-
LineKey &
UnsetPointCoordinateSpace
(SizeTArray const &in_indices) Unsets the coordinate space for specified points on this line back to Coordinate::Space::Object.
Parameters: in_indices – The list of point indices to unset. Returns: A reference to this LineKey.
-
~LineKey
()
-
void