Click or drag to resize
Ab4d.SharpEngine logo

SharpEngineSceneViewAddPointerCameraController Method

Adds a PointerCameraController to this SharpEngineSceneView.

Namespace: Ab4d.SharpEngine.AvaloniaUI
Assembly: Ab4d.SharpEngine.AvaloniaUI (in Ab4d.SharpEngine.AvaloniaUI.dll) Version: 5.0.1075+bc537c8d217949260b11f66ee86aefa6456ac517
Syntax
C#
public PointerCameraController AddPointerCameraController(
	IInputElement? eventsSourceElement = null,
	PointerAndKeyboardConditions rotateCameraConditions = PointerAndKeyboardConditions.LeftPointerButtonPressed,
	PointerAndKeyboardConditions moveCameraConditions = PointerAndKeyboardConditions.LeftPointerButtonPressed|PointerAndKeyboardConditions.ControlKey,
	PointerAndKeyboardConditions quickZoomConditions = PointerAndKeyboardConditions.Disabled,
	CameraZoomMode zoomMode = CameraZoomMode.ViewCenter,
	bool rotateAroundPointerPosition = false,
	CameraControllerCameraSmoothingPresets cameraSmoothing = CameraControllerCameraSmoothingPresets.Disabled
)

Parameters

eventsSourceElement  IInputElement  (Optional)
Optional IInputElement that is used to subscribe the pointer or mouse events (for example a Border that is a parent of a SharpEngineSceneView). When null, then this SharpEngineSceneView is used as an event source.
rotateCameraConditions  PointerAndKeyboardConditions  (Optional)
Conditions to rotate the camera. Default value is LeftPointerButtonPressed.
moveCameraConditions  PointerAndKeyboardConditions  (Optional)
Conditions to move the camera. Default value is LeftPointerButtonPressed.
quickZoomConditions  PointerAndKeyboardConditions  (Optional)
Conditions to do a camera quick zoom. Disabled by default.
zoomMode  CameraZoomMode  (Optional)
Zoom mode. Default value is ViewCenter.
rotateAroundPointerPosition  Boolean  (Optional)
Boolean that specifies if TargetPositionCamera or FreeCamera is rotated around a 3D position that is "behind" current pointer position. Default value is false.
cameraSmoothing  CameraControllerCameraSmoothingPresets  (Optional)
camera smoothing mode that determines how smoothly the camera reacts to rotation, movement, and zooming. Default value is Disabled.

Return Value

PointerCameraController
created PointerCameraController
See Also