The HPS::DrawingAttributeKit class is a user space object, useful for carrying a group attribute settings. More...
#include <hps.h>
Public Member Functions | |
DrawingAttributeKit () | |
Initializes an empty kit. More... | |
DrawingAttributeKit (DrawingAttributeKit const &in_kit) | |
The copy constructor creates a new DrawingAttributeKit object that contains the same settings as the source object. More... | |
DrawingAttributeKit (DrawingAttributeKit &&in_that) | |
The move constructor creates a DrawingAttributeKit by transferring the underlying impl of the rvalue reference to this DrawingAttributeKit thereby avoiding a copy and allocation. More... | |
DrawingAttributeKit & | operator= (DrawingAttributeKit &&in_that) |
The move assignment operator transfers the underlying impl of the rvalue reference to this DrawingAttributeKit thereby avoiding a copy. More... | |
virtual | ~DrawingAttributeKit () |
Destroy this kit. More... | |
HPS::Type | ObjectType () const |
void | Set (DrawingAttributeKit const &in_kit) |
Copies the source DrawingAttributeKit into this object. More... | |
void | Show (DrawingAttributeKit &out_kit) const |
Copies this object into the given DrawingAttributeKit. More... | |
DrawingAttributeKit & | operator= (DrawingAttributeKit const &in_kit) |
Copies the source DrawingAttributeKit into this object. More... | |
bool | Empty () const |
Indicates whether this object has any values set on it. More... | |
bool | Equals (DrawingAttributeKit const &in_kit) const |
Check if the source DrawingAttributeKit is equivalent to this object. More... | |
bool | operator== (DrawingAttributeKit const &in_kit) const |
Check if the source DrawingAttributeKit is equivalent to this object. More... | |
bool | operator!= (DrawingAttributeKit const &in_kit) const |
Check if the source DrawingAttributeKit is not equivalent to this object. More... | |
DrawingAttributeKit & | SetPolygonHandedness (Drawing::Handedness in_handedness) |
In order to perform back face culling, there must be some definition of a polygon's "front" and "back" faces. More... | |
DrawingAttributeKit & | SetWorldHandedness (Drawing::Handedness in_handedness) |
The world handedness determines the orientation of the Z-axis in the Cartesian coordinate system. More... | |
DrawingAttributeKit & | SetDepthRange (float in_near, float in_far) |
Compresses effective Z values into a subset of what they would otherwise have been. More... | |
DrawingAttributeKit & | SetFaceDisplacement (bool in_state, int in_buckets=0) |
Specifies a number of Z-buffer units that rendered faces should be pushed away from the camera. More... | |
DrawingAttributeKit & | SetFaceDisplacement (int in_buckets) |
Specifies a number of Z-buffer units that rendered faces should be pushed away from the camera. More... | |
DrawingAttributeKit & | SetGeneralDisplacement (bool in_state, int in_buckets=0) |
Specifies a number of Z-buffer units that all geometry should be pushed away from the camera. More... | |
DrawingAttributeKit & | SetGeneralDisplacement (int in_buckets) |
Specifies a number of Z-buffer units that all geometry should be pushed away from the camera. More... | |
DrawingAttributeKit & | SetVertexDisplacement (bool in_state, int in_buckets=0) |
Specifies a number of Z-buffer units that vertices should be pushed away from the camera. More... | |
DrawingAttributeKit & | SetVertexDisplacement (int in_buckets) |
Specifies a number of Z-buffer units that vertices should be pushed away from the camera. More... | |
DrawingAttributeKit & | SetVertexDecimation (float in_zero_to_one) |
Specifies an amount of vertices to draw 1 draws them all. More... | |
DrawingAttributeKit & | SetVertexRandomization (bool in_state) |
Specifies vertices should be drawn in a random order. More... | |
DrawingAttributeKit & | SetOverlay (Drawing::Overlay in_overlay) |
Allows moving, editing, or deleting to take place in a segment without triggering a full-screen redraw. More... | |
DrawingAttributeKit & | SetDeferral (int in_deferral) |
Specifies a drawing order for a segment during timed updates. More... | |
DrawingAttributeKit & | SetClipRegion (PointArray const &in_points, Drawing::ClipSpace in_space=Drawing::ClipSpace::World, Drawing::ClipOperation in_operation=Drawing::ClipOperation::Keep) |
Sets a polygonal clip region. More... | |
DrawingAttributeKit & | SetClipRegion (size_t in_point_count, Point const in_points [], Drawing::ClipSpace in_space=Drawing::ClipSpace::World, Drawing::ClipOperation in_operation=Drawing::ClipOperation::Keep) |
Sets a polygonal clip region. More... | |
DrawingAttributeKit & | SetClipRegion (PointArrayArray const &in_loops, Drawing::ClipSpace in_space=Drawing::ClipSpace::World, Drawing::ClipOperation in_operation=Drawing::ClipOperation::Keep) |
Sets a complex polygonal clip region defined by the XOR of a series of loops. More... | |
DrawingAttributeKit & | UnsetPolygonHandedness () |
Removes a polygon handedness setting. More... | |
DrawingAttributeKit & | UnsetWorldHandedness () |
Removes a world handedness setting. More... | |
DrawingAttributeKit & | UnsetDepthRange () |
Removes a depth range setting. More... | |
DrawingAttributeKit & | UnsetFaceDisplacement () |
Removes a face displacement setting. More... | |
DrawingAttributeKit & | UnsetGeneralDisplacement () |
Removes a general displacement setting. More... | |
DrawingAttributeKit & | UnsetVertexDisplacement () |
Removes a vertex displacement setting. More... | |
DrawingAttributeKit & | UnsetVertexDecimation () |
Removes a vertex decimation setting. More... | |
DrawingAttributeKit & | UnsetVertexRandomization () |
Removes a vertex randomization setting. More... | |
DrawingAttributeKit & | UnsetOverlay () |
Removes an overlay setting. More... | |
DrawingAttributeKit & | UnsetDeferral () |
Removes a deferral setting. More... | |
DrawingAttributeKit & | UnsetClipRegion () |
Removes a clip region. More... | |
DrawingAttributeKit & | UnsetEverything () |
Removes all settings from this object. More... | |
bool | ShowPolygonHandedness (Drawing::Handedness &out_handedness) const |
Shows the polygon handedness. More... | |
bool | ShowWorldHandedness (Drawing::Handedness &out_handedness) const |
Shows the world handedness. More... | |
bool | ShowDepthRange (float &out_near, float &out_far) const |
Shows the depth range setting. More... | |
bool | ShowFaceDisplacement (bool &out_state, int &out_buckets) const |
Shows the face displacement setting. More... | |
bool | ShowGeneralDisplacement (bool &out_state, int &out_buckets) const |
Shows the general displacement setting. More... | |
bool | ShowVertexDisplacement (bool &out_state, int &out_buckets) const |
Shows the vertex displacement setting. More... | |
bool | ShowVertexDecimation (float &out_zero_to_one) const |
Shows the vertex decimation setting. More... | |
bool | ShowVertexRandomization (bool &out_state) const |
Shows the vertex randomization setting. More... | |
bool | ShowOverlay (Drawing::Overlay &out_overlay) const |
Shows the overlay setting. More... | |
bool | ShowDeferral (int &out_defer_batch) const |
Shows the deferral setting. More... | |
bool | ShowClipRegion (PointArrayArray &out_loops, Drawing::ClipSpace &out_space, Drawing::ClipOperation &out_operation) const |
Shows the clip region settings. More... | |
virtual HPS::Type | Type () const |
This function returns the true type of the underlying object. More... | |
virtual void | Reset () |
Resets this object to its initial, uninitialized state. More... | |
bool | HasType (HPS::Type in_mask) const |
This function indicates whether this Object has the given Type mask. More... | |
intptr_t | GetClassID () const |
Returns a unique identifier that is shared by all objects of the same class. More... | |
intptr_t | GetInstanceID () const |
Returns an identifier that can be used to identify which instance of a class an object is. More... | |
Static Public Member Functions | |
static DrawingAttributeKit | GetDefault () |
Creates a DrawingAttributeKit which contains the default settings. More... | |
template<typename T > | |
static intptr_t | ClassID () |
Unique identifier for this class. More... | |
Static Public Attributes | |
static const HPS::Type | staticType = HPS::Type::DrawingAttributeKit |
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.
HPS::DrawingAttributeKit::DrawingAttributeKit | ( | ) |
Initializes an empty kit.
HPS::DrawingAttributeKit::DrawingAttributeKit | ( | DrawingAttributeKit const & | in_kit | ) |
The copy constructor creates a new DrawingAttributeKit object that contains the same settings as the source object.
in_kit | The source object to copy. |
HPS::DrawingAttributeKit::DrawingAttributeKit | ( | DrawingAttributeKit && | in_that | ) |
The move constructor creates a DrawingAttributeKit by transferring the underlying impl of the rvalue reference to this DrawingAttributeKit thereby avoiding a copy and allocation.
in_that | An rvalue reference to a DrawingAttributeKit to take the impl from. |
|
virtual |
Destroy this kit.
|
inlinestaticinherited |
Unique identifier for this class.
Note: this method uses construction of static objects. If used in a constructor, it should be used in the body not the initializer list.
|
virtual |
Indicates whether this object has any values set on it.
Reimplemented from HPS::Object.
bool HPS::DrawingAttributeKit::Equals | ( | DrawingAttributeKit const & | in_kit | ) | const |
Check if the source DrawingAttributeKit is equivalent to this object.
in_kit | The source DrawingAttributeKit to compare to this object. |
|
inherited |
Returns a unique identifier that is shared by all objects of the same class.
|
static |
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.
|
inherited |
Returns an identifier that can be used to identify which instance of a class an object is.
Different keys and controls will return the same value if they are backed by the same database resource.
|
inherited |
|
inlinevirtual |
bool HPS::DrawingAttributeKit::operator!= | ( | DrawingAttributeKit const & | in_kit | ) | const |
Check if the source DrawingAttributeKit is not equivalent to this object.
in_kit | The source DrawingAttributeKit to compare to this object. |
DrawingAttributeKit& HPS::DrawingAttributeKit::operator= | ( | DrawingAttributeKit && | in_that | ) |
The move assignment operator transfers the underlying impl of the rvalue reference to this DrawingAttributeKit thereby avoiding a copy.
in_that | An rvalue reference to a DrawingAttributeKit to take the impl from. |
DrawingAttributeKit& HPS::DrawingAttributeKit::operator= | ( | DrawingAttributeKit const & | in_kit | ) |
Copies the source DrawingAttributeKit into this object.
in_kit | The source DrawingAttributeKit to copy. |
bool HPS::DrawingAttributeKit::operator== | ( | DrawingAttributeKit const & | in_kit | ) | const |
Check if the source DrawingAttributeKit is equivalent to this object.
in_kit | The source DrawingAttributeKit to compare to this object. |
|
virtualinherited |
Resets this object to its initial, uninitialized state.
Reimplemented in HPS::EventHandler, HPS::EventDispatcher, HPS::World, HPS::HighlightSearchResults, HPS::HighlightSearchResultsIterator, HPS::SelectionResults, HPS::SelectionResultsIterator, HPS::FontSearchResults, HPS::FontSearchResultsIterator, HPS::SearchResults, and HPS::SearchResultsIterator.
void HPS::DrawingAttributeKit::Set | ( | DrawingAttributeKit const & | in_kit | ) |
Copies the source DrawingAttributeKit into this object.
in_kit | The source object to copy. |
DrawingAttributeKit& HPS::DrawingAttributeKit::SetClipRegion | ( | PointArray const & | in_points, |
Drawing::ClipSpace | in_space = Drawing::ClipSpace::World , |
||
Drawing::ClipOperation | in_operation = Drawing::ClipOperation::Keep |
||
) |
Sets a polygonal clip region.
in_points | An array of points describing the clip region. |
in_space | The coordinate space in which in_points are specified. |
in_operation | The operation performed by the clip region. |
DrawingAttributeKit& HPS::DrawingAttributeKit::SetClipRegion | ( | size_t | in_point_count, |
Point const | in_points[], | ||
Drawing::ClipSpace | in_space = Drawing::ClipSpace::World , |
||
Drawing::ClipOperation | in_operation = Drawing::ClipOperation::Keep |
||
) |
Sets a polygonal clip region.
in_point_count | The number of points in in_points. |
in_points | An array of points describing the clip region. |
in_space | The coordinate space in which in_points are specified. |
in_operation | The operation performed by the clip region. |
DrawingAttributeKit& HPS::DrawingAttributeKit::SetClipRegion | ( | PointArrayArray const & | in_loops, |
Drawing::ClipSpace | in_space = Drawing::ClipSpace::World , |
||
Drawing::ClipOperation | in_operation = Drawing::ClipOperation::Keep |
||
) |
Sets a complex polygonal clip region defined by the XOR of a series of loops.
in_loops | An array of loops describing clip regions. |
in_space | The coordinate space in which in_loops are specified. |
in_operation | The operation performed by the clip region. |
DrawingAttributeKit& 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.
in_deferral | A drawing priority, with larger values drawing later than usual. Should be non-negative. |
DrawingAttributeKit& 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)
in_near | The portion of the depth range closest to the camera. Valid range is [0,1] with in_near <= in_far. |
in_far | The portion of the depth range furthest to the camera. Valid range is [0,1] with in_near <= in_far. |
DrawingAttributeKit& HPS::DrawingAttributeKit::SetFaceDisplacement | ( | bool | in_state, |
int | in_buckets = 0 |
||
) |
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.
in_state | Whether face displacement should be used. |
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. |
DrawingAttributeKit& HPS::DrawingAttributeKit::SetFaceDisplacement | ( | int | in_buckets | ) |
Specifies a number of Z-buffer units that rendered faces should be pushed away from the camera.
The state is implicitly on.
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. |
DrawingAttributeKit& HPS::DrawingAttributeKit::SetGeneralDisplacement | ( | bool | in_state, |
int | in_buckets = 0 |
||
) |
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.
in_state | Whether general displacement should be used. |
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. |
DrawingAttributeKit& HPS::DrawingAttributeKit::SetGeneralDisplacement | ( | int | in_buckets | ) |
Specifies a number of Z-buffer units that all geometry should be pushed away from the camera.
The state is implicitly on.
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. |
DrawingAttributeKit& HPS::DrawingAttributeKit::SetOverlay | ( | Drawing::Overlay | in_overlay | ) |
Allows moving, editing, or deleting to take place in a segment without triggering a full-screen redraw.
in_overlay | The type of overlay, if any, to be used. |
DrawingAttributeKit& HPS::DrawingAttributeKit::SetPolygonHandedness | ( | 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.
in_handedness | The handedness to be used for geometry. |
DrawingAttributeKit& HPS::DrawingAttributeKit::SetVertexDecimation | ( | float | in_zero_to_one | ) |
Specifies an amount of vertices to draw 1 draws them all.
in_zero_to_one | An amount, between [0,1], of vertices to draw. |
DrawingAttributeKit& HPS::DrawingAttributeKit::SetVertexDisplacement | ( | bool | in_state, |
int | in_buckets = 0 |
||
) |
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.
in_state | Whether vertex displacement should be used. |
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. |
DrawingAttributeKit& 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.
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. |
DrawingAttributeKit& HPS::DrawingAttributeKit::SetVertexRandomization | ( | bool | in_state | ) |
Specifies vertices should be drawn in a random order.
in_state | If true the vertices for a point cloud will be randomized. |
DrawingAttributeKit& HPS::DrawingAttributeKit::SetWorldHandedness | ( | 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.
in_handedness | The handedness of the underlying coordinate system. |
void HPS::DrawingAttributeKit::Show | ( | DrawingAttributeKit & | out_kit | ) | const |
Copies this object into the given DrawingAttributeKit.
out_kit | The DrawingAttributeKit to populate with the contents of this object. |
bool HPS::DrawingAttributeKit::ShowClipRegion | ( | PointArrayArray & | out_loops, |
Drawing::ClipSpace & | out_space, | ||
Drawing::ClipOperation & | out_operation | ||
) | const |
Shows the clip region settings.
out_loops | An array of loops describing the clip region. |
out_space | The coordinate space in which out_loops are described. |
out_operation | The operation performed by the clip region |
bool HPS::DrawingAttributeKit::ShowDeferral | ( | int & | out_defer_batch | ) | const |
Shows the deferral setting.
out_defer_batch | A drawing priority, with negative values drawing earlier than usual and positive values drawing later than usual. |
bool HPS::DrawingAttributeKit::ShowDepthRange | ( | float & | out_near, |
float & | out_far | ||
) | const |
Shows the depth range setting.
out_near | The portion of the depth range closest to the camera. Valid range is [0,1] with out_near <= out_far. |
out_far | The portion of the depth range furthest to the camera. Valid range is [0,1] with out_near <= out_far. |
bool HPS::DrawingAttributeKit::ShowFaceDisplacement | ( | bool & | out_state, |
int & | out_buckets | ||
) | const |
Shows the face displacement setting.
out_state | Whether face displacement will be used. |
out_buckets | The distance to move rendered faces away from the camera. |
bool HPS::DrawingAttributeKit::ShowGeneralDisplacement | ( | bool & | out_state, |
int & | out_buckets | ||
) | const |
Shows the general displacement setting.
out_state | Whether general displacement will be used. |
out_buckets | The distance to move rendered geometry away from the camera. |
bool HPS::DrawingAttributeKit::ShowOverlay | ( | Drawing::Overlay & | out_overlay | ) | const |
Shows the overlay setting.
out_overlay | The type of overlay, if any, used. |
bool HPS::DrawingAttributeKit::ShowPolygonHandedness | ( | Drawing::Handedness & | out_handedness | ) | const |
Shows the polygon handedness.
out_handedness | The handedness used for geometry. |
bool HPS::DrawingAttributeKit::ShowVertexDecimation | ( | float & | out_zero_to_one | ) | const |
Shows the vertex decimation setting.
out_zero_to_one | The value set for vertex decimation. |
bool HPS::DrawingAttributeKit::ShowVertexDisplacement | ( | bool & | out_state, |
int & | out_buckets | ||
) | const |
Shows the vertex displacement setting.
out_state | Whether vertex displacement will be used. |
out_buckets | The distance to move vertices away from the camera. |
bool HPS::DrawingAttributeKit::ShowVertexRandomization | ( | bool & | out_state | ) | const |
Shows the vertex randomization setting.
out_state | Whether vertex randomization will be used. |
bool HPS::DrawingAttributeKit::ShowWorldHandedness | ( | Drawing::Handedness & | out_handedness | ) | const |
Shows the world handedness.
out_handedness | The handedness of the underlying coordinate system. |
|
inlinevirtualinherited |
This function returns the true type of the underlying object.
This function is useful for finding the type of smart pointer objects that have been cast to more generic types.
Reimplemented from HPS::Object.
DrawingAttributeKit& HPS::DrawingAttributeKit::UnsetClipRegion | ( | ) |
Removes a clip region.
DrawingAttributeKit& HPS::DrawingAttributeKit::UnsetDeferral | ( | ) |
Removes a deferral setting.
DrawingAttributeKit& HPS::DrawingAttributeKit::UnsetDepthRange | ( | ) |
Removes a depth range setting.
DrawingAttributeKit& HPS::DrawingAttributeKit::UnsetEverything | ( | ) |
Removes all settings from this object.
DrawingAttributeKit& HPS::DrawingAttributeKit::UnsetFaceDisplacement | ( | ) |
Removes a face displacement setting.
DrawingAttributeKit& HPS::DrawingAttributeKit::UnsetGeneralDisplacement | ( | ) |
Removes a general displacement setting.
DrawingAttributeKit& HPS::DrawingAttributeKit::UnsetOverlay | ( | ) |
Removes an overlay setting.
DrawingAttributeKit& HPS::DrawingAttributeKit::UnsetPolygonHandedness | ( | ) |
Removes a polygon handedness setting.
DrawingAttributeKit& HPS::DrawingAttributeKit::UnsetVertexDecimation | ( | ) |
Removes a vertex decimation setting.
DrawingAttributeKit& HPS::DrawingAttributeKit::UnsetVertexDisplacement | ( | ) |
Removes a vertex displacement setting.
DrawingAttributeKit& HPS::DrawingAttributeKit::UnsetVertexRandomization | ( | ) |
Removes a vertex randomization setting.
DrawingAttributeKit& HPS::DrawingAttributeKit::UnsetWorldHandedness | ( | ) |
Removes a world handedness setting.
|
static |