Control_Update

Functions

void Control_Update (const char *segment, const char *options)
 Controls the amount of redrawing for the subsequent update. More...
 
void Control_Update_Area (const char *segment, double left, double right, double bottom, double top, const char *options)
 Similar to Control_Update(), but operates on the objects within a defined window area. More...
 
void Control_Update_Area_By_Key (HC_KEY key, double left, double right, double bottom, double top, const char *options)
 Similar to Control_Update_Area(), but operates on an object referenced by an HC_KEY. More...
 
void Control_Update_By_Key (HC_KEY key, const char *options)
 Similar to Control_Update(), but operates on an object referenced by an HC_KEY. More...
 

Detailed Description

Function Documentation

◆ Control_Update()

void Control_Update ( const char *  segment,
const char *  options 
)

Controls the amount of redrawing for the subsequent update.

Parameters
segment- Segment(s) to be controlled. Can contain wildcards.
options- Specification of the level of update desired.
Supported Options:
bounding volume retention, clear interesting, compile only, compute bounding volume, mark interesting, redraw everything, redraw geometry, redraw partial erase, refresh, set created, set cut geometry regeneration, set derived geometry regeneration, set hidden line regeneration, set shadow regeneration, set static model regeneration, unset redraw

DETAILS

Normally, when you make a change to the HOOPS tree (by deleting geometry, moving objects, etc.) HOOPS marks the modified segments as requiring a redraw. At the next Update_Display() or equivalent call, HOOPS traverses the list of segments requiring redraws. Then HOOPS either overlays the changes on top of the existing scene (Incremental Updates), or erases and redraws the windows in which changes were made (in cases where incremental updates are not legal). The end result is that after the Update_Display() call, the picture on the screen matches the picture described by the HOOPS tree. "Update Interrupts" allow an update to be interrupted and later modified. For example, the user could change the camera angle half way through an update. But eventually HOOPS will start redrawing the scene again until it arrives at a picture matching the most recent database.

Sometimes you might not want the screen to exactly match the HOOPS tree in order to reduce screen redrawing. For instance, when performing a complex hidden surfaced drawing the user might want to abort the update altogether (leading to an incorrect, half drawn picture). The user might want to work with the half-drawn image, then later force a full update.

Control_Update() allows an application to control the amount of redrawing that HOOPS undertakes on the next update (by setting or clearing internal segment and geometry flags). The options parameter to Control_Update() can include a comma-separated list of the following:


[no] bounding volume retention | [no] bounding retention

Requests that HOOPS keep bounding volume from update to update. This is the default. There might be circumstances where the bounding volume is only appropriate for a single update, in which case there is no need to retain it.

clear interesting

Clears the "interesting bit" for the specified segment or geometry. This is only of use to HOOPS I.M. users.

compile only

When static model is enabled, an update is actually a two step process, broadly speaking:

Step 1: If necessary, generate the static model.

Step 2: Draw using the static model information.

The "compile only" option requests that HOOPS only perform step 1, which is the static model generation portion of an update. No actual drawing will occur. Whether or not it is "necessary" to generate the static model is somewhat complicated. The static model data must be missing, or out of date, AND this must be the second update since the last change (this is to prevent thrashing, if the scene is changing - in other words, not static).

Static model generation is an expensive operation. You should avoid doing it unless you have to. But in those cases when you know it must be done, you might want to choose when it is done so you can minimize or mask the performance hit. Breaking up the steps of an expensive update could help do that.

We recommend that you use this option only if you have display lists set to segment and/or static model enabled. This option is mainly used for debugging and in most cases you wouldn't need to use it.

This option is only available for DX11 and OpenGL2.

compute bounding volume[s]

Requests that HOOPS current bounding volume be recalculated. This is useful when geometry has been deleted or moved. By default, bounding volumes are kept up to date with the database. However, the volumes increase in size only as necessary. This option can be used to recompute the bounding volume independent of an increase or decrease in size.

mark interesting

Sets the "interesting bit" for the specified segment or geometry. This is only of use to HOOPS I.M. users.

redraw everything | redraw geometry | redraw partial erase

These options tell HOOPS to flag a segment or a primitive so it will be drawn during the next update. It makes sense to use only one of these options, where each option describes how the redraw will occur.

"Redraw everything" indicates that for each segment and primitive specified, the entire containing window should be erased and completely redrawn (a full scene refresh).

"Redraw geometry" indicates that the specified segments or primitives need to be drawn, but the rest of the scene can be left alone, if possible. (No window clear, just the specified geometry redraws).

"Redraw partial erase" is the same as "redraw geometry" but uses partial erase methods where possible. You must also use Set_Heuristics ('partial erase') for this to take effect.

refresh

This option tells HOOPS to pull the back buffer onto the screen. This is a useful way to update the screen after an expose event like when a window that was occluding your scene is moved away.

set created

Treats the segment as if the contents had just been inserted after the previous update.

set cut geometry regeneration | unset cut geometry regeneration

Forces 3dGS to ignore it's internal update flags and either completely regenerate or leave the cutting geometry as it currently is.

set derived geometry regeneration | unset derived geometry regeneration

Forces 3dGS to ignore it's internal update flags and either completely regenerate or leave the derived geometry as it currently is. Derived geometry consists of shadows and cut geometry.

set hidden line regeneration | unset hidden line regeneration

Forces HOOPS to ignore its internal update flags, and either completely regenerate or leave the hidden line geometry as is. This option only applies when the hidden surface removal algorithm is set to "hidden line".

set shadow regeneration | unset shadow regeneration

Forces 3dGS to ignore it's internal update flags and either completely regenerate or leave the shadow as it currently is. Derived geometry consists of shadows and cut geometry.
set static model regeneration | unset static model regeneration

Forces 3dGS to regenerate the internal static model or leave it as is during the next call to Update_Display().

unset redraw

Clears the redraw bits for the specified segments informing HOOPS that nothing needs to be redrawn.

NOTES

When using these routines, the application is taking major responsibility for the resulting picture, and how it is drawn. Use of these functions can easily lead to code that is hard to understand and maintain. These functions should be used sparingly, or not at all.

To take full control (and responsibility) of HOOPS redraw traversal, specify "no update control" with the Define_System_Options() routine.

Areas can be ignored when they are not meaningful for a given set of options.

Control_Update() replaces and extends the functionality of the Mark_As_Updated() and Mark_As_Refresh_Needed() routines.

RESTRICTIONS

See also
Define_System_Options, Update_Display.

◆ Control_Update_Area()

void Control_Update_Area ( const char *  segment,
double  left,
double  right,
double  bottom,
double  top,
const char *  options 
)

Similar to Control_Update(), but operates on the objects within a defined window area.

Parameters
segment- Segment(s) to be controlled. Can contain wildcards.
left- Window coordinates, (e.g. -1.0, 1.0, -1.0, 1.0) of the area
right-
bottom-
top-
options- Specification of the level of update desired.

DETAILS

No additional details. See Control_Update()

◆ Control_Update_Area_By_Key()

void Control_Update_Area_By_Key ( HC_KEY  key,
double  left,
double  right,
double  bottom,
double  top,
const char *  options 
)

Similar to Control_Update_Area(), but operates on an object referenced by an HC_KEY.

Parameters
key- Key of the segment or geometry to be controlled.
left- Window coordinates, (e.g. -1.0, 1.0, -1.0, 1.0) of the area
right-
bottom-
top-
options- Specification of the level of update desired.

DETAILS

No additional details. See Control_Update()

◆ Control_Update_By_Key()

void Control_Update_By_Key ( HC_KEY  key,
const char *  options 
)

Similar to Control_Update(), but operates on an object referenced by an HC_KEY.

Parameters
key- Key of the segment or geometry to be controlled.
options- Specification of the level of update desired.

DETAILS

No additional details. See Control_Update()