Functions | |
int | QShow_Existence (const char *segment, const char *filter) |
Similar to Show_Existence(), but operates on a given segment rather than the currently open one. More... | |
int | QShow_Existence_Unicode (const char *segment, unsigned short const *filter) |
Similar to Show_Existence_Unicode(), but operates on a given segment rather than the currently open one. More... | |
int | Show_Existence (const char *filter) |
A utility routine to determine how much of something exists within a segment, or if it exists at all. More... | |
int | Show_Existence_By_Key (HC_KEY key, const char *filter) |
Similar to Show_Existence(), but operates on an object referenced by an HC_KEY. More... | |
int | Show_Existence_Unicode (unsigned short const *filter) |
A utility routine used to determine whether one or more unicode user options exist within a segment. More... | |
int | Show_Existence_Unicode_By_Key (HC_KEY key, unsigned short const *filter) |
Similar to Show_Existence_Unicode(), but operates on an object referenced by an HC_KEY. More... | |
int QShow_Existence | ( | const char * | segment, |
const char * | filter | ||
) |
Similar to Show_Existence(), but operates on a given segment rather than the currently open one.
segment | - Name of the segment(s) in which to search. Can include wildcards, multiple segments, etc. |
filter | - List of the types of objects to be queried. |
The segment parameter can take a number of valid segment name specifications including aliases, wildcards, and paths, as explained in the HOOPS/3dGS programming guide section 1.2.6 "Segment-Name Syntax". The following examples are valid usages:
int QShow_Existence_Unicode | ( | const char * | segment, |
unsigned short const * | filter | ||
) |
Similar to Show_Existence_Unicode(), but operates on a given segment rather than the currently open one.
segment | - Name of the segment(s) in which to search. Can include wildcards, multiple segments, etc. |
filter | - List of the types of objects to query. |
No additional details. See Show_Existence_Unicode()
int Show_Existence | ( | const char * | filter | ) |
A utility routine to determine how much of something exists within a segment, or if it exists at all.
filter | - List of the types of objects to query. |
Show_Existence() takes a look at the types of entities named by filter that exist immediately within the segment(s) named, and returns a count of the total.
The Show_(Attribute) routines may complain if they are called on a segment that doesn't have the attribute set. Instead, Show_Existence can be quickly used to test for the attribute's existence. If a "1" is returned, the attribute is set on the segment, and the Show_(Attribute) call is safe.
If filter is equal to the special value "self", Show_Existence() tells whether there is any open segment, and is equivalent to the following:
Begin_Segment_Search (segment) Show_Segment_Count (&count) End_Segment_Search ()
That is, it counts the number of segments, matching the specification string segment (which can contain wildcards) if any such segment exists.
If filter is anything else, Show_Existence() and QShow_Existence() are equivalent to the following:
Begin_Contents_Search (segment, filter) Show_Contents_Count (&count) End_Contents_Search ()
That is, they count the number of such items within segment or within the currently-open segment. Count is then returned as the function value.
As in Begin_Contents_Search(), filter is of the form "type, type", where each type is one of the following:
Note that a filter equal to "segment" returns the number of segments within the segment, as opposed to a "self" search, which returns the number of segments similar to segment.
Show_Existence_By_Key() is almost identical to Show_Existence(), except that the "self" operator is slightly different. If the key is non-negative (i.e., the key value was set with Renumber_Key() ), the "self" operator signifies whether or not the key refers to a valid HOOPS object. This works even if the key refers to something besides a segment. However, if the key is negative, then it is a direct memory reference and it becomes too dangerous to test to see whether it still exists. In this case, Show_Existence_By_Key() will just complain and return.
Additional types (meanings should be self-explanatory) accepted by this function are: "distant light", "local light", "spot light", "area light","includer","styler","style","color","callback","camera","clip region","handedness","selectability","visibility", "window","window frame","color map","driver","driver options","edge pattern","edge weight","face pattern","heuristics","line pattern","line weight","marker size", "marker symbol","metafile","modelling matrix","rendering options","text alignment","text font","text path","text spacing","texture matrix","user value","window pattern", "texture definition","local texture","glyph definition","line pattern definition","line style definition","condition","streaming mode","circle","circular arc", "circular chord","circular wedge","cutting plane","cutting section","light","ellipse","elliptical arc","grid","line","marker","mesh","image","pixel array","polyline", "polygon","shell","string cursor","text","nurbs curve","nurbs surface","cylinder","polycylinder","sphere","include" and "reference geometry".
Users can query the suboption settings for specific geometries by using an "=" sign. For example, to query the existence of a transparency color setting on faces, use Show_Existence("color=(faces=transmission)").
int Show_Existence_By_Key | ( | HC_KEY | key, |
const char * | filter | ||
) |
Similar to Show_Existence(), but operates on an object referenced by an HC_KEY.
key | - A key previously returned from a "K" routine, or a renumbered key. |
filter | - List of the types of objects to query. |
No additional details. See Show_Existence()
int Show_Existence_Unicode | ( | unsigned short const * | filter | ) |
A utility routine used to determine whether one or more unicode user options exist within a segment.
filter | - List of the types of objects to query. |
This function allows the user to query the existence of unicode user options in a particular segment. It is similar to Show_Existence(), except that filter accepts a unicode value in the fashion "user option = unicode name".
This function can be used only to query the existence of user options set with unicode values. If used to query options with any other encoding, HOOPS will return an error.
int Show_Existence_Unicode_By_Key | ( | HC_KEY | key, |
unsigned short const * | filter | ||
) |
Similar to Show_Existence_Unicode(), but operates on an object referenced by an HC_KEY.
key | - A key previously returned from a "K" routine, or a renumbered key. |
filter | - List of the types of objects to query. |
No additional details. See Show_Existence_Unicode()