class HT_Rendition
Objects of this class contain a complete set of attributes
that affect the drawing of primitives. All drawing methods in the class
HT_Renderer
take a rendition argument. The attributes are collected in several groups
each applying to a group of drawing primitives:
Set attributes API
Get attributes API/Renderer
Incarnation Renderer
The Incarnation methods of class HT_Rendition
are used by drivers, and not by applications. This information can be used
by drivers to optimize the process of setting attributes to the hardware.
If the incarnation value has not changed, then the driver may assume that
the attributes for the group represented by the particular incarnation
have not changed and therefore the attributes in the device may not have
to be updated.
For more information on renditions, incarnations and attributes,
see the "Renditions"
section of chapter 2, "Heidi Architecture."
See Also
Methods
Methods are arranged
in the logical categories of Color, Lighting, Line, Face, Marker, Miscellaneous,
Text, Transformation Pipeline, Incarnation, Constructor and Operators.
A detailed listing of all of the methods in alphabetical order follow this
listing.
Color
Attribute Methods
Color/shader (Back and
Front)
color, set_color
Color specified by RGB.
matched_color
Color matched to that specified by
RGB.
color_index, set_color_index
Color specified by palette index.
set_material
Sets the material.
shader, set_shader
Treatment of shaders.
swap_backface_color
Swaps the front and backface colors.
Color/Shader (Front)
front_color, set_front_color
Sets or queries the color attribute
for the front face.
front_color_index, set_front_color_index
Sets or queries the color index attribute
for the front face.
matched_front_color
Queries the matched color attribute
for the front face.
front_shader, set_front_shader
Queries and sets the shader for the
front face of the geometry.
set_front_material
Sets the material for the front face
Color/Shader (Back)
back_color, set_back_color
Sets or queries the color attribute
for the back face.
back_color_index, set_back_color_index
Sets or queries the color index attribute
for the back face.
backplane_culling, set_backplane_culling
Faces not facing
the viewer are removed before drawing.
matched_back_color
Queries the matched color attribute
for the back face.
back_shader, set_back_shader
Queries and sets the shader for the
back face of the geometry.
set_back_material
Sets the material for the back face
Contrast Color
contrast_color, set_contrast_color
Color specified by RGB.
contrast_color_index, set_contrast_color_index
Color specified by palette index.
matched_contrast_color
Color matched to that specified by
RGB.
swap_contrast_color
Swaps the contrast color with the
drawing color.
Background Color
background_color, set_background_color
Sets or queries background color.
This is for a geometrical object whose extent doesn’t cover its whole area.
background_color_index, set_background_color_index
Sets or queries background color
in color index mode.
matched_background_color
Color matched to the specified background
color.
Lighting
add_light
Adds a new light.
cast_shadow, set_cast_shadow
The treatment for shadow casting
of light and color.
fog, set_fog
The treatment for fog lighting and
color.
light, set_light
Treatment of lights.
lighting_interpolation, set_lighting_interpolation
Sets or queries the type of lighting
interpolation
Details
Many drawing primitives reference these color attributes.
Included in the color attributes are color by RGB, color by palette index,
a contrast color for patterns and materials, a background color for XOR
and a matched color.
Matched color attributes are provided automatically by
Heidi in the case that the original RGB color is not available in the current
driver. In this case matched color chooses the closest RGB value that has
an index number. It then stores this closest RGB value, that approximates
the original color, and the index number is stored in the color index.
Heidi driver developers should always use the matched color as the current
RGB drawing color. Usually, matched colors are the same as the color set
by the application. Only when the application requests mapped RGB (8-bit)
on a true color display will the matched color be different from the original
color. In this case, Heidi is trying to match the original color to the
available RGB color entry. For more information see the matched_color,
matched_background_color,
and matched_contrast_color
methods in this class.
The color system defines whether the color or color index
is used when rendering primitives. Both the color and color index are always
valid. Contrast colors are used to fill the zero bits in faces and patterns.
Background colors are used as a reference for drawing in the XOR mixing
mode.
Line Attribute
Methods
dash_cap, set_dash_cap
Controls the type
of line cap used for dash lines.
dash_end_cap, set_dash_end_cap
Controls and sets
the type of ending cap used for the end of interior dashes.
dash_start_cap, set_dash_start_cap
Controls the type
of beginning cap used for the start of interior dashes.
dash_pattern
Queries for the dash
pattern.
line_cap, set_line_cap
line_end_cap, set_line_end_cap
Controls the type
of end cap used for lines.
line_end_cap_solid, set_line_end_cap_solid
Controls the drawing
of solid end caps for nonclosed polylines lines.
line_join, set_line_join
Treatment of polyline vertices
line_joins_solid, set_line_joins_solid
Sets or queries the
line join attribute to solid
line_pattern, set_line_pattern
line_pattern_adaptive, set_line_pattern_adaptive
Sets or queries whether or not the
line pattern should scale to fit end points and joins.
line_pattern_scale, set_line_pattern_scale
Retrieves or sets
the amount that patterned lines are scaled.
line_shape
Returns a line shape
from a user defined shape engine.
line_start_cap, set_line_start_cap
Controls the type
of beginning, start, cap used for lines.
line_weight, set_line_weight
miter_angle
Cuts off the point of a miter at a
percentage limit and creates a bevel.
miter_length
Cuts off the point of a miter at a multiple of the line
weight.
use_plain_form
Sets the line pattern to Solid, line
cap to Butt, line join to Miter and face pattern to Solid.
Face Attribute Methods
face_displacement, set_face_displacement
Face displacement to avoid stitching
problems.
face_pattern, set_face_pattern
Sets or queries the face pattern
used when drawing filled primitives.
fill_pattern
Queries the fill pattern attribute in this rendition
object.
fill_pattern_offset, set_fill_pattern_offset
Sets the fill_pattern to a specified offset.
fill_shape
Calls a shape engine for area fills.
hatch_pattern
Queries the hatch pattern attribute in this rendition
object.
Marker Attribute Methods
marker_size, set_marker_size
Size in pixels
marker_symbol, set_marker_symbol
Marker type or style.
Miscellaneous Attribute Methods
advanced_options, set_advanced_options
Sets or queries options for antialiasing
and sterio mode on or off for specific drivers.
mixing_mode, set_mixing_mode
Sets or queries the arithmetic operation
that is used when drawing primitives.
perspective_correction, set_perspective_correction
Sets or queries to determine if the
texture mapped image should be perspective corrected.
pattern_mode, set_pattern_mode
Sets or queries how face and text
patterns are drawn.
renew_renderer
This method is called in order to associate a new renderer
with a rendition.
render_data
A reference to the renderer from which the rendition
was constructed.
Text Attribute Methods
text_draw_mode, set_text_draw_mode
Advises the font engine to emit raster, stroked, or
outlined versions of the font.
text_path, set_text_path
Sets or queries the text path attribute.
text_rotation, set_text_rotation
Rotation of text base line from horizontal.
text_scale, set_text_scale
Scale factor applied to text size.
text_spacing, set_text_spacing
Inter spacing between characters.
font, set_font
Sets or queries the text font.
Transformation Pipeline Methods
add_cutting_plane
Attaches a cutting plane to the rendition.
add_cutting_planes
Attaches sets of cutting planes to
the rendition.
camera, set_camera
Sets or queries the camera attribute.
complex_clip, set_complex_clip
Sets a special clipping
region used in conjunction with hard_clip.
cutting_planes, set_cutting_planes
Allows the splecification of one or more cutting planes
to be applied to 3D geometry.
depth_buffering, set_depth_buffering
Set or query the current depth buffering
attribute.
hard_clip, set_hard_clip, set_hard_clip_unrestricted
Sets or queries the clipping limits
in device coordinates.
handedness, set_handedness
Queries or sets the handedness of
the transform.
object_to_device
Returns the matrix that represents
the transformation from object coordinates to device coordinates.
modelling_matrix, set_modelling_matrix
Returns the modeling matrix which
defines the transformation from object coordinates to World Coordinates.
projection_matrix
Returns the matrix which defines
the transformation from viewing coordinates to normalized projection coordinates.
reset_hard_clip
Resets the hard clip rectangle to
the window extent.
restrict_hard_clip
Merges the specified rectangle with the existing one.
screen_matrix
Returns the matrix which represents
the transformation from normalized projection coordinates to display viewport
coordinates.
viewing_matrix
Returns the matrix which defines
the transformation from World Coordinates to viewing coordinates.
viewport, set_viewport
Queries or sets the device coordinate
rectangle onto which the camera field of view rectangle, in the image plane,
is mapped.
world_to_device
Returns the matrix that represents
the transformation from World Coordinates to device coordinates.
Incarnation Methods
color_incarnation
Returns a value that uniquely characterizes
the set of values of all the color attributes in this HT_Rendition
object.
face_incarnation
Returns a value that uniquely characterizes
the set of values of all the face attributes in this HT_Rendition
object.
line_incarnation
Returns a value that uniquely characterizes
the set of values of all the line attributes in this HT_Rendition
object.
marker_incarnation
Returns a value that uniquely characterizes
the set of values of all the marker attributes in this HT_Rendition
object.
misc_incarnation
Returns a value that uniquely characterizes
the set of values of all the miscellaneous attributes in this HT_Rendition
object.
net_incarnation
Returns a value that uniquely characterizes
all values of the HT_Rendition
object.
text_incarnation
Returns a value that uniquely characterizes
the set of values of all the text attributes in this HT_Rendition
object.
transform_incarnation
Returns a value that uniquely characterizes
the set of values of all the transform attributes in this HT_Rendition
object.
Constructor
HT_Rendition
Creates a rendition as the default
rendition for a given renderer.
Operator
operator = =
Compares rendition to null.
operator ! =
Compares rendition to null
operator =
Assigns rendition to null.
HT_Rendition::add_cutting_plane
Purpose
Attaches a cutting plane to the rendition.
Synopsis
void add_cutting_plane (HT_Cutting_Plane const & x, HT_Boolean shared = HK_False)
Details
This method is only for use in 3D applications.
HT_Rendition::add_cutting_planes
Purpose
Attaches sets of cutting planes to
the rendition.
Synopsis
void add_cutting_planes (HT_Cutting_Plane_Set const & x, HT_Boolean shared = HK_False)
Details
Similar to add_cutting_plane,
however, this method handles many sets of cutting planes
at a time.
HT_Rendition::add_light
Purpose
Adds a light.
Synopsis
void add_light (HT_Filter const & x)
Details
HT_Filter is the base class for all Heidi lights;
therefore the input parameter x can be any type of light added
to the scene.
HT_Rendition::advanced_options,
set_advanced_options
Purpose
Sets or queries options for anti-aliasing
and stereo mode, if these are available, for specific drivers.
Synopsis
HT_Advanced_Options const &
advanced_options (void) const
HEIDI_API void set_advanced_options (HT_Advanced_Options const & x, HT_Boolean shared = HK_False) alter
Details
When HT_Advanced_Options is set to a
value, certain hardware capability of specific drivers can be utilized,
that is not normally available in Heidi. For example, the OpenGL driver
anti-aliasing option can be set in the rendition which tells the driver
to use the options, while Heidi itself will continue to draw normally.
There is also no effect on Heidi if the driver is not in use and the option
is set. The OpenGL anti-aliasing option will work for 3D and 2D plus Z.
The stereo option allows stereo for OpenGL in 3D mode
only. As this is a hardware option, it has no effect on Heidi.
See Also
For more information, see class HT_Advanced_Options.
HT_Rendition::back_color,
set_back_color
Purpose
Sets or queries the color attribute, in this rendition
object, for the back face of geometry.
Synopsis
HT_RGB32 const
back_color () const
{return m_nr->m_color->m_back_color.rgb();}
void set_back_color (HT_RGB32 const & x, HT_Boolean shared = HK_False) alter;
void set_back_color (HT_RGB32 const & x, int color_index, HT_Boolean shared = HK_False) alter;
Details
See HT_Rendition::color
for details.
HT_Rendition::back_color_index,
set_back_color_index
Purpose
Sets or queries the color index attribute, in this rendition
object, for the back face of the geometry.
Synopsis
int back_color_index () const
void set_back_color_index (int x, HT_Boolean shared = HK_False) alter;
Details
See HT_Rendition::color_index
for details.
HT_Rendition::back_shader,
set_back_shader
Purpose
Sets or queries the shader in this HT_Rendition
object for the back face of the geometry.
Synopsis
HT_Shader const &
back_shader () const
{return m_nr->m_color->m_back_shader;}
void
set_back_shader (HT_Shader const & x, HT_Boolean shared = HK_False) alter
Details
See HT_Rendition::shader
for details.
HT_Rendition::background_color,
set_background_color
Purpose
Sets or queries the background color.
Synopsis
HT_RGB32 const background_color () const
void set_background_color (HT_RGB32 const & x, int color_index, HT_Boolean shared = HK_False) alter
void set_background_color (HT_RGB32 const & x, HT_Boolean shared = HK_False) alter;
Details
HT_Clear_Drawing_Buffer uses background color
to fill the display buffer. When HT_Mixing_Mode::Exclusive_Or
is in effect, the drawing color is XOR’ed with the background color to
generate "quick move" scenes.
In the case where the color exceeds the range of the driver,
HT_Rendition::matched_background_color
will automatically provide the closest match that approximates the original
background color that was set for the driver. For example, if the requested
RGB color exceeds the color range of the driver, a matched color is provided
as the closest approximation. This guarantees that the affected true background
color is the actual background color drawn on this display.
The second form provides an int parameter for
optimization and combines set_color and set_color_index
into a single call. It allows the user to specify a color and index or
use a previous look-up in order to save time from automatically looking
up the closest match.
For more information about color attributes, see the "Renditions"
section of chapter 2 "Heidi Architecture." For more information about color,
color index, contrast color, and matched color see the appropriate methods
which are arranged under this class in alphabetical order.
HT_Rendition::background_color_index,
set_background_color_index
Purpose
Sets or queries background color
in color index mode.
Synopsis
int background_color_index () const
void set_background_color_index (int x, HT_Boolean shared = HK_False) alter;
Details
.
HT_Rendition::backplane_culling,set_backplane_culling
Purpose
Faces not facing
the viewer are removed before drawing.
Synopsis
HT_Boolean
backplane_culling () const
void
set_backplane_culling (HT_Boolean x, HT_Boolean shared = HK_False) alter
Details
Faces that are not facing toward the viewer (the camera
eye) are removed by back plane culling before they are drawn. HT_Boolean
is either HK_True or
HK_False.
HT_Rendition::camera,
set_camera
Purpose
Sets or queries the camera attribute in the HT_Rendition
object.
Synopsis
HT_Camera const & camera (void) const
void set_camera (HT_Camera const & x, HT_Boolean shared = HK_False) alter;
Details
The first form returns a pointer to the camera attribute
in this rendition object. The second form sets the camera attribute to
a particular camera object.
For the content of the camera object and for ways to construct
a camera object, see class HT_Camera.
HT_Rendition::cast_shadow,
set_cast_shadow
Purpose
The treatment of light and color
for shadow casting.
Synopsis
HT_Boolean cast_shadows (void) const
void set_cast_shadows (HT_Boolean on, HT_Boolean shared = HK_False) alter
Details
.
HT_Rendition::color,
set_color
Purpose
Sets or queries the color attribute in this rendition
object.
Synopsis
HT_RGB32 const color ()
void set_color (HT_RGB32 const & x, HT_Boolean shared = HK_False) alter;
void set_color (HT_RGB32 const & x, int color_index, HT_Boolean shared = HK_False) alter;
Details
The color attribute controls the color for several different
primitives including the color for dots and lines and the fill color for
area fill primitives whose fill colors are not otherwise specified in the
arguments of the primitives or computed by lighting and shading. It determines
the diffuse color used in the lighting calculation for lit area fill primitives
whose diffuse colors are not otherwise determined in the arguments.
Note: The diffuse material color is set on the
material directly, rather than set through the rendition. This avoids index
lookups and enhances performance. However, if you are using the Painter's
Renderer or drawing wireframe primitives, continue to set the diffuse
color on the rendition as well as on the material. For more information
see the diffuse methods of HT_Basic_Textured_Material,
HT_Complex_Material
and HT_Complex_Textured_Material.
For mapped color devices, the HT_Rendition::color_index
provides an index representing this color. The index should be used on
mapped color devices.
In the case where the color exceeds the range of the driver,
HT_Rendition::matched_color
will automatically provide the closest match that approximates the original
color that was set for the driver. For example, if the requested RGB color
exceeds the color range of the driver, a matched color is provided as the
closest approximation. This guarantees that the affected true color is
the actual color drawn on this display.
In the case of filled primitives such as polygons, the
filled area is also subject to the face pattern and face contrast color
attributes.
The third form provides an int parameter for
optimization and combines set_color and set_color_index
into a single call. It allows the user to specify a color and index or
use a previous look-up in order to save time from automatically looking
up the closest match.
See Also
For more information about color attributes, see the
"Renditions"
section of chapter 2, "Heidi Architecture." For more information about
color
index, contrast color, background
and matched color, see
the appropriate methods which are arranged under this class in alphabetical
order.
Also see the related rendition color methods listed in
logical categories under "Color Attribute Methods."
HT_Rendition::color_incarnation
Purpose
Queries the color incarnation in this HT_Rendition
object. Not for use by applications.
Synopsis
HT_Incarnation color_incarnation ()
Details
typedef long HT_Incarnation
This value uniquely characterizes the set of values of
all the color attributes in this HT_Rendition object. Any other
HT_Rendition
object with the same value of the color incarnation has the same values
for all the color attributes as this one.
It can be used by drivers to optimize the process of setting
attributes to the hardware. If the incarnation value has not changed, then
the driver may assume that the attributes for this group have not changed
since the last call to this routine.
HT_Rendition::color_index,
set_color_index
Purpose
Sets or queries the color index attribute in this rendition
object.
Synopsis
int color_index ()
void set_color_index (int x, HT_Boolean shared = HK_False) alter;
Details
This is similar to the color attribute, however, color_index
specifies the color as an index for mapped color devices. For more information
see the color method within this class.
Note: The diffuse material color is set on the
material directly, rather than set through the rendition. This avoids index
lookups and enhances performance. However, if you are using the Painter's
Renderer or drawing wireframe primitives, continue to set the diffuse
color on the rendition as well as on the material. For more information
see the diffuse methods of HT_Basic_Textured_Material,
HT_Complex_Material
and HT_Complex_Textured_Material
.
HT_Rendition::complex_clip,
set_ complex_clip
Purpose
Sets a special clipping
region used in conjunction with hard_clip.
Synopsis
HT_Contour_Set const &
complex_clip () const
void set_complex_clip (HT_Contour_Set const & clip, HT_Boolean shared = HK_False) alter;
void set_complex_clip (void * clip, HT_Boolean shared = HK_False) alter;
Details
When complex_clip
is
set, HT_Contour_Set
specifies a user designated, polygonal, clip region which is a sub region
of a hard_clip
rectangular clipping region.
HT_Rendition::contrast_color,
set_contrast_color
Purpose
Sets the face contrast color in this rendition object.
Synopsis
HT_RGB32 const & contrast_color ()
void set_contrast_color (HT_RGB32 const & x, HT_Boolean shared = HK_False) alter;
void set_contrast_color (HT_RGB32 const & x, int color_index, HT_Boolean shared = HK_False) alter;
Details
The face contrast color is used together with the face
pattern and line pattern to apply a pattern to area fill primitives. The
contrast color is used to fill areas in the face pattern that are "off"
or 0 when the face pattern is one of the stippled patterns.
For mapped color devices, the HT_Rendition::contrast_color_index
provides an index representing this color. The index should be used on
mapped color devices.
In the case where the color exceeds the range of the driver,
HT_Rendition::matched_contrast_color
will automatically provide the closest match that approximates the original
color that was set for the driver. For example, if the requested RGB color
exceeds the color range of the driver, a matched color is provided as the
closest approximation. This guarantees that the affected true contrast
color is the actual contrast color drawn on this display.
The third form provides an int parameter for
optimization and combines set_color and set_color_index
into a single call. It allows the user to specify a color and index or
use a previous look-up in order to save time from automatically looking
up the closest match.
For more information about color attributes, see the "Renditions"
section of chapter 2 "Heidi Architecture." For more information about color,
color
index, background color, and matched color
see the appropriate methods which are arranged under this class in alphabetical
order.
HT_Rendition::contrast_color_index,
set_contrast_color_index
Purpose
Sets the face contrast color by index in this rendition
object.
Synopsis
int const & contrast_color_index ()
void set_contrast_color_index (int x, HT_Boolean shared = HK_False) alter;
Details
This is similar to the contrast color attribute, however,
contrast_color_index
provides the color as an index for use with mapped color devices. For more
information see the color index method within this
class.
HT_Rendition::cutting_planes,
set_cutting_planes
Purpose
Allows a user to splecify one or more cutting planes
to be applied to 3D geometry.
Synopsis
HT_Cutting_Plane_Set const & cutting_planes () const
void set_cutting_plane (void * x, HT_Boolean shared = HK_False) alter
void set_cutting_plane (HT_Cutting_Plane const & x, HT_Boolean shared = HK_False) alter
void set_cutting_planes (void * x, HT_Boolean shared = HK_False) alter
void set_cutting_planes (HT_Cutting_Plane_Set const & x, HT_Boolean shared = HK_False) alter
Details
Note: The cutting planes are specified in the
World Coordinate Space of Heidi general world space ¾
before any other attributes, such as camera viewing, are applied.
For more information, see HT_Cutting_Plane
and HT_Plane.
HT_Rendition::dash_cap,
set_dash_cap
Purpose
Controls the type
of line cap used for dash lines.
Synopsis
HT_Line_Cap
dash_cap () const
void
set_dash_cap (HT_Line_Cap x, HT_Boolean shared = HK_False) alter
Details
This method specifies the start and end caps for dash
lines if the caps are the same. If the start and end caps are different,
then dash_cap is undefined and dash_start_cap
and
dash_end_cap is used. dash_cap must
have one of the enumerated values defined in the class HT_Line_Cap¾
Butt,
Round,
Diamond or Square.
dash_capallows
for more exacting control over the placement of end caps in dash lines
wherein, you can apply a line cap to the start and end of a dash in the
interior of the dash line.
For more information on line caps, see the section, "Line
Caps and Joins" in chapter 2, "Heidi Architecture," and class
HT_Line_Cap.
See also
The following are related line and dash cap methods
of class HT_Rendition:
line_cap,
line_start_cap,
line_end_cap,
line_end_cap_solid,
dash_start_cap,
dash_end_cap;
and, the related line join methods line_join
and line_joins_solid.
HT_Rendition::dash_end_cap,
set_dash_end_cap
Purpose
Controls the type
of line cap used for the end of interior dashes.
Synopsis
HT_Line_Cap
dash_end_cap () const
void
set_dash_end_cap (HT_Line_Cap x, HT_Boolean shared = HK_False) alter
Details
This method allows for more exacting control over the
placement of end caps in dashed lines. You can specify an end cap which
is different from the start cap and apply it to a dash in the interior
of the dashed line. It must have one of the
enumerated values defined in the class HT_Line_Cap ¾
Butt,
Round,
Diamond or Square.
For more information on line caps, see the section, "Line
Caps and Joins" in chapter 2, "Heidi Architecture," and class
HT_Line_Cap.
See also
The following are related line and dash cap methods
of class HT_Rendition:
line_cap,
line_start_cap,
line_end_cap,
line_end_cap_solid,
dash_cap,
dash_start_cap;
and, the related line join methods line_join
and line_joins_solid.
HT_Rendition::dash_pattern
Purpose
Queries for the dash
pattern.
Synopsis
HT_Dash_Pattern const &
dash_pattern () const
void
set_line_pattern (HT_Dash_Pattern const & x, HT_Boolean shared = HK_False) alter
Details
This method queries for the user specified dash pattern
HT_Dash_Pattern.This
is called by
set_line_pattern
which is automatically set to the User_Defined
line pattern in pattern.h.HT_Dash_Pattern
can be any type of customized dash pattern that you specify.
For more information on dash patterns, see the section,
"Line Patterns"
in chapter 2, "Heidi Architecture."
See Also
HT_Line_Pattern,
HT_Renderer::line_pattern_lengths,andHT_Dash_Pattern
HT_Rendition::dash_start_cap,
set_dash_start_cap
Purpose
Controls the type
of beginning cap used for the start of interior dashes.
Synopsis
HT_Line_Cap
dash_start_cap () const
void
set_dash_start_cap (HT_Line_Cap x, HT_Boolean shared = HK_False) alter
Details
This method allows for more exacting control over the
placement of start caps in dashed lines. You can specify a start cap which
is different from the end cap and apply it to a dash in the interior of
the dashed line. It must have one of the enumerated
values defined in the class HT_Line_Cap ¾
Butt,
Round,
Diamond or Square.
For more information on line caps, see the section, "Line
Caps and Joins" in chapter 2, "Heidi Architecture," and class
HT_Line_Cap.
See also
The following are related line and dash cap methods
of class HT_Rendition:
line_cap,
line_start_cap,
line_end_cap,
line_end_cap_solid,
dash_cap,
dash_end_cap;
and, the related line join methods line_join
and line_joins_solid.
HT_Rendition::depth_buffering,
set_depth_buffering
Purpose
Sets or query the current depth buffering attribute
in this rendition object.
Synopsis
HT_Boolean depth_buffering ()
void set_depth_buffering (HT_Boolean x, HT_Boolean shared = HK_False) alter
Details
This method enables or disables the use of depth buffering
(also known as Z buffering) for this renderer.
HT_Rendition::face_displacement,
set_face_displacement
Purpose
Sets or queries the face displacement attribute in this
rendition object
Synopsis
int face_displacement ()
void set_face_displacement (int x, HT_Boolean shared = HK_False) alter
Details
The face displacement is an arbitrary displacement in
the device coordinate Z direction that a Heidi renderer may apply
to filled areas. The application may choose to use a non-zero face displacement
in order to avoid "stitching" problems due to Z-buffer precision limitations
when edges of polygons are drawn in colors distinct from the face color.
HT_Rendition::face_incarnation
Purpose
Queries the face incarnation in this HT_Rendition
object. Not for use by applications.
Synopsis
HT_Incarnation face_incarnation ()
Details
typedef long HT_Incarnation
This value uniquely characterizes the set of values of
all the face attributes in this HT_Rendition object. Any other
HT_Rendition
object with the same value of the face incarnation has the same values
for all the face attributes as this one.
It can be used by drivers to optimize the process of setting
attributes to the hardware. If the incarnation value has not changed, then
the driver may assume that the attributes for this group have not changed
since the last call to this routine.
HT_Rendition::face_pattern,
set_face_pattern
Purpose
Sets or queries the face pattern attribute in this rendition
object.
Synopsis
HT_Face_Pattern face_pattern ()
void set_face_pattern (HT_Fill_Shape const & x, HT_Boolean shared = HK_False) alter
void set_face_pattern (HT_Fill_Pattern const & x, HT_Boolean shared = HK_False) alter
void set_face_pattern (HT_Face_Pattern x, HT_Boolean shared = HK_False) alter
void set_face_pattern (HT_Hatch_Pattern const & x, HT_Boolean shared = HK_False) alter
Details
npattern must have one of the enumerated values
defined in the class HT_Face_Pattern.
The pattern is applied to area fill primitives in the
face contrast color over whatever fill color is determined by the color
attribute or the lighting and shading computation in effect. Solid
means "no pattern", that is, the color covers the filled area completely
and the contrast color is not used. The pattern is
applied as a "decal" in screen space, and is not subject to the transformations
of the pipeline.
In the second form, HT_Fill_Shape refers to the
shape engine. For more informatin see, the fill_shape
method in this class.
In the third form, HT_Fill_Pattern
refers to the user-definable bit map. For more informatin see, the fill_pattern
method in this class.
In the fourth form, HT_Face_Pattern refers to
the enum for built-in patterns.
In the fifth form, HT_Hatch_Pattern
refers to the user-definable, vector-based fill pattern. For more informatin
see, the hatch_pattern method in this class
and HT_Parallel_Line_Set.
See Also
Chapter 2, "Renditions", "Face
Primitive Attributes"
HT_Rendition::fill_pattern
Purpose
Queries the fill pattern attribute in this rendition
object.
Synopsis
HT_Fill_Pattern const & fill_pattern () const
Details
This method queries for the user specified bit map of
a fill pattern defined by HT_Fill_Pattern,
which is called by set_face_pattern,
and is automatically set to User_Defined.
The pattern is applied to area fill primitives in the
face contrast color over whatever fill color is determined by the color
attribute or the lighting and shading computation in effect. Solid
means "no pattern", that is, the color covers the filled area completely
and the contrast color is not used.
The pattern is applied as a "decal" in screen space, and
is not subject to the transformations of the pipeline.
For more information see fill_pattern_offset,
the section "User
Defined Face Patterns," in chapter 2, "Heidi Architecture," and
the honeycomb
fill pattern example.
HT_Rendition::fill_pattern_offset,
set_fill_pattern_offset
Purpose
Sets the fill_pattern to a specified offset.
Synopsis
HT_Int_XY const & fill_pattern_offset () const
void set_fill_pattern_offset (HT_Int_XY const & x, HT_Boolean shared = HK_False) alter
void set_fill_pattern_offset (int x, int y, HT_Boolean shared = HK_False) alter
Details
A Heidi application developer can supply an offset to
control fill patterns ¾ a fill pattern
anchor. Fill patterns are normally offset from the origin of the view ¾
usually
0,0 for AutoCAD. In this case the fill pattern does not follow any subsequent
relocation of the geometry and appears to change within the polygon. The
ability to specify a fill pattern offset allows the pattern to remain fixed
with subsequent polygon offsets so that the user can drag a patterned polygon
on the screen and the pattern moves with the polygon.
For all Heidi drivers that fill in the draw_dc_polygon,
but not the draw_2d_polygon, core Heidi hands over clipped polygons
instead of triangles.
For more information about fill patterns, see the fill_pattern
method and the section "Face
Primitive Attributes," in chapter 2, "Heidi Architecture," and
the honeycomb
fill pattern example.
HT_Rendition::fill_shape
Purpose
Calls a shape engine for area fills.
Synopsis
HT_Fill_Shape const & fill_shape () const
Details
This method returns a fill pattern from a user defined
shape engine, a small custom renderer which can be coded on the fly. Basically
Heidi receives a tag marker that points to the shape engine which contains
an ID number. The shape is then attached to the rendition.
HT_Rendition::fog,
set_fog
Purpose
Sets the treatment of fog lighting and color on the
rendition.
Synopsis
HT_Fog const & fog () const
void set_fog (HT_Fog const & x, HT_Boolean shared = HK_False) alter
Details
For more information, see the section, "Fog,"
in chapter 8, "Lighting and Material Functions," and class HT_Fog.
HT_Rendition::font,
set_font
Purpose
Sets or queries a font on the current rendition
Synopsis
HT_Font font () const
void set_font (HT_Font const & in_font, HT_Boolean shared = HK_False)
Details
Setting the font on the rendition causes the HT_Font_Engine
associated with this rendition object to load the requested font. See HT_Font_Engine
for more details.
HT_Rendition::front_color,
set_front_color
Purpose
Sets or queries the color attribute, in this rendition
object, for the front face of the geometry.
Synopsis
HT_RGB32 const front_color () const
void set_front_color (HT_RGB32 const & x, HT_Boolean shared = HK_False) alter;
void set_front_color (HT_RGB32 const & x, int color_index, HT_Boolean shared = HK_False) alter;
Details
See HT_Rendition::color
for details.
HT_Rendition::front_color_index,
set_front_color_index
Purpose
Sets or queries the color index attribute, in this rendition
object, for the front face of the geometry.
Synopsis
front_color_index () const
HEIDI_API void
set_front_color_index (int x, HT_Boolean shared = HK_False) alter;
Details
See HT_Rendition::color
for details.
HT_Rendition::front_shader,
set_front_shader
Purpose
Queries and sets the shader, in this HT_Rendition
object, for the front face of the geometry.
Synopsis
HT_Shader const &
front_shader () const
void set_front_shader (HT_Shader const & x, HT_Boolean shared = HK_False) alter
Details
See HT_Rendition::shader
for details.
HT_Rendition::handedness,
set_handedness
Purpose
Sets or queries the handedness of the Transform.
Synopsis
HT_Handedness const &
handedness (void) const
HEIDI_API void set_handedness (HT_Handedness const & x, HT_Boolean shared = HK_False)alter
Details
x can be either HT_Handedness::Right or HT_Handedness::Left.
For more information see class HT_Handedness.
HT_Rendition::hard_clip,
set_hard_clip, set_hard_clip_unrestricted
Purpose
Sets or queries the clipping limits in this rendition
object.
Synopsis
HT_Int_Rectangle const & hard_clip ()
void set_hard_clip (int l, int r, int b, int t, HT_Boolean shared = HK_False) alter
void set_hard_clip (HT_Int_Rectangle const & rect, HT_Boolean shared = HK_False) alter;
void set_hard_clip_unrestricted (int l, int r, int b, int t, HT_Boolean shared = HK_False) alter
void set_hard_clip_unrestricted (HT_Int_Rectangle const & rect, HT_Boolean shared = HK_False) alter;
Details
Any part of the drawing which the transformation pipeline
maps outside of the hard clip rectangle is not displayed. For primitives,
which intersect the boundary of the hard clip rectangle, the parts lying
inside the clip rectangle are displayed, the parts lying outside are not.
The first form returns the hard clip rectangle in this
HT_Rendition
object, in integer device coordinates.
The second and third forms set the value of the hard clip
rectangle, in this HT_Rendition object, according to the arguments,
but are restricted to the size of the attached renderer.
The fourth and fifth forms allow the setting of a clip
region that is larger than the viewport in support of virtual boundaries.
See Also
reset_hard_clip,
restrict_hard_clip
For more information on clipping, see the section "Clipping,"
in chapter 2, "Heidi Architecture, The Transformation Pipeline."
HT_Rendition::hatch_pattern
Purpose
Queries the hatch pattern attribute in this rendition
object.
Synopsis
HT_Hatch_Pattern const &
hatch_pattern () const
Details
This method queries for the user specified hatch pattern
defined by HT_Hatch_Pattern,
which is called by set_face_pattern,
and is automatically set to User_Defined.
The pattern is applied to area fill primitives in the
face contrast color over whatever fill color is determined by the color
attribute or the lighting and shading computation in effect.
The pattern is applied as a "decal" in screen space, and
is not subject to the transformations of the pipeline.
See Also
For more information, see the section, "User
Defined Hatch Patterns," in chapter 2, "Heidi Architecture" and
the example code and illustration
in class HT_Hatch_Pattern.
HT_Rendition::HT_Rendition
Purpose
Constructor to initialize declared HT_Rendition
objects.
Synopsis
HT_Rendition ()
HT_Rendition (HT_Renderer const & r)
HT_Rendition (HT_Renderer_Data const * r)
Details
In the second form, a new rendition is initialized as
the default rendition of a renderer.
r points to the HT_Rendererobject
of which this rendition object is initially the default rendition. This
is, typically, what an application or driver does.
The first and third form are rarely used.
HT_Rendition::light,
set_light
Purpose
Sets or queries a light.
Synopsis
HT_Light_Set const & light () const
void
set_light (HT_Light_Set const & x, HT_Boolean shared = HK_False) alter
void
set_light (HT_Filter const & x, HT_Boolean shared = HK_False) alter
void
set_light (void * x, HT_Boolean shared = HK_False) alter
Details
The first form returns a list of lights. The second
sets a list of lights in the rendition. The third sets a single light to
the rendition. The fourth sets lights to null to remove them from the rendition.
HT_Rendition::lighting_interpolation,
set_lighting_interpolation
Purpose
Queries or sets the type of lighting interpolation
Synopsis
HT_Interpolation_Level
lighting_interpolation () const
void
set_lighting_interpolation (HT_Interpolation_Level x, HT_Boolean shared = HK_False)
Details
Note: For the continuation of class HT_Rendition,
go to the line_capmethod.