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)
Since: 5.0
Syntax public double TargetDistance(
bool useFrustumCenterFallback
)
Public Function TargetDistance (
useFrustumCenterFallback As Boolean
) As Double
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:
DoubleShortest 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