HPS.DrawingAttributeKit
- class HPS.DrawingAttributeKit : public HPS.Kit
The HPS.DrawingAttributeKit class is a user space object, useful for carrying a group attribute settings. Calling HPS.DrawingAttributeKit.GetDefault() will return a kit with values found in this table.
Public Functions
- DrawingAttributeKit ()
Initializes an empty kit.
- DrawingAttributeKit (HPS.DrawingAttributeKit in_kit)
The copy constructor creates a new DrawingAttributeKit object that contains the same settings as the source object.
- Param in_kit
The source object to copy.
- override bool Empty ()
Indicates whether this object has any values set on it.
- Return
true if no values are set on this object, false otherwise.
- bool Equals (HPS.DrawingAttributeKit in_kit)
Check if the source DrawingAttributeKit is equivalent to this object.
- Param in_kit
The source DrawingAttributeKit to compare to this object.
- Return
true if the objects are equivalent, false otherwise.
- 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.
- void Set (HPS.DrawingAttributeKit in_kit)
Copies the source DrawingAttributeKit into this object.
- Param in_kit
The source object to copy.
- HPS.DrawingAttributeKit SetClipRegion (HPS.Point[] in_points)
Sets a polygonal clip region.
- Param in_points
An array of points describing the clip region.
- Return
A reference to this object.
- HPS.DrawingAttributeKit SetClipRegion (HPS.Point[] in_points, HPS.Drawing.ClipSpace in_space)
Sets a polygonal clip region.
- Param in_points
An array of points describing the clip region.
- Param in_space
The coordinate space in which in_points are specified.
- Return
A reference to this object.
- HPS.DrawingAttributeKit SetClipRegion (HPS.Point[] in_points, HPS.Drawing.ClipSpace in_space, HPS.Drawing.ClipOperation in_operation)
Sets a polygonal clip region.
- Param in_points
An array of points describing the clip region.
- Param in_space
The coordinate space in which in_points are specified.
- Param in_operation
The operation performed by the clip region.
- Return
A reference to this object.
- HPS.DrawingAttributeKit SetClipRegion (HPS.Point[][] in_loops)
Sets a complex polygonal clip region defined by the XOR of a series of loops.
- Param in_loops
An array of loops describing clip regions.
- Return
A reference to this object.
- HPS.DrawingAttributeKit SetClipRegion (HPS.Point[][] in_loops, HPS.Drawing.ClipSpace in_space)
Sets a complex polygonal clip region defined by the XOR of a series of loops.
- Param in_loops
An array of loops describing clip regions.
- Param in_space
The coordinate space in which in_loops are specified.
- Return
A reference to this object.
- HPS.DrawingAttributeKit SetClipRegion (HPS.Point[][] in_loops, HPS.Drawing.ClipSpace in_space, HPS.Drawing.ClipOperation in_operation)
Sets a complex polygonal clip region defined by the XOR of a series of loops.
- Param in_loops
An array of loops describing clip regions.
- Param in_space
The coordinate space in which in_loops are specified.
- Param in_operation
The operation performed by the clip region.
- Return
A reference to this object.
- HPS.DrawingAttributeKit SetDeferral (int in_deferral)
Specifies a drawing order for a segment during timed updates. Segments with a lower deferral value will be drawn before segments with a higher value. This attribute does not inherit like most attributes and segments have a default value of 0.
- Param in_deferral
A drawing priority, with larger values drawing later than usual. Should be non-negative.
- Return
A reference to this object.
- HPS.DrawingAttributeKit SetDepthRange (float in_near, float in_far)
Compresses effective Z values into a subset of what they would otherwise have been. This allows certain pieces of the scene to be drawn on top at all times without additional sub-windows. Values of (0,0) will force all geometry into the frontmost bucket, but will have the drawback that it will cause z-fighting amongst the geometry that shares that setting. To get such pieces of geometry to resolve reasonably well against each other, a range of (0,0.1) should perform reasonably well. Depth range settings are not cumulative, and have no effect when the rendering algorithm is Priority, or is not set. The default is (0,1)
- Param in_near
The portion of the depth range closest to the camera. Valid range is [0,1] with in_near <= in_far.
- Param in_far
The portion of the depth range furthest to the camera. Valid range is [0,1] with in_near <= in_far.
- Return
A reference to this object.
- HPS.DrawingAttributeKit SetFaceDisplacement (bool in_state)
Specifies a number of Z-buffer units that rendered faces should be pushed away from the camera. This can be used to reduce edge stitching by ensuring that coincident edges lay on top of the faces. Negative face displacements will push faces toward the camera.
- Param in_state
Whether face displacement should be used.
- Return
A reference to this object.
- HPS.DrawingAttributeKit SetFaceDisplacement (bool in_state, int in_buckets)
Specifies a number of Z-buffer units that rendered faces should be pushed away from the camera. This can be used to reduce edge stitching by ensuring that coincident edges lay on top of the faces. Negative face displacements will push faces toward the camera.
- Param in_state
Whether face displacement should be used.
- Param in_buckets
The number of units to move faces in the Z-Buffer. The units are 1/2^24 in the normalized depth range [0,1]. Negative values will move faces toward the camera, positive values away from the camera.
- Return
A reference to this object.
- HPS.DrawingAttributeKit SetFaceDisplacement (int in_buckets)
Specifies a number of Z-buffer units that rendered faces should be pushed away from the camera.
- Param in_buckets
The number of units to move faces in the Z-Buffer. The units are 1/2^24 in the normalized depth range [0,1]. Negative values will move faces toward the camera, positive values away from the camera.
- Return
A reference to this object.
- HPS.DrawingAttributeKit SetGeneralDisplacement (bool in_state)
Specifies a number of Z-buffer units that all geometry should be pushed away from the camera. This can be used to ensure that certain geometry is drawn on top of or behind the rest of the scene. Negative general displacements will push geometry toward the camera.
- Param in_state
Whether general displacement should be used.
- Return
A reference to this object.
- HPS.DrawingAttributeKit SetGeneralDisplacement (bool in_state, int in_buckets)
Specifies a number of Z-buffer units that all geometry should be pushed away from the camera. This can be used to ensure that certain geometry is drawn on top of or behind the rest of the scene. Negative general displacements will push geometry toward the camera.
- Param in_state
Whether general displacement should be used.
- Param in_buckets
The number of units to move rendered geometry in the Z-Buffer. The units are 1/2^24 in the normalized depth range [0,1]. Negative values will move geometry toward the camera, positive values away from the camera.
- Return
A reference to this object.
- HPS.DrawingAttributeKit SetGeneralDisplacement (int in_buckets)
Specifies a number of Z-buffer units that all geometry should be pushed away from the camera.
- Param in_buckets
The number of units to move rendered geometry in the Z-Buffer. The units are 1/2^24 in the normalized depth range [0,1]. Negative values will move geometry toward the camera, positive values away from the camera.
- Return
A reference to this object.
- HPS.DrawingAttributeKit SetOverlay (HPS.Drawing.Overlay in_overlay)
Allows moving, editing, or deleting to take place in a segment without triggering a full-screen redraw.
- Param in_overlay
The type of overlay, if any, to be used.
- Return
A reference to this object.
- HPS.DrawingAttributeKit SetOverrideInternalColor (HPS.VisibilityKit in_kit)
Specifies internal color of line styles, glyphs and similar items should be overridden.
- Param in_kit
Which types should internal colors should be overridden.
- Return
A reference to this object.
- HPS.DrawingAttributeKit SetPolygonHandedness (HPS.Drawing.Handedness in_handedness)
In order to perform back face culling, there must be some definition of a polygon’s “front” and “back” faces. This orientation is determined by the order in which the polygon’s vertices were originally defined and the polygon handedness setting (not the world handedness). If you wrap the fingers of the chosen hand along the vertices of the polygon, with your wrist at the first vertex and your fingertips at the last, then extend your thumb perpendicular to your fingers, your thumb is extending out of the front face of the polygon.
- Param in_handedness
The handedness to be used for geometry.
- Return
A reference to this object.
- HPS.DrawingAttributeKit SetVertexDecimation (float in_zero_to_one)
Specifies an amount of vertices to draw 1 draws them all.
- Param in_zero_to_one
An amount, between [0,1], of vertices to draw.
- Return
A reference to this object.
- HPS.DrawingAttributeKit SetVertexDisplacement (bool in_state)
Specifies a number of Z-buffer units that vertices should be pushed away from the camera. This can be used to ensure that vertices are drawn on top of or behind other geometry. Negative general displacements will push vertices toward the camera.
- Param in_state
Whether vertex displacement should be used.
- Return
A reference to this object.
- HPS.DrawingAttributeKit SetVertexDisplacement (bool in_state, int in_buckets)
Specifies a number of Z-buffer units that vertices should be pushed away from the camera. This can be used to ensure that vertices are drawn on top of or behind other geometry. Negative general displacements will push vertices toward the camera.
- Param in_state
Whether vertex displacement should be used.
- Param in_buckets
The number of units to move vertices in the Z-Buffer. The units are 1/2^24 in the normalized depth range [0,1]. Negative values will move vertices toward the camera, positive values away from the camera.
- Return
A reference to this object.
- HPS.DrawingAttributeKit SetVertexDisplacement (int in_buckets)
Specifies a number of Z-buffer units that vertices should be pushed away from the camera. The state is implicitly on.
- Param in_buckets
The number of units to move vertices in the Z-Buffer. The units are 1/2^24 in the normalized depth range [0,1]. Negative values will move vertices toward the camera, positive values away from the camera.
- Return
A reference to this object.
- HPS.DrawingAttributeKit SetVertexRandomization (bool in_state)
Specifies vertices should be drawn in a random order.
- Param in_state
If true the vertices for a point cloud will be randomized.
- Return
A reference to this object.
- HPS.DrawingAttributeKit SetWorldHandedness (HPS.Drawing.Handedness in_handedness)
The world handedness determines the orientation of the Z-axis in the Cartesian coordinate system. If you curl the fingers of your appropriate hand from the X-axis towards the Y-axis, your thumb will point in the direction of the Z-axis.
- Param in_handedness
The handedness of the underlying coordinate system.
- Return
A reference to this object.
- void Show (out HPS.DrawingAttributeKit out_kit)
Copies this object into the given DrawingAttributeKit.
- Param out_kit
The DrawingAttributeKit to populate with the contents of this object.
- bool ShowClipRegion (out HPS.Point[][] out_loops, out HPS.Drawing.ClipSpace out_space, out HPS.Drawing.ClipOperation out_operation)
Shows the clip region settings.
- Param out_loops
An array of loops describing the clip region.
- Param out_space
The coordinate space in which out_loops are described.
- Param out_operation
The operation performed by the clip region
- Return
true if the setting is valid, false otherwise.
- bool ShowDeferral (out int out_defer_batch)
Shows the deferral setting.
- Param out_defer_batch
A drawing priority, with negative values drawing earlier than usual and positive values drawing later than usual.
- Return
true if the setting is valid, false otherwise.
- bool ShowDepthRange (out float out_near, out float out_far)
Shows the depth range setting.
- Param out_near
The portion of the depth range closest to the camera. Valid range is [0,1] with out_near <= out_far.
- Param out_far
The portion of the depth range furthest to the camera. Valid range is [0,1] with out_near <= out_far.
- Return
true if the setting is valid, false otherwise.
- bool ShowFaceDisplacement (out bool out_state, out int out_buckets)
Shows the face displacement setting.
- Param out_state
Whether face displacement will be used.
- Param out_buckets
The distance to move rendered faces away from the camera.
- Return
true if the setting is valid, false otherwise.
- bool ShowGeneralDisplacement (out bool out_state, out int out_buckets)
Shows the general displacement setting.
- Param out_state
Whether general displacement will be used.
- Param out_buckets
The distance to move rendered geometry away from the camera.
- Return
true if the setting is valid, false otherwise.
- bool ShowOverlay (out HPS.Drawing.Overlay out_overlay)
Shows the overlay setting.
- Param out_overlay
The type of overlay, if any, used.
- Return
true if the setting is valid, false otherwise.
- bool ShowOverrideInternalColor (out HPS.VisibilityKit out_kit)
Shows the override internal color settings.
- Param out_kit
Which override internal color types will be used.
- Return
true if the setting is valid, false otherwise.
- bool ShowPolygonHandedness (out HPS.Drawing.Handedness out_handedness)
Shows the polygon handedness.
- Param out_handedness
The handedness used for geometry.
- Return
true if the setting is valid, false otherwise.
- bool ShowVertexDecimation (out float out_zero_to_one)
Shows the vertex decimation setting.
- Param out_zero_to_one
The value set for vertex decimation.
- Return
true if the setting is valid, false otherwise.
- bool ShowVertexDisplacement (out bool out_state, out int out_buckets)
Shows the vertex displacement setting.
- Param out_state
Whether vertex displacement will be used.
- Param out_buckets
The distance to move vertices away from the camera.
- Return
true if the setting is valid, false otherwise.
- bool ShowVertexRandomization (out bool out_state)
Shows the vertex randomization setting.
- Param out_state
Whether vertex randomization will be used.
- Return
true if the setting is valid, false otherwise.
- bool ShowWorldHandedness (out HPS.Drawing.Handedness out_handedness)
Shows the world handedness.
- Param out_handedness
The handedness of the underlying coordinate system.
- Return
true if the setting is valid, false otherwise.
- HPS.DrawingAttributeKit UnsetClipRegion ()
Removes a clip region.
- Return
A reference to this object.
- HPS.DrawingAttributeKit UnsetDeferral ()
Removes a deferral setting.
- Return
A reference to this object.
- HPS.DrawingAttributeKit UnsetDepthRange ()
Removes a depth range setting.
- Return
A reference to this object.
- HPS.DrawingAttributeKit UnsetEverything ()
Removes all settings from this object.
- Return
A reference to this object.
- HPS.DrawingAttributeKit UnsetFaceDisplacement ()
Removes a face displacement setting.
- Return
A reference to this object.
- HPS.DrawingAttributeKit UnsetGeneralDisplacement ()
Removes a general displacement setting.
- Return
A reference to this object.
- HPS.DrawingAttributeKit UnsetOverlay ()
Removes an overlay setting.
- Return
A reference to this object.
- HPS.DrawingAttributeKit UnsetOverrideInternalColor ()
Removes a override internal color setting.
- Return
A reference to this object.
- HPS.DrawingAttributeKit UnsetPolygonHandedness ()
Removes a polygon handedness setting.
- Return
A reference to this object.
- HPS.DrawingAttributeKit UnsetVertexDecimation ()
Removes a vertex decimation setting.
- Return
A reference to this object.
- HPS.DrawingAttributeKit UnsetVertexDisplacement ()
Removes a vertex displacement setting.
- Return
A reference to this object.
- HPS.DrawingAttributeKit UnsetVertexRandomization ()
Removes a vertex randomization setting.
- Return
A reference to this object.
- HPS.DrawingAttributeKit UnsetWorldHandedness ()
Removes a world handedness setting.
- Return
A reference to this object.
Public Static Functions
- HPS.DrawingAttributeKit GetDefault ()
Creates a DrawingAttributeKit which contains the default settings. The returned object will not necessarily have values set for every option, but it will have settings for those options where it is reasonable to have a default.
- Return
A DrawingAttributeKit with the default settings.