ViewportInfo.GetBoundingBoxDepth Method

ViewportInfoGetBoundingBoxDepth Method

Gets near and far clipping distances of a bounding box. This function ignores the current value of the viewport's near and far settings. If the viewport is a perspective projection, the it intersects the semi infinite frustum volume with the bounding box and returns the near and far distances of the intersection. If the viewport is a parallel projection, it instersects the infinte view region with the bounding box and returns the near and far distances of the projection.

Namespace:  Rhino.DocObjects
Assembly:  RhinoCommon (in RhinoCommon.dll)
Syntax
public bool GetBoundingBoxDepth(
	BoundingBox bbox,
	out double nearDistance,
	out double farDistance
)
Public Function GetBoundingBoxDepth ( 
	bbox As BoundingBox,
	<OutAttribute> ByRef nearDistance As Double,
	<OutAttribute> ByRef farDistance As Double
) As Boolean

Parameters

bbox
Type: Rhino.GeometryBoundingBox
The bounding box to sample.
nearDistance
Type: SystemDouble
Near distance of the box. This value can be zero or negative when the camera location is inside bbox.
farDistance
Type: SystemDouble
Far distance of the box. This value can be equal to near_dist, zero or negative when the camera location is in front of the bounding box.

Return Value

Type: Boolean
true if the bounding box intersects the view frustum and near_dist/far_dist were set. false if the bounding box does not intesect the view frustum.
Version Information

Rhino for Mac

Supported in: 5.4

Rhino for Windows

Supported in: 6.8
See Also