Functions | |
void | Show_Key_Status (HC_KEY key, char *status) |
Helps to maintain lists of valid keys. More... | |
void | Show_Key_Type (HC_KEY key, char *type) |
Returns the type of object referenced by a key. More... | |
void Show_Key_Status | ( | HC_KEY | key, |
char * | status | ||
) |
Helps to maintain lists of valid keys.
key | - Numeric identifier pointing to an object in the database. The key must be valid. If the key is not valid, the result will be random, and unstable behavior may result. |
status | - valid: key has not been renumbered. global: key has been globally renumbered. local: key has been locally renumbered. Returned to caller. Passed by reference always. |
This function can be used to indicate whether a key has been locally or globally renumbered. It should ONLY be called on keys that are known to be valid. For example, it cannot be used to check the status of a key that may have been deleted, as that could lead to unstable behavior or a crash.
void Show_Key_Type | ( | HC_KEY | key, |
char * | type | ||
) |
Returns the type of object referenced by a key.
key | - Unique numeric identifier pointing to an object in the database. |
type | - Classification of object referenced by key. Returned to caller. Passed by reference always. |
You can find out what kind of object was chosen in a Show_Selection_Element() operation, or found by a Begin_Contents_Search(), or added to the database in a previous Insert or Open_Segment() by using this command.
The type returned can be either geometry or one of the various segment or include types.
The following is a table of geometry types that can be returned:
circle | circular arc | circular chord | circular wedge |
circular plane | circular section | cylinder | ellipse |
elliptical arc | grid | image | line |
area light | distant light | local light | spot light |
marker | mesh | cylinder | nurbs curve |
nurbs surface | polygon | polyline | polycylinder |
shell | sphere | text |
The following is a table of segment types that can be returned:
segment | include | reference geometry | style |
Given the type returned by this function, you can use a Show routine such as Show_Line() to determine the details of the geometry, or Show_Segment() to determine the name of the segment pointed to by key. The status field can be valid (normal), local or global (renumbered).
If key is invalid, unpredictable results will ensue. Don't rely on HOOPS being able to protect you from invalid keys.