Click or drag to resize
ViewportInfoTargetDistance Method
Gets the distance from the target point to the camera plane. Note that if the frustum is not symmetric, then this distance is shorter than the distance from the target to the camera location.

Namespace: Rhino.DocObjects
Assembly: RhinoCommon (in RhinoCommon.dll) Version: 5.1.50000.0 (5.0.20693.0)
Syntax
public double TargetDistance(
	bool useFrustumCenterFallback
)

Parameters

useFrustumCenterFallback
Type: SystemBoolean
If bUseFrustumCenterFallback is false and the target point is not valid, then ON_UNSET_VALUE is returned. If bUseFrustumCenterFallback is true and the frustum is valid and current target point is not valid or is behind the camera, then 0.5*(near + far) is returned.

Return Value

Type: Double
Shortest signed distance from camera plane to target point. If the target point is on the visible side of the camera, a positive value is returned. ON_UNSET_VALUE is returned when the input of view is not valid.
See Also