ViewportInfoChangeToTwoPointPerspectiveProjection Method |
Changes 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.
If the current projection is perspective and
IsFrustumIsLeftRightSymmetric is true and
IsFrustumIsTopBottomSymmetric is false, then no changes are
made and true is returned.
Namespace:
Rhino.DocObjects
Assembly:
RhinoCommon (in RhinoCommon.dll)
Since: 5.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
The locked up direction. Pass Vector3d.Zero 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:
Booleantrue if the operation succeeded; otherwise, false.
See Also