REFERENCE MANUAL
#include <hps.h>
Additional Inherited Members | |
![]() | |
template<typename T > | |
static intptr_t | ClassID () |
![]() | |
Control (Control &&in_that) | |
Control & | operator= (Control &&in_that) |
The DrawingAttributeControl class is a smart pointer that is tied to a database object. This object is used to manipulate various high-level settings, such as depth range, priority, and displacement. Note that some of the attributes available through this control should only be set for an entire window, while others can be set at multiple places.
<p>Global attributes:<br> world handedness, polygon handedness, priority, depth range</p> <p>Segment-level attributes:<br> overlay, deferral, face displacement, general displacement, clip regions</p>
This table lists default values for the various segment attributes accessible from DrawingAttributeControl.
|
explicit |
Initializes a control tied to the segment in_seg.
DrawingAttributeControl::DrawingAttributeControl | ( | DrawingAttributeControl const & | in_that | ) |
Initializes a control tied to the same object as in_that.
DrawingAttributeControl::DrawingAttributeControl | ( | DrawingAttributeControl && | in_that | ) |
The move constructor creates a DrawingAttributeControl by transferring the underlying impl of the rvalue reference to this DrawingAttributeControl thereby avoiding a copy and allocation.
in_that | An rvalue reference to a DrawingAttributeControl to take the impl from. |
DrawingAttributeControl::~DrawingAttributeControl | ( | ) |
Releases a reference to the database object this control is tied to.
|
inlinevirtual |
This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object.
Reimplemented from Control.
DrawingAttributeControl& DrawingAttributeControl::operator= | ( | DrawingAttributeControl && | in_that | ) |
The move assignment operator transfers the underlying impl of the rvalue reference to this DrawingAttributeControl thereby avoiding a copy.
in_that | An rvalue reference to an DrawingAttributeControl to take the impl from. |
DrawingAttributeControl& DrawingAttributeControl::operator= | ( | DrawingAttributeControl const & | in_that | ) |
Share the smart-pointer.
DrawingAttributeControl& DrawingAttributeControl::SetClipRegion | ( | PointArray const & | in_points, |
Drawing::ClipSpace | in_space = Drawing::ClipSpace::World , |
||
Drawing::ClipOperation | in_operation = Drawing::ClipOperation::Keep |
||
) |
Specifies a clip region.
in_points | An array of points specifying the shape of the clip region. |
in_space | The space coordinated in which the points are specified. |
in_operation | The operation performed by this clip region. |
DrawingAttributeControl& DrawingAttributeControl::SetClipRegion | ( | size_t | in_number_of_points, |
Point const | in_points[], | ||
Drawing::ClipSpace | in_space = Drawing::ClipSpace::World , |
||
Drawing::ClipOperation | in_operation = Drawing::ClipOperation::Keep |
||
) |
Specifies a clip region.
in_number_of_points | The number of elements in in_points |
in_points | An array of points specifying the shape of the clip region. |
in_space | The space coordinated in which the points are specified. |
in_operation | The operation performed by this clip region. |
DrawingAttributeControl& DrawingAttributeControl::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. |
DrawingAttributeControl& DrawingAttributeControl::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. Segments have a default value of 0.
in_defer_batch | A drawing priority, with negative values drawing earlier than usual and positive values drawing later than usual. |
DrawingAttributeControl& DrawingAttributeControl::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. |
DrawingAttributeControl& DrawingAttributeControl::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 distance to move rendered faces away from the camera. |
DrawingAttributeControl& DrawingAttributeControl::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 distance to move rendered faces away from the camera. |
DrawingAttributeControl& DrawingAttributeControl::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 distance to move rendered geometry away from the camera. |
DrawingAttributeControl& DrawingAttributeControl::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 distance to move rendered geometry away from the camera. |
DrawingAttributeControl& DrawingAttributeControl::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. |
DrawingAttributeControl& DrawingAttributeControl::SetPolygonHandedness | ( | Drawing::Handedness | in_handedness | ) |
In order to do a back face culling, there must be some definition of a polygon's "front" and "back". 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. |
DrawingAttributeControl& DrawingAttributeControl::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 distance to move vertices away from the camera. |
DrawingAttributeControl& DrawingAttributeControl::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 distance to move rendered geometry away from the camera. |
DrawingAttributeControl& DrawingAttributeControl::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. |
bool DrawingAttributeControl::ShowClipRegion | ( | PointArrayArray & | out_loops, |
Drawing::ClipSpace & | out_space, | ||
Drawing::ClipOperation & | ou_operation | ||
) |
Shows the clip region setting.
out_loops | An array of loops sspecifying the shape of the clip region. |
out_space | The coordinate space the points are specified in. |
ou_operation | The operation performed by this clip region. |
bool DrawingAttributeControl::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 DrawingAttributeControl::ShowDepthRange | ( | float & | out_x, |
float & | out_y | ||
) | 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 DrawingAttributeControl::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 DrawingAttributeControl::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 DrawingAttributeControl::ShowOverlay | ( | Drawing::Overlay & | out_overlay | ) | const |
Shows the overlay setting.
out_overlay | The type of overlay, if any, used. |
bool DrawingAttributeControl::ShowPolygonHandedness | ( | Drawing::Handedness & | out_handedness | ) | const |
Shows the polygon handedness.
out_handedness | The handedness used for geometry. |
bool DrawingAttributeControl::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 DrawingAttributeControl::ShowWorldHandedness | ( | Drawing::Handedness & | out_handedness | ) | const |
Shows the world handedness.
out_handedness | The handedness of the underlying coordinate system. |
DrawingAttributeControl& DrawingAttributeControl::UnsetClipRegion | ( | ) |
Removes a clip region setting.
DrawingAttributeControl& DrawingAttributeControl::UnsetDeferral | ( | ) |
Removes a deferral setting.
DrawingAttributeControl& DrawingAttributeControl::UnsetDepthRange | ( | ) |
Removes a depth range setting.
DrawingAttributeControl& DrawingAttributeControl::UnsetEverything | ( | ) |
Removes all settings from this object.
DrawingAttributeControl& DrawingAttributeControl::UnsetFaceDisplacement | ( | ) |
Removes a face displacement setting.
DrawingAttributeControl& DrawingAttributeControl::UnsetGeneralDisplacement | ( | ) |
Removes a general displacement setting.
DrawingAttributeControl& DrawingAttributeControl::UnsetOverlay | ( | ) |
Removes an overlay setting.
DrawingAttributeControl& DrawingAttributeControl::UnsetPolygonHandedness | ( | ) |
Removes a polygon handedness setting.
DrawingAttributeControl& DrawingAttributeControl::UnsetVertexDisplacement | ( | ) |
Removes a vertex displacement setting.
DrawingAttributeControl& DrawingAttributeControl::UnsetWorldHandedness | ( | ) |
Removes a world handedness setting.