Functions | |
void | Set_Visibility (const char *list) |
void | UnSet_Visibility (void) |
void | UnSet_One_Visibility (const char *which) |
void Set_Visibility | ( | const char * | list | ) |
Allows another level of control in determining whether a segment is visible. Useful for flicking graphics on and off without disturbing their place in the segment tree.
list | - A quoted string or a string variable containing a list of the desired settings (see below). |
You can specify "on" or "off" for Visibility, or you can go into detail. The following choices are recognized:
cutting plane=on/off
"Cutting plane=off" will turn off any cutting planes within its scope, however, lights are exempted from the cutting action. If "cutting planes" visibility is "off" for a branch of the tree, a cutting plane set elsewhere in the segment tree will not affect the geometry in this part of the tree.
Toggles visibility of cutting lines in shells and meshes. The visibility of cutting planes needs to be "on" in order for cutting lines to be visible. Default visibility is "on".
cut geometry = on/off
cut geometry = (faces=on/off, edges=on/off)
Sets visibility of cutting geometry. See also the cut geometry options in Set_Rendering_Options and Set_Color. Default is "cut geometry = on".
edges=on/off/<special edge options>
The edges of filled figures (polygons, circles, ellipses, shells, and meshes) will be [will not be] drawn."Special edge options" are available for shells and meshes. See below for details.
The default is "edges=on". As with the regular visibilities the phrase "=on" can be omitted, and a "no" in front ("no perimeters") can replace an "=off". If more than one suboption is named they should be separated by commas and surrounded by parentheses, and the last in the list takes precedence. For example, "edges=(off, perimeters, interior silhouettes)" turns two suboptions on and the other two off.
Note that local edge visibility settings (achieved with Open_Edge() --- Set_Visibility() --- Close_Edge() ) will always take precedence over the segment edge visibility setting. Also, "on," "off" and the special options are the only choices permitted within an individual open edge (in the present implementation.) The default is "edges=on".
<Special Edge Options>
Within the "edge" visibility item you can specify "on" or "off" or you can go into detail---there are a number of suboptions available. Each edge visibility suboption is set and unset separately; each suboption inherits down the segment tree separately. The following choices are recognized:
The interior parts of filled figures (polygons, circles, ellipses, shells, and meshes) will be [will not be] drawn. When edges are on and faces are off you get a skeleton of the object.
Note that local face visibility settings (achieved with Open_Face() --- Set_Visibility() --- Close_Face() ) will always take precedence over the segment face visibility setting. Also, "on" and "off" are the only choices permitted within an individual open face (in the present implementation.) The default is "faces=on".
Specifying "geometry" is the same as specifying edges, faces, lines, markers, images, polygons, cutting planes, lights and text all at once.
images=on/off
Images will be [will not be] visible.
lighting=on/off/(edges = on/off)/(faces = on/off)
"Lighting=off" will turn off any light sources within its scope. It also has the property of preventing light sources elsewhere in the segment tree from shining on the geometry in this part of the tree. In addition to specifying lighting visibility for the entire scene, you can individually determine if lighting affects the faces and/or edges of HOOPS shell and mesh primitives.
lights=on/off/(edges = on/off)/(faces = on/off)
"Lights" and "lighting" are the same.
Lines and polylines will be [will not be] visible.
Shell vertex markers will be [will not be] visible.
Markers will be [will not be] visible.
Calling HC_Set_Visibility ("markers = on") is all-inclusive in that it will affect both the visibility of 'vertex' markers at shell/mesh vertices, as well as 'regular' markers (those denoted by Insert_Marker() ). Calling Set_Visibility("markers only = [on/off]") controls just the 'regular' markers and has no affect on the 'vertex' markers.
Note that local marker visibility settings (achieved with Open_Vertex() --- Set_Visibility() --- Close_Vertex() ) will always take precedence over the segment marker visibility setting. Also please note that "on" and "off" are the only choices permitted within an individual open vertex (in the present implementation.) The default is "markers=on".
off (or everything=off) Unless a lower-level segment specifies differently, nothing---neither geometry nor windows---will be eligible to be drawn on the screen.
on (or everything=on) Windows and all kinds of geometry will be visible.
Both edges and faces will be [will not be] drawn in.
Lines and polylines will be [will not be] visible. "Lines" is a synonym for "polylines" here.
shadows = [(option, option, ...)]
The "shadows" visibility option allows the user to control the effect that certain lights and geometry have on shadows. Legal choices for option are as follows:
NOTE: this setting is effective only when the shadow map = on Rendering_Option is set. There are also restrictions of what objects can or cannot cast shadows under certain conditions.
string cursors=on/off
String cursors will be [will not be] visible.
text=on/off
Text strings will be [will not be] visible.
windows=on/off
Windows declared at this level or deeper will be [will not be] visible.
If you want to list more than one choice, separate them by commas inside your quoted string: "windows=on, faces=off, markers=off". The "s" on the end of "markers", "faces", etc., is optional. Blanks around equals signs and around commas are also optional. Uppercase versus lowercase does not matter.
Using the "everything" choice is equivalent to setting all of the "particular flavor" choices simultaneously. In terms of the segment tree, there is nothing special about setting everything: each individual setting---edge visibility, text visibility, etc.---always inherits independently up and down the tree.
You can mix a general choice with particular choices: "everything=on, images =off", for example, will result in everything being visible except images. The rule is that whatever specification comes last in the list wins.
Like all HOOPS on or off attributes, Visibility is three-valued: it can be set explicitly "on" for a segment, it can be set explicitly "off" for a segment, or not set at all and inherited from the owning segment. To allow the full benefit of the inheriting of Visibility---which is really the inheriting of in visibility---your programs will probably work better if you use an "UnSet Visibility" rather than a "Set (on)" to cancel a "Set (off)". Visibility "on" should rarely be used.
When you call UnSet_Visibility() , all the visibilities in the segment are thrown away. Use UnSet_One_Visibility() to discard the setting for one without disturbing the rest.
void UnSet_Visibility | ( | void | ) |
Removes all settings established by a previous call to Set_Visibility().
void UnSet_One_Visibility | ( | const char * | which | ) |
Removes a given setting established by a previous call to Set_Visibility(), rather than all settings.
which | - A particular visibility to be unset. |