void SetNearClippingDistance( float Distance );


Distance Specifies the distance from the eye point to the near clipping plane. This value can be DEFAULT_CLIPPING, in this case the FitAllInfo (if provided) is used to set the clipping distance during scene navigation (in UpdateViewProjection method). If FitAllInfo is not set, the default far clipping distance is returned.


The SetNearClippingDistance specifies the near clipping plane distance from the eye point . See the OpenGLís glOrtho and glFrustrum function references for more information about near and far clipping planes.

By setting clipping discances manually using SetNearClippingDistance and SetFarClippigDistance functions ClassGL no longer computes the clipping distances automatically using scene boundary information passed by the SetFitAllInfo function. Therefore if you move around your scene you might need to call the SetNearClippingDistance and SetFarSlippingDistance functions while rendering each frame.

If far clipping distance or near clipping distance is set to DEFAULT_CLIPPING then ClassGL computes near and far clipping distances automatically using information passed by the SetFitAllInfo function. If eye-point is inside scene then ClassGL computes near clipping plane distance as your-scene-radius divided by the NearClipDistanceRatio ClassGL-parameter. If camera is not inside scene then ClassGL computes the near clipping plane distance is calculated as distance to your scene center minus scene radius.

Important: You must also set the far clipping distance using SetFarClippingDistance function to value other than DEFAULT_CLIPPING in order to make the SetNearClippingDistance work.

See Also

GetNearClippingDistance, SetFarClippingDistance, GetFarClippingDistance, OnCreate, OnSize, SetFitAllInfo