KeyPath
- class HPS.KeyPath : public HPS.Object
The KeyPath contains an array of keys, organized from leaf to root. It allows the user to perform a number of queries along that path including accumulating net attributes and converting coordinates.
Public Functions
- HPS.KeyPath Append (HPS.Key in_key)
Appends the supplied Key into this object. Same as operator+= function.
- Deprecated:
This function exists for compatibility. Use KeyPath.PushBack instead.
- Param in_key
The Key to be appended to this.
- Return
A reference to this object.
- HPS.KeyPath Append (HPS.Key[] in_key_array)
Appends the supplied key into this object. Same as operator+= function.
- Deprecated:
This function exists for compatibility. Use KeyPath.PushBack instead.
- Param in_key_array
The KeyArray to be appended to this.
- Return
A reference to this object.
- HPS.KeyPath Append (HPS.KeyPath in_key_path)
Appends the supplied key into this object. Same as operator+= function.
- Deprecated:
This function exists for compatibility. Use KeyPath.PushBack instead.
- Param in_key_path
The KeyPath to be appended to this.
- Return
A reference to this object.
- HPS.Key At (ulong in_index)
Access a Key in this KeyPath object. An HPS.IndexOutOfRangeException exception is thrown if in_index is out of range.
- HPS.Key Back ()
Returns the last key of this key path. An HPS.IndexOutOfRangeException exception is thrown if the key path is empty.
- Return
The last key of this key path.
- bool ComputeExtent (HPS.Extent.ClipRegion in_clip, out HPS.Rectangle out_extent)
Computes a tight 2D extents box around the geometry contained in this key path. A user can use this information to tightly fit a camera to a specified segment or draw a 2D box around the segment. The coordinates are returned to the user in screen space.
- Param in_clip
The setting which indicates whether clip regions should be ignored or included.
- Param out_extent
The screen extent of the geometry under this key path.
- Return
true if the operation succeeded, false otherwise.
- bool ComputeExtent (HPS.VisibilityKit in_vis, HPS.Extent.ClipRegion in_clip, out HPS.Rectangle out_extent)
Computes a tight 2D extents box around the geometry contained in this key path. A user can use this information to tightly fit a camera to a specified segment or draw a 2D box around the segment. The coordinates are returned to the user in screen space.
- Param in_vis
Explicit visibility settings to acknowledge instead of using the visibilities resolved by this key path.
- Param in_clip
The setting which indicates whether clip regions should be ignored or included.
- Param out_extent
The screen extent of the geometry under this key path.
- Return
true if the operation succeeded, false otherwise.
- bool ComputeExtent (HPS.VisibilityKit in_vis, out HPS.Rectangle out_extent)
Computes a tight 2D extents box around the geometry contained in this key path. A user can use this information to tightly fit a camera to a specified segment or draw a 2D box around the segment. The coordinates are returned to the user in screen space.
- Param in_vis
Explicit visibility settings to acknowledge instead of using the visibilities resolved by this key path.
- Param out_extent
The screen extent of the geometry under this key path.
- Return
true if the operation succeeded, false otherwise.
- bool ComputeExtent (out HPS.Rectangle out_extent)
Computes a tight 2D extents box around the geometry contained in this key path. A user can use this information to tightly fit a camera to a specified segment or draw a 2D box around the segment. The coordinates are returned to the user in screen space.
- Param out_extent
The screen extent of the geometry under this key path.
- Return
true if the operation succeeded, false otherwise.
- bool ComputeTextExtent (string in_text, out float out_xfrac, out float out_yfrac)
Computes the extents of the specified text string based on the effective text attributes along this key path. If the effective text transform setting is Text.Transform.Transformable, the returned values will be in object space units. For any other effective text transform setting, the returned values will be a fraction of the segment window from 0.0 to 1.0 (or more) along this key path.
- Param in_text
The text to measure along this keypath
- Param out_xfrac
The width of the text extent
- Param out_yfrac
The height of the text extent
- Return
true if the operation succeeded, false otherwise.
- bool ComputeTextMetrics (string in_text, HPS.TextMetrics.Options options, HPS.TextMetrics.Units size, out float[] out_metrics)
- bool ComputeTransform (HPS.Coordinate.Space in_space, HPS.Coordinate.Space in_output_space, out HPS.MatrixKit out_matrix)
Computes the matrix which transforms objects from the input space to the output space along this key path.
- Param in_space
The starting or input coordinate space.
- Param in_output_space
The final or output coordinate space.
- Param out_matrix
The matrix which transforms objects from the input space to the output space.
- Return
true if the operation succeeded, false otherwise.
- bool ConvertCoordinate (HPS.Coordinate.Space in_space, HPS.Point in_point, HPS.Coordinate.Space in_output_space, out HPS.Point out_point)
Converts a point from one coordinate space to another using the transforms along this key path.
- Param in_space
The coordinate space of the input point.
- Param in_point
The input point to convert.
- Param in_output_space
The coordinate space to convert the input point into.
- Param out_point
The output point, after conversion.
- Return
true if the operation succeeded, false otherwise.
- bool ConvertCoordinate (HPS.Coordinate.Space in_space, HPS.Point[] in_points, HPS.Coordinate.Space in_output_space, out HPS.Point[] out_points)
Converts a point from one coordinate space to another using the transforms along this key path.
- Param in_space
The coordinate space of the input point.
- Param in_points
The input points to convert.
- Param in_output_space
The coordinate space to convert the input point into.
- Param out_points
The output points, after conversion.
- Return
true if the operation succeeded, false otherwise.
- override void Dispose ()
- override bool Empty ()
Returns whether the key path is empty.
- Return
true if the key path is empty, false otherwise.
- bool Equals (HPS.KeyPath in_that)
Check if the source KeyPath is equivalent to this object.
- Param in_that
The source KeyPath to compare to this object.
- Return
true if the objects are equivalent, false otherwise.
- override bool Equals (Object obj)
- HPS.Key Front ()
Returns the first key of this key path. An HPS.IndexOutOfRangeException exception is thrown if the key path is empty.
- Return
The first key of this key path.
- ulong GatherCutGeometry (HPS.SegmentKey in_destination, HPS.CutGeometryGatheringOptionsKit in_options)
Collects capping geometry generated by cutting planes. Geometry is deposited in the segment you specify. Note: Capping geometry is generated during an update. Until an update is completed, no geometry will be present to gather.
- Param in_destination
A segment that the capping geometry will be deposited into.
- Param in_options
Options for the gathering operation.
- Return
The number of individual caps created.
- override int GetHashCode ()
- void Insert (ulong in_index, HPS.Key in_item)
Inserts in_item in the key path before the element at position in_index, increasing the size of the key path by one. An HPS.IndexOutOfRangeException exception is thrown if in_index is out of range.
- Param in_index
The index where in_item will be inserted
- Param in_item
The key to insert in this key path.
- KeyPath ()
Creates an uninitialized key path that refers to no database objects.
- KeyPath (HPS.Key[] in_path)
Creates a new KeyPath object based on the supplied path.
- Param in_path
An array of keys arranged from leaf to root.
- KeyPath (HPS.KeyPath in_that)
Copies in_that into this key path.
- 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.
- HPS.Key PopBack ()
Returns the last key of this key path and returns it. An HPS.IndexOutOfRangeException exception is thrown if the key path is empty.
- Return
The last key of this key path.
- HPS.Key PopFront ()
Returns the first key of this key path and returns it. An HPS.IndexOutOfRangeException exception is thrown if the key path is empty.
- Return
The first key of this key path.
- HPS.KeyPath PushBack (HPS.Key in_key)
Adds in_key to the end of the key path.
- Param in_key
The key to add to the end of the key path.
- Return
A reference to this object.
- HPS.KeyPath PushBack (HPS.Key[] in_key_array)
Appends the supplied key into this object. Same as operator+= function.
- Param in_key_array
The KeyArray to be appended to this.
- Return
A reference to this object.
- HPS.KeyPath PushBack (HPS.KeyPath in_key_path)
Appends the keys contained in the supplied key path at the end of this key path
- Param in_key_path
The KeyPath to be appended to this.
- Return
A reference to this object.
- HPS.KeyPath PushFront (HPS.Key in_key)
Adds in_key to the front of the key path.
- Param in_key
The key to add to the front of the key path.
- Return
A reference to this object.
- void Remove (HPS.Key in_item)
Traverses the keys in this key path and removes the first one which matches in_item NOTE: A useful KeyPath should not contain duplicate keys.
- Param in_item
The item to remove from the key path.
- void Remove (ulong in_index)
Removes the the key at position in_index from this key path. An HPS.IndexOutOfRangeException exception is thrown if in_index is out of range.
- Param in_index
The index of the key to remove, zero based.
- HPS.KeyPath Reverse ()
Creates and returns a new KeyPath object, with the keys organized in the reverse order.
- Return
A new KeyPath object, containing keys organized in the reverse order.
- void Set (HPS.KeyPath in_that)
Copies the supplied path into this object.
- Param in_that
The source of the copy.
- HPS.KeyPath SetKeys (HPS.Key[] in_keys)
Copies an array of keys into this object.
- Param in_keys
The source array, assumed to be arranged from leaf to root.
- Return
A reference to this object.
- bool ShowEffectiveGlyphDefinition (string in_name, out HPS.GlyphDefinition out_def)
Shows the effective glyph definition belonging to the input name along this key path.
- Param in_name
UTF8-encoded name of the glyph to find along this key path.
- Param out_def
The effective glyph definition, if any, with the specified name along this key path.
- Return
true if the glyph definition exists along this path, false otherwise.
- bool ShowEffectiveImageDefinition (string in_name, out HPS.ImageDefinition out_def)
Shows the effective image definition belonging to the input name along this key path.
- Param in_name
UTF8-encoded name of the image to find along this key path.
- Param out_def
The effective image definition, if any, with the specified name along this key path.
- Return
true if the image definition exists along this path, false otherwise.
- bool ShowEffectiveLinePatternDefinition (string in_name, out HPS.LinePatternDefinition out_def)
Shows the effective line pattern definition belonging to the input name along this key path.
- Param in_name
UTF8-encoded name of the line pattern to find along this key path.
- Param out_def
The effective material line pattern, if any, with the specified name along this key path.
- Return
true if the line pattern definition exists along this path, false otherwise.
- bool ShowEffectiveMaterialPaletteDefinition (string in_name, out HPS.MaterialPaletteDefinition out_def)
Shows the effective material palette definition belonging to the input name along this key path.
- Param in_name
UTF8-encoded name of the material palette to find along this key path.
- Param out_def
The effective material palette definition, if any, with the specified name along this key path.
- Return
true if the material palette definition exists along this path, false otherwise.
- bool ShowEffectiveTextureDefinition (string in_name, out HPS.TextureDefinition out_def)
Shows the effective texture definition belonging to the input name along this key path.
- Param in_name
UTF8-encoded name of the texture to find along this key path.
- Param out_def
The effective texture definition, if any, with the specified name along this key path.
- Return
true if the texture definition exists along this path, false otherwise.
- bool ShowKeys (out HPS.Key[] out_keys)
Shows the keys defining this key path.
- Return
true if the setting is valid, false otherwise.
- bool ShowNetAttributeLock (out HPS.AttributeLockKit out_kit)
Shows the net attribute lock settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetBounding (bool in_consider_highlights, out HPS.BoundingKit out_kit)
Shows the net bounding along this key path. This function also optionally includes the bounding for geometry affected by in-place highlighting. This includes Show, Hide, and Isolate operations which alter visibility. In order for all highlights to be accounted for, the KeyPath should be complete, extending from the leaf segment or geometry, all the way to the WindowKey or Canvas.
- Param in_consider_highlights
If true, geometry with attributes set by in-place highlighting (including those attributes affecting visibility) will be included in the boundary calculation.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetBounding (out HPS.BoundingKit out_kit)
Shows the net bounding along this key path without taking into account attributes set through highlights.
- Deprecated:
This function exists for compatibility and ShowNetBounding(bool, BoundingKit &) should be preferred. This function will be removed in HPS 2021.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetCamera (out HPS.CameraKit out_kit)
Shows the net camera attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetClipRegions (out HPS.Point[][][] out_loops_array, out HPS.Drawing.ClipSpace[] out_spaces, out HPS.Drawing.ClipOperation[] out_operations, out HPS.MatrixKit[] out_matrices)
Collects all clip regions on key path.
- Param out_loops_array
An array of arrays of loops describing the clip region.
- Param out_spaces
An array of the coordinate spaces in which loops are described.
- Param out_operations
An array of the operations performed by the clip regions.
- Param out_matrices
An array of the matrices used by the clip regions if they are in ClipSpace.Object else identity matrix.
- Return
true if clip regions exist along this path, false otherwise.
- bool ShowNetColorInterpolation (out HPS.ColorInterpolationKit out_kit)
Shows the net color interpolation attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetConditions (out string[] out_conditions)
- bool ShowNetContourLine (out HPS.ContourLineKit out_kit)
Shows the net contour line attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetCulling (out HPS.CullingKit out_kit)
Shows the net culling attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetCurveAttribute (out HPS.CurveAttributeKit out_kit)
Shows the net curve attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetCuttingSectionAttribute (out HPS.CuttingSectionAttributeKit out_kit)
Shows the net cutting section attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetCylinderAttribute (out HPS.CylinderAttributeKit out_kit)
Shows the net cylinder attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetDrawingAttribute (out HPS.DrawingAttributeKit out_kit)
Shows the net drawing attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetEdgeAttribute (out HPS.EdgeAttributeKit out_kit)
Shows the net edge attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetHiddenLineAttribute (out HPS.HiddenLineAttributeKit out_kit)
Shows the net hidden line attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetLightingAttribute (out HPS.LightingAttributeKit out_kit)
Shows the net lighting attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetLineAttribute (out HPS.LineAttributeKit out_kit)
Shows the net line attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetMarkerAttribute (out HPS.MarkerAttributeKit out_kit)
Shows the net marker attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetMaterialMapping (out HPS.MaterialMappingKit out_kit)
Shows the net material mapping attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetMaterialPalette (out string out_name)
Shows the material palette name along this key path.
- Return
true if a material palette is set along this path, false otherwise.
- bool ShowNetModellingMatrix (out HPS.MatrixKit out_kit)
Shows the net modelling matrix attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetNURBSSurfaceAttribute (out HPS.NURBSSurfaceAttributeKit out_kit)
Shows the net NURBS surface attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetPBRMaterial (out HPS.PBRMaterialKit out_kit)
Shows the net pbr material attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetPerformance (out HPS.PerformanceKit out_kit)
Shows the net performance attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetSelectability (out HPS.SelectabilityKit out_kit)
Shows the net selectability attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetSphereAttribute (out HPS.SphereAttributeKit out_kit)
Shows the net sphere attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetSubwindow (out HPS.SubwindowKit out_kit)
Shows the net subwindow attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetTextAttribute (out HPS.TextAttributeKit out_kit)
Shows the net text attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetTextureMatrix (out HPS.MatrixKit out_kit)
Shows the net texture matrix attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetTransformMask (out HPS.TransformMaskKit out_kit)
Shows the net transform mask attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetTransparency (out HPS.TransparencyKit out_kit)
Shows the net transparency attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetVisibility (out HPS.VisibilityKit out_kit)
Shows the net visibility attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- bool ShowNetVisualEffects (out HPS.VisualEffectsKit out_kit)
Shows the net visual effects attribute settings along this key path.
- Return
true if the setting is valid along this path, false otherwise.
- ulong Size ()
Returns the number of Keys contained in this KeyPath object.
- Return
the number of keys in this key path.
- HPS.KeyPath UnsetKeys ()
Removes the keys defining this key path.
- Return
A reference to this object.
Public Static Functions
- bool operator!= (HPS.KeyPath a, HPS.KeyPath b)
- bool operator== (HPS.KeyPath a, HPS.KeyPath b)