Takes the current camera and sends back a modified camera with the same angle but with the item(s) centered in the view

Namespace: Ico.Gwx
Assembly: Gwx3DControl (in Gwx3DControl.dll) Version: 10.97.212.0 (10.97.212.00)

Syntax

C#
public void GetCenteredCamera(
	Object[] items,
	Camera currentCamera,
	double displayWidth,
	double displayHeight,
	out Camera newCamera,
	out Point3D center
)
Visual Basic
Public Sub GetCenteredCamera ( _
	items As Object(), _
	currentCamera As Camera, _
	displayWidth As Double, _
	displayHeight As Double, _
	<OutAttribute> ByRef newCamera As Camera, _
	<OutAttribute> ByRef center As Point3D _
)
JScript
public function GetCenteredCamera(
	items : Object[], 
	currentCamera : Camera, 
	displayWidth : double, 
	displayHeight : double, 
	newCamera : Camera, 
	center : Point3D
)

Parameters

items
Type: array<System..::..Object>[]()[][]
An array of objects that the camrea should be centered to
currentCamera
Type: System.Windows.Media.Media3D..::..Camera
the current camera to reposition. The angle of this camera will be preserved.
displayWidth
Type: System..::..Double
the width used in the calculation.
displayHeight
Type: System..::..Double
the height used in the calculation.
newCamera
Type: System.Windows.Media.Media3D..::..Camera%
The camera to be assigned
center
Type: System.Windows.Media.Media3D..::..Point3D%
Point3D to be assigned the look-at point of the camera

Return Value

See Also