Click or drag to resize

PerspectiveCameraZoomByGettingCloserToTarget Method

Zooms the view by moving the camera along the straigth line between camera and target position closer to the target, and then slightly rotate the camera so that the relative screen points rx and ry are matched before and after the zooming (for a point at the plane at camera distance). The target position itself is kept.

Namespace: Altaxo.Graph.Graph3D.Camera
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public PerspectiveCamera ZoomByGettingCloserToTarget(
	double distanceFactor,
	double rx,
	double ry,
	double aspectRatio
)

Parameters

distanceFactor  Double
The factor by which the distance is multiplied to get the new distance. Must be greater than zero. Values less than 1 means zoom in, values greater than one zoom out.
rx  Double
The x component of the relative screen coordinate of the screen point which should afterwards show the same object (at target distance). Is a value in interval [-1,1].
ry  Double
The y component of the relative screen coordinate of the screen point which should afterwards show the same object (at target distance). Is a value in interval [-1,1].
aspectRatio  Double
The aspect ratio of the screen (y/x).

Return Value

PerspectiveCamera
A new camera with another distance to the target, determined by parameter distanceFactor.
See Also