Functions | |
void | Compute_Screen_Extent (const char *segment, const char *options, float *left, float *right, float *bottom, float *top) |
void | Compute_Screen_Extent_By_Pat (int count, const HC_KEY *keys, const char *options, float *left, float *right, float *bottom, float *top) |
void | Compute_Screen_Extent_By_Key (HC_KEY segKey, const char *options, float *left, float *right, float *bottom, float *top) |
void Compute_Screen_Extent | ( | const char * | segment, |
const char * | options, | ||
float * | left, | ||
float * | right, | ||
float * | bottom, | ||
float * | top | ||
) |
Calculates a screen-space box that fully encloses the segment referred to by the supplied segment path.
segment | - Name of the segment that the screen extents should be calculated for. |
options | - string of options which can contain the initial visibility settings |
left | - The left coordinate position of the box in window space which wholly enclosed the sepecified segment. Returned to the user. Passed by reference always. |
right | - The right coordinate position of the box in window space which wholly enclosed the sepecified segment. Returned to the user. Passed by reference always. |
bottom | - The bottom coordinate position of the box in window space which wholly enclosed the sepecified segment. Returned to the user. Passed by reference always. |
top | - The top coordinate position of the box in window space which wholly enclosed the sepecified segment. Returned to the user. Passed by reference always. |
This function is used to calculate a tight 2D extents box around a particular segment. A user can use this information to tightly fit a camera to a specified segment or draw a 2D box around the segment. The coordinates are returned to the user in screen space.
Visibility settings in the tree will be honored in the calculation. That is, invisible geometry will not alter the size of the box.
The following options are available for Compute_Screen_Extent:
Changes the net visiblity at the current segment such that it influences the screen extent calculation. Valid values are the same as found in Set_Visibility(). If nothing is set, the calculation uses the current net value on the segment or path.
Sets whether clip regions should be considered when generating the screen extent. The default setting is "ignore clip region = off".
If in perspective mode then the segment should be in front of the camera position to get correct results.
void Compute_Screen_Extent_By_Pat | ( | int | count, |
const HC_KEY * | keys, | ||
const char * | options, | ||
float * | left, | ||
float * | right, | ||
float * | bottom, | ||
float * | top | ||
) |
Similar to Compute_Screen_Extent(), but concatenates the matrices along a segment path rather than the currently open segment.
count | - The size of the keys array. |
keys | - The list of keys starting with the owning segment and following all the way back to the root segment or other desired segment. |
options | - string of options which can contain the initial visibility settings |
left | - The left coordinate position of the box in window space which wholly enclosed the sepecified segment. Returned to the user. Passed by reference always. |
right | - The right coordinate position of the box in window space which wholly enclosed the sepecified segment. Returned to the user. Passed by reference always. |
bottom | - The bottom coordinate position of the box in window space which wholly enclosed the sepecified segment. Returned to the user. Passed by reference always. |
top | - The top coordinate position of the box in window space which wholly enclosed the sepecified segment. Returned to the user. Passed by reference always. |
No additional details. See Compute_Screen_Extent()
void Compute_Screen_Extent_By_Key | ( | HC_KEY | segKey, |
const char * | options, | ||
float * | left, | ||
float * | right, | ||
float * | bottom, | ||
float * | top | ||
) |
Similar to Compute_Screen_Extent(), but operates on an object referenced by an HC_KEY.
segKey | - The key to the segment that the screen extens should be calculated for. |
options | - string of options which can contain the initial visibility settings |
left | - The left coordinate position of the box in window space which wholly enclosed the sepecified segment. Returned to the user. Passed by reference always. |
right | - The right coordinate position of the box in window space which wholly enclosed the sepecified segment. Returned to the user. Passed by reference always. |
bottom | - The bottom coordinate position of the box in window space which wholly enclosed the sepecified segment. Returned to the user. Passed by reference always. |
top | - The top coordinate position of the box in window space which wholly enclosed the sepecified segment. Returned to the user. Passed by reference always. |
No additional details. See Compute_Screen_Extent()