Mouse |
The MouseCameraController type exposes the following members.
Name | Description | |
---|---|---|
ChangeCameraDistance | ChangeCameraDistance method change the distance of the TargetCamera by multiplying it by the changeFactor. When RotationCenterPosition is set in the TargetPositionCamera or FreeCamera, then we zoom into the specified RotationCenterPosition (if this is not disabled by setting the zoomToRotationCenterPosition parameters to false). | |
CubicEaseOut | Simple cubic easing function used to decelerate the rotation: y = (x - 1) * (x - 1) * (x - 1) + 1x | |
EndMouseProcessing | EndMouseProcessing is called when the mouse button that started rotation or movement is released. | |
GetEventsSourceElementSize | GetEventsSourceElementSize returns size of EventsSourceElement. This method can be overridden to provide custom size (for example when used with SharpDX.RenderForm) | |
GetIsHeadingAngleChangeInverted | GetIsHeadingAngleChangeInverted returns true if mouse position is in such location that we need to invert the heading rotation direction. | |
GetManipulationActions | GetManipulationActions method gets the ManipulationDeltaEventArgs and based on that sets which actions should be performed by MouseCameraController. This method can be overridden to specify custom behavior with touch events. | |
GetRotationCenterPositionFromMousePosition | GetRotationPivotPointFromMousePosition methods returns a Point3D that is get by 3D hit testing of specified mousePosition with the 3D objects defined in the Viewport3D. If no 3D object is hit and calculatePositionWhenNoObjectIsHit parameter is set to true, then the returned Point3D is calculated with creating a ray from mouse position and advancing in the ray direction for the distance from camera's position and camera target position. The method is called when the RotateAroundMousePosition property is true. The method can be overridden to provide custom logic to get rotation pivot point. | |
HideRotationAdorner | HideRotationAdorner hides the shown RotationCenterAdorner. | |
IsKeyboardConditionTrue | IsKeyboardConditionTrue returns true when the correct keyboard modifier is pressed according to the specified conditions (only keyboard part of the conditions are checked). | |
IsMouseButtonsConditionTrue | IsMouseButtonsConditionTrue returns true when the correct mouse button is pressed according to the specified conditions (only mouse part of the conditions are checked; keyboard part is checked in IsKeyboardConditionTrue). | |
LoadRotateCursor | LoadRotateCursor loads the rotate cursor from assembly resources | |
MoveCamera | Moves the camera for the mouse change defined by mouseDx and mouseDy parameters. | |
OnCameraMoveEnded | Fires CameraMoveEnded event | |
OnCameraMoveStarted | Fires CameraMoveStarted event | |
OnCameraQuickZoomEnded | Fires CameraQuickZoomEnded event | |
OnCameraQuickZoomStarted | Fires CameraQuickZoomStarted event | |
OnCameraRotateEnded | Fires CameraRotateEnded event | |
OnCameraRotateStarted | Fires OnCameraRotateStarted event | |
OnManipulationCompleted | OnManipulationCompleted is called when touch event is completed. This method starts rotation easing or resumes the suspended camera rotation. Users can override the method but it is highly recommended to call this method from the overridden method. | |
OnManipulationDelta | OnManipulationDelta handles the manipulation events. The method can be overridden. | |
OnManipulationStarted | OnManipulationStarted is called when the touch event is started. Users can override the method but it is highly recommended to call this method from the overridden method. | |
OnMouseButtonDown | OnMouseButtonDown processes mouse down event. | |
OnMouseButtonUp | OnMouseButtonUp processes mouse up event. | |
OnMouseMove | OnMouseMove processes mouse move event. | |
OnMouseWheel | OnMouseWheel processes mouse wheel event. | |
OnTargetCameraChanged |
virtual OnTargetCameraChanged
(Overrides BaseControllerControlOnTargetCameraChanged(BaseCamera, BaseCamera)) | |
ProcessMouseMove(Double, Double, MouseEventArgs) | ProcessMouseMove handles mouse moves and calls the RotateCamera or the MoveCamera method based on the MouseCameraController settings and pressed modifier keys. The method can be overridden to move the camera based on some custom logic. | |
ProcessMouseMove(Double, Double, Point, Boolean, Boolean, Boolean, ModifierKeys) | ProcessMouseMove handles mouse moves and calls the RotateCamera or the MoveCamera method based on the MouseCameraController settings and pressed modifier keys. The method can be overridden to move the camera based on some custom logic. | |
QuadraticEaseOut | Simple quadratic easing function used to decelerate the rotation: y = -1 * x * x + 2 * x | |
QuickZoomCamera | Quickly zooms the camera for the mouse change defined by mouseDx and mouseDy parameters. | |
RotateCamera | RotateCamera method rotates the camera for the mouse change defined by mouseDx and mouseDy parameters. The method can be overridden in a derived class to provide custom camera rotation implementation. | |
ShowRotationAdorner | ShowRotationAdorner method shows the RotationCenterAdorner at the specified rotationCenterPosition. The method can be overridden to show some other shape when rotation is started (you also need to override the HideRotationAdorner method. | |
StartCameraMovement | Starts the camera movement by changing the changing cursor to MovementCursor. To stop mouse processing call StopCurrentMouseProcessing. | |
StartCameraQuickZoom | Starts the camera quick zoom by changing cursor (to QuickZoomCursor) and updating the zoom target position (when ZoomMode is MousePosition or CameraRotationCenterPosition). To stop mouse processing call StopCurrentMouseProcessing. | |
StartCameraRotation | Starts the camera rotation by showing the rotation center marker (when ShowRotationCenterMarker is true), changing cursor (to RotationCursor) and updating the rotation center position (when RotateAroundMousePosition is true). To stop mouse processing call StopCurrentMouseProcessing. | |
StartMouseProcessing(Point) | StartMouseProcessing is called when the correct mouse button and keyboard is pressed to start rotating or moving the camera. | |
StartMouseProcessing(Point, Boolean, Boolean, Boolean, ModifierKeys) | StartMouseProcessing is called when the correct mouse button and keyboard is pressed to start rotating or moving the camera. | |
StopCurrentMouseProcessing | StopCurrentMouseProcessing can be called after calling StartCameraRotation(Point), StartCameraMovement or StartCameraQuickZoom(Point) to stop the started mouse processing. | |
SubscribeEvents | SubscribeEvents method subscribe mouse events to the newEventsSourceElement. The method can be overridden. | |
UnsubscribeEvents | UnsubscribeEvents unsubscribes from the mouse events on the subscribedEventsSourceElement. | |
UpdateEnabled |
UpdateEnabled method checks the Target Camera's IsEnabled property and enable or disable this controller.
(Overrides BaseControllerControlUpdateEnabled) |