HC_Compute_Screen_Extent

bool HC_Compute_Screen_Extent(char const *segment, char const *options, float *left, float *right, float *bottom, float *top)
bool HC_Compute_Screen_Extent(char const segment, char const 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.

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:

visibility = [options]

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.

ignore clip region = (on/off)

Sets whether clip regions should be considered when generating the screen extent. The default setting is “ignore clip region = off”.

HC_Set_Visibility

Parameters

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.

Returns

success