Click or drag to resize

ViewportInfoSetFrustumNearFar Method (Double, Double, Double, Double, Double)

Sets near and far clipping distance subject to constraints.

Namespace:  Rhino.DocObjects
Assembly:  RhinoCommon (in RhinoCommon.dll)
Syntax
public bool SetFrustumNearFar(
	double nearDistance,
	double farDistance,
	double minNearDistance,
	double minNearOverFar,
	double targetDistance
)

Parameters

nearDistance
Type: SystemDouble
(>0) desired near clipping distance.
farDistance
Type: SystemDouble
(>near_dist) desired near clipping distance.
minNearDistance
Type: SystemDouble
If min_near_dist <= 0.0, it is ignored. If min_near_dist > 0 and near_dist < min_near_dist, then the frustum's near_dist will be increased to min_near_dist.
minNearOverFar
Type: SystemDouble
If min_near_over_far <= 0.0, it is ignored. If near_dist < far_dist*min_near_over_far, then near_dist is increased and/or far_dist is decreased so that near_dist = far_dist*min_near_over_far. If near_dist < target_dist < far_dist, then near_dist near_dist is increased and far_dist is decreased so that projection precision will be good at target_dist. Otherwise, near_dist is simply set to far_dist*min_near_over_far.
targetDistance
Type: SystemDouble
If target_dist <= 0.0, it is ignored. If target_dist > 0, it is used as described in the description of the min_near_over_far parameter.

Return Value

Type: Boolean
true if operation succeeded; otherwise, false.
Version Information

Rhino for Mac

Supported in: 5.4

Rhino for Windows

Supported in: 6.6
See Also