RhinoViewportChangeToTwoPointPerspectiveProjection Method (Double, Vector3d, Double) |
Use this function to change projections of valid viewports
to a two point perspective. It will make common additional
adjustments to the frustum and camera location and direction
so the resulting views are similar.
Namespace:
Rhino.Display
Assembly:
RhinoCommon (in RhinoCommon.dll)
Since: 6.0
Syntax public bool ChangeToTwoPointPerspectiveProjection(
double targetDistance,
Vector3d up,
double lensLength
)
Public Function ChangeToTwoPointPerspectiveProjection (
targetDistance As Double,
up As Vector3d,
lensLength As Double
) As Boolean
Parameters
- targetDistance
- Type: SystemDouble
If RhinoMath.UnsetValue this parameter is ignored. Otherwise it must be > 0 and indicates
which plane in the current view frustum should be preserved.
- up
- Type: Rhino.GeometryVector3d
This direction will be the locked up direction. Pass
ON_3dVector::ZeroVector if you want to use the world axis
direction that is closest to the current up direction.
Pass CameraY() if you want to preserve the current up direction.
- lensLength
- Type: SystemDouble
(pass 50.0 when in doubt) 35 mm lens length to use when changing from parallel to perspective
projections. If the current projection is perspective or lens_length is <= 0.0, then
this parameter is ignored.
Return Value
Type:
Boolean
If the current projection is perspective and bSymmetricFrustum, FrustumIsLeftRightSymmetric()
and FrustumIsTopBottomSymmetric() are all equal, then no changes are made and true is returned.
See Also