ViewportInfoChangeToPerspectiveProjection Method |
Use this function to change projections of valid viewports
from parallel to perspective. It will make common additional
adjustments to the frustum and camera location so the resulting
views are similar. The camera direction and target point are
not changed.
If the current projection is perspective and symmetricFrustum,
IsFrustumIsLeftRightSymmetric, and IsFrustumIsTopBottomSymmetric
are all equal, then no changes are made and true is returned.
Namespace:
Rhino.DocObjects
Assembly:
RhinoCommon (in RhinoCommon.dll)
Since: 5.0
Syntax public bool ChangeToPerspectiveProjection(
double targetDistance,
bool symmetricFrustum,
double lensLength
)
Public Function ChangeToPerspectiveProjection (
targetDistance As Double,
symmetricFrustum As Boolean,
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.
- symmetricFrustum
- Type: SystemBoolean
true if you want the resulting frustum to be symmetric.
- 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:
Booleantrue if the operation succeeded; otherwise, false.
See Also