HC_Set_Camera_Near_Limit

void HC_Set_Camera_Near_Limit(double wlimit)

Controls the near camera plane setting.

This function allows you to set the near clipping plane. A value approaching 0.0 will place it near the camera position (potentially at the cost of poor z-buffer precision), whereas a value approaching 1.0 will place it near the camera target (at the cost of clipping away anything closer than the target). A value exactly equal to 0 will let HOOPS automatically choose a “wlimit” based on the scene boundings.

DETAILS

If “wlimit” is negative, the near clipping plane will be automatically adjusted as close to the camera target as possible, with a minimum of an absolute value of the provided number. Note that the default near limit is negative, and therefore automatic adjustment is on by default.

General usage should set the value as high as possible to improve Z buffer allocation as long as it doesn’t clip away geometry. Architectural walk-throughs will probably want to use values near the default, while geometric modelling may work well with values in the 0.2 to 0.5 range. In other words, if developers have data that is fully enclosed within the camera frustum, higher near limits are often appropriate. Conversely, if developers are navigating in and around the objects of interest, lower near limits may be needed to avoid near-plane clipping.

NOTES

For orthographic cameras, Set_Camera_Near_Limit can behave differently for 3D drivers (such as DX11 and OpenGL2) than for software drivers (such as MSW). If objects lie outside the orthographic view frustum for 3D drivers, they will be clipped, but they may not be for software drivers. To get consistent behavior, all geometry a user wants drawn should be inside the view frustum.

See also

HC_Set_Camera, HC_Show_Bounding_Info, HC_UnSet_Bounding_Volume, HC_Define_System_Options

Parameters

wlimit – A parametric value from 0.0 at the camera to 1.0 at the target. If 0.0 or negated, the value has special meaning (see details). Default is -0.001.