Functions
Define_Highlight

Functions

void Define_Highlight (int count, const HC_KEY *keys, const char *style, const char *options)
 Specifies a method of highlighting an item. More...
 
int UnDefine_Highlight (int count, const HC_KEY *keys, const char *style, const char *options)
 UnDefines an existing highlight. More...
 

Detailed Description

Function Documentation

void Define_Highlight ( int  count,
const HC_KEY keys,
const char *  style,
const char *  options 
)

Specifies a method of highlighting an item.

Parameters
count- Length of 'keys' array in parameter 2
keys- An array of HC_KEYs defining an unambiguous path to the highlighted object
style- The named style to apply to the specified item, set by Define_Named_Style
options- Options to control the behavior of the function

DETAILS

Highlighting an item in the HOOPS scene-graph involves having an entity/segment redrawn with a particular set of attributes. Define_Highlight allows you to apply a named style to an entity or segment, thus causing it to be drawn with that style during the next update.

When a segment-tree is highlighted, it will highlight both subsegments and included segments.

The following choices for options are recognized:

[no] segment only Indicates that the highlight only applies to the geometry in the specified segment, and will not apply to any subsegments. The default is "no segment only" This option only applies if the key path ends with a segment.

quick moves = [overlay | spriting | off]

  • Overlay The highlighted items will be rendered on top of the scene and ignore the scene’s z-values. Refer to the full details in the ‘quick moves’ section.

  • Spriting The highlighted items will be rendered into the scene with z-values. Refer to the full details in the ‘quick moves’ section.

  • Off The highlighted item will be rendered in the scene with its style as if the attribute had been changed directly in the tree. The general redraw rules for attributes will apply to any items modified by the style.

RESTRICTIONS

Highlighted items will be drawn using geometry display lists (segment-level display lists are not currently used). Line-type geometry such as lines, polylines and fixed-tessellation NURBS curves will be drawn in immediate mode. Non-highlighted items in segments with items highlighted with ‘quick moves = off’, are subject to the same limitations.

See also
UnDefine_Highlight, Define_Geometry_Highlight
int UnDefine_Highlight ( int  count,
const HC_KEY keys,
const char *  style,
const char *  options 
)

UnDefines an existing highlight.

Parameters
count- Length of 'keys' array in parameter 2
keys- An array of HC_KEYs defining an unambiguous path to the highlighted object
style- The named style to undefine on the specified item, set by Define_Named_Style
options- Options to control the behavior of the function

DETAILS

If a style is specified, then only that style will be removed, based on the options. If a style is not specified, then all styles that apply to the matched key-path and options will be removed.

The following choices for options are recognized:

  • Exact - Only removes the highlights along the specified path.

  • Segment - Only removes segment and segment-tree highlights.

  • Geometry - Only removes geometry highlights.

  • Everything - Removes segment and geometry highlights.

The default is ‘exact’.

See Define_Highlight()