Functions | |
void | Control_Update (const char *segment, const char *options) |
void | Control_Update_By_Key (HC_KEY key, const char *options) |
void | Control_Update_Area (const char *segment, double left, double right, double bottom, double top, const char *options) |
void | Control_Update_Area_By_Key (HC_KEY key, double left, double right, double bottom, double top, const char *options) |
void Control_Update | ( | const char * | segment, |
const char * | options | ||
) |
Controls the amount of redrawing for the subsequent update.
segment | - Segment(s) to be controlled. Can contain wildcards. |
options | - Specification of the level of update desired. |
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.
Clears the "interesting bit" for the specified segment or geometry. This is only of use to HOOPS I.M. users.
Requests that HOOPS only perform draw preparations in the next update. No acutal drawing will occur. We recommend that you use this option only if you have display lists set to segment and/or static model enabled. Note that this option is only available for DX9, OpenGL and OpenGL2.
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.
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.
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.
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().
Clears the redraw bits for the specified segments informing HOOPS that nothing needs to be redrawn.
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.
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.
key | - Key of the segment or geometry to be controlled. |
options | - Specification of the level of update desired. |
No additional details. See Control_Update()
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.
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. |
No additional details. See Control_Update()
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.
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. |
No additional details. See Control_Update()