C# Class HelixToolkit.Wpf.CameraController

Provides a control that manipulates the camera by mouse and keyboard gestures.
Inheritance: System.Windows.Controls.Grid
Afficher le fichier Open project: litdev1/LitDev Class Usage Examples

Méthodes publiques

Свойство Type Description
BackViewCommand System.Windows.Input.RoutedCommand
BottomViewCommand System.Windows.Input.RoutedCommand
CameraModeProperty System.Windows.DependencyProperty
CameraProperty System.Windows.DependencyProperty
CameraRotationModeProperty System.Windows.DependencyProperty
ChangeFieldOfViewCommand System.Windows.Input.RoutedCommand
ChangeFieldOfViewCursorProperty System.Windows.DependencyProperty
ChangeLookAtCommand System.Windows.Input.RoutedCommand
DefaultCameraProperty System.Windows.DependencyProperty
EnabledProperty System.Windows.DependencyProperty
FrontViewCommand System.Windows.Input.RoutedCommand
InertiaFactorProperty System.Windows.DependencyProperty
InfiniteSpinProperty System.Windows.DependencyProperty
IsChangeFieldOfViewEnabledProperty System.Windows.DependencyProperty
IsInertiaEnabledProperty System.Windows.DependencyProperty
IsMoveEnabledProperty System.Windows.DependencyProperty
IsPanEnabledProperty System.Windows.DependencyProperty
IsRotationEnabledProperty System.Windows.DependencyProperty
IsTouchZoomEnabledProperty System.Windows.DependencyProperty
IsZoomEnabledProperty System.Windows.DependencyProperty
LeftRightPanSensitivityProperty System.Windows.DependencyProperty
LeftRightRotationSensitivityProperty System.Windows.DependencyProperty
LeftViewCommand System.Windows.Input.RoutedCommand
LookAtChangedEvent RoutedEvent
MaximumFieldOfViewProperty DependencyProperty
MinimumFieldOfViewProperty DependencyProperty
ModelUpDirectionProperty DependencyProperty
MoveSensitivityProperty DependencyProperty
PageUpDownZoomSensitivityProperty DependencyProperty
PanCommand RoutedCommand
PanCursorProperty DependencyProperty
ResetCameraCommand RoutedCommand
RightViewCommand RoutedCommand
RotateAroundMouseDownPointProperty DependencyProperty
RotateCommand RoutedCommand
RotateCursorProperty DependencyProperty
RotationSensitivityProperty DependencyProperty
ShowCameraTargetProperty DependencyProperty
SpinReleaseTimeProperty DependencyProperty
TopViewCommand RoutedCommand
TouchModeProperty DependencyProperty
UpDownPanSensitivityProperty DependencyProperty
UpDownRotationSensitivityProperty DependencyProperty
ViewportProperty DependencyProperty
ZoomAroundMouseDownPointProperty DependencyProperty
ZoomCommand RoutedCommand
ZoomCursorProperty DependencyProperty
ZoomExtentsCommand RoutedCommand
ZoomRectangleCommand RoutedCommand
ZoomRectangleCursorProperty DependencyProperty
ZoomSensitivityProperty DependencyProperty
ZoomedByRectangleEvent RoutedEvent

Méthodes publiques

Méthode Description
AddMoveForce ( System.Windows.Media.Media3D.Vector3D delta ) : void

Adds the specified move force.

AddMoveForce ( double dx, double dy, double dz ) : void

Adds the specified move force.

AddPanForce ( System.Windows.Media.Media3D.Vector3D pan ) : void

The add pan force.

AddPanForce ( double dx, double dy ) : void

Adds the specified pan force.

AddRotateForce ( double dx, double dy ) : void

The add rotate force.

AddZoomForce ( double delta ) : void

Adds the zoom force.

AddZoomForce ( double delta, System.Windows.Media.Media3D.Point3D zoomOrigin ) : void

Adds the zoom force.

ChangeDirection ( System.Windows.Media.Media3D.Vector3D lookDir, System.Windows.Media.Media3D.Vector3D upDir, double animationTime = 500 ) : void

Changes the direction of the camera.

ChangeDirection ( System.Windows.Media.Media3D.Vector3D lookDir, double animationTime = 500 ) : void

Changes the direction of the camera.

HideRectangle ( ) : void

Hides the rectangle.

HideTargetAdorner ( ) : void

Hides the target adorner.

PushCameraSetting ( ) : void

Push the current camera settings on an internal stack.

ResetCamera ( ) : void

Resets the camera.

ResetCameraUpDirection ( ) : void

Resets the camera up direction.

RestoreCameraSetting ( ) : bool

Restores the most recent camera setting from the internal stack.

ShowRectangle ( Rect rect, Color color1, Color color2 ) : void

Shows the rectangle.

ShowTargetAdorner ( Point position ) : void

Shows the target adorner.

StartSpin ( Vector speed, Point position, Point3D aroundPoint ) : void

Starts the spin.

StopSpin ( ) : void

Stops the spin.

UpdateRectangle ( Rect rect ) : void

Updates the rectangle.

Zoom ( double delta ) : void

Zooms by the specified delta value.

ZoomExtents ( double animationTime = 200 ) : void

Zooms to the extents of the model.

Méthodes protégées

Méthode Description
OnLookAtChanged ( ) : void

Raises the LookAtChanged event.

OnMouseDown ( MouseButtonEventArgs e ) : void

DELETED BY SJT FOR .NET 3.5 Called when the E:System.Windows.UIElement.ManipulationCompleted event occurs.

DELETED BY SJT FOR .NET 3.5 Called when the E:System.Windows.UIElement.ManipulationDelta event occurs.

DELETED BY SJT FOR .NET 3.5 Called when the E:System.Windows.UIElement.ManipulationStarted event occurs.

Invoked when an unhandled MouseDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

OnStylusSystemGesture ( StylusSystemGestureEventArgs e ) : void

Invoked when an unhandled StylusSystemGesture attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

OnZoomedByRectangle ( ) : void

Raises the ZoomedByRectangle event.

Private Methods

Méthode Description
BackViewHandler ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void

The back view event handler.

BottomViewHandler ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void

The bottom view event handler.

CameraChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

The camera changed.

CameraController ( ) : System

Initializes static members of the CameraController class. Initializes static members of the CameraController class. Initializes static members of the class. Initializes static members of the CameraController class. Initializes static members of the class.

CameraControllerLoaded ( object sender, RoutedEventArgs e ) : void

The camera controller_ loaded.

CameraControllerUnloaded ( object sender, RoutedEventArgs e ) : void

Called when the CameraController is unloaded.

Clamp ( double value, double min, double max ) : double

Clamps the specified value between the limits.

FindPanVector ( double dx, double dy ) : System.Windows.Media.Media3D.Vector3D

Finds the pan vector.

FrontViewHandler ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void

The front view event handler.

InitializeBindings ( ) : void

Initializes the input bindings.

LeftViewHandler ( object sender, System.Windows.Input.ExecutedRoutedEventArgs e ) : void

The left view event handler.

LookAt ( System.Windows.Media.Media3D.Point3D target, double animationTime ) : void
OnCameraChanged ( ) : void

The on camera changed.

OnCompositionTargetRendering ( object sender, RenderingEventArgs e ) : void

The rendering event handler.

OnKeyDown ( object sender, KeyEventArgs e ) : void

Called when a key is pressed.

OnMouseWheel ( object sender, MouseWheelEventArgs e ) : void

Called when the mouse wheel is moved.

OnTimeStep ( double time ) : void

The on time step.

OnViewportChanged ( ) : void

The on viewport changed.

RefreshViewport ( ) : void

The refresh viewport.

ResetCameraHandler ( object sender, ExecutedRoutedEventArgs e ) : void

The reset camera event handler.

RightViewHandler ( object sender, ExecutedRoutedEventArgs e ) : void

The right view event handler.

StopAnimations ( ) : void

The stop animations.

SubscribeEvents ( ) : void

The subscribe events.

TopViewHandler ( object sender, ExecutedRoutedEventArgs e ) : void

The top view event handler.

UnSubscribeEvents ( ) : void

The un subscribe events.

ViewportChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

The viewport changed.

ZoomExtentsHandler ( object sender, ExecutedRoutedEventArgs e ) : void

The Zoom extents event handler.

Method Details

AddMoveForce() public méthode

Adds the specified move force.
public AddMoveForce ( System.Windows.Media.Media3D.Vector3D delta ) : void
delta System.Windows.Media.Media3D.Vector3D /// The delta. ///
Résultat void

AddMoveForce() public méthode

Adds the specified move force.
public AddMoveForce ( double dx, double dy, double dz ) : void
dx double /// The delta x. ///
dy double /// The delta y. ///
dz double /// The delta z. ///
Résultat void

AddPanForce() public méthode

The add pan force.
public AddPanForce ( System.Windows.Media.Media3D.Vector3D pan ) : void
pan System.Windows.Media.Media3D.Vector3D /// The pan. ///
Résultat void

AddPanForce() public méthode

Adds the specified pan force.
public AddPanForce ( double dx, double dy ) : void
dx double /// The delta x. ///
dy double /// The delta y. ///
Résultat void

AddRotateForce() public méthode

The add rotate force.
public AddRotateForce ( double dx, double dy ) : void
dx double /// The delta x. ///
dy double /// The delta y. ///
Résultat void

AddZoomForce() public méthode

Adds the zoom force.
public AddZoomForce ( double delta ) : void
delta double /// The delta. ///
Résultat void

AddZoomForce() public méthode

Adds the zoom force.
public AddZoomForce ( double delta, System.Windows.Media.Media3D.Point3D zoomOrigin ) : void
delta double /// The delta. ///
zoomOrigin System.Windows.Media.Media3D.Point3D /// The zoom origin. ///
Résultat void

ChangeDirection() public méthode

Changes the direction of the camera.
public ChangeDirection ( System.Windows.Media.Media3D.Vector3D lookDir, System.Windows.Media.Media3D.Vector3D upDir, double animationTime = 500 ) : void
lookDir System.Windows.Media.Media3D.Vector3D /// The look direction. ///
upDir System.Windows.Media.Media3D.Vector3D /// The up direction. ///
animationTime double /// The animation time. ///
Résultat void

ChangeDirection() public méthode

Changes the direction of the camera.
public ChangeDirection ( System.Windows.Media.Media3D.Vector3D lookDir, double animationTime = 500 ) : void
lookDir System.Windows.Media.Media3D.Vector3D /// The look direction. ///
animationTime double /// The animation time. ///
Résultat void

HideRectangle() public méthode

Hides the rectangle.
public HideRectangle ( ) : void
Résultat void

HideTargetAdorner() public méthode

Hides the target adorner.
public HideTargetAdorner ( ) : void
Résultat void

OnLookAtChanged() protected méthode

Raises the LookAtChanged event.
protected OnLookAtChanged ( ) : void
Résultat void

OnMouseDown() protected méthode

DELETED BY SJT FOR .NET 3.5 Called when the E:System.Windows.UIElement.ManipulationCompleted event occurs. DELETED BY SJT FOR .NET 3.5 Called when the E:System.Windows.UIElement.ManipulationDelta event occurs. DELETED BY SJT FOR .NET 3.5 Called when the E:System.Windows.UIElement.ManipulationStarted event occurs. Invoked when an unhandled MouseDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected OnMouseDown ( MouseButtonEventArgs e ) : void
e MouseButtonEventArgs /// The data for the event. ///
Résultat void

OnStylusSystemGesture() protected méthode

Invoked when an unhandled StylusSystemGesture attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected OnStylusSystemGesture ( StylusSystemGestureEventArgs e ) : void
e StylusSystemGestureEventArgs /// The that contains the event data. ///
Résultat void

OnZoomedByRectangle() protected méthode

Raises the ZoomedByRectangle event.
protected OnZoomedByRectangle ( ) : void
Résultat void

PushCameraSetting() public méthode

Push the current camera settings on an internal stack.
public PushCameraSetting ( ) : void
Résultat void

ResetCamera() public méthode

Resets the camera.
public ResetCamera ( ) : void
Résultat void

ResetCameraUpDirection() public méthode

Resets the camera up direction.
public ResetCameraUpDirection ( ) : void
Résultat void

RestoreCameraSetting() public méthode

Restores the most recent camera setting from the internal stack.
public RestoreCameraSetting ( ) : bool
Résultat bool

ShowRectangle() public méthode

Shows the rectangle.
public ShowRectangle ( Rect rect, Color color1, Color color2 ) : void
rect Rect /// The rectangle. ///
color1 Color /// The color 1. ///
color2 Color /// The color 2. ///
Résultat void

ShowTargetAdorner() public méthode

Shows the target adorner.
public ShowTargetAdorner ( Point position ) : void
position Point /// The position. ///
Résultat void

StartSpin() public méthode

Starts the spin.
public StartSpin ( Vector speed, Point position, Point3D aroundPoint ) : void
speed Vector /// The speed. ///
position Point /// The position. ///
aroundPoint Point3D /// The spin around point. ///
Résultat void

StopSpin() public méthode

Stops the spin.
public StopSpin ( ) : void
Résultat void

UpdateRectangle() public méthode

Updates the rectangle.
public UpdateRectangle ( Rect rect ) : void
rect Rect /// The rectangle. ///
Résultat void

Zoom() public méthode

Zooms by the specified delta value.
public Zoom ( double delta ) : void
delta double /// The delta value. ///
Résultat void

ZoomExtents() public méthode

Zooms to the extents of the model.
public ZoomExtents ( double animationTime = 200 ) : void
animationTime double /// The animation time (milliseconds). ///
Résultat void

Property Details

BackViewCommand public_oe static_oe property

The back view command.
public static RoutedCommand,System.Windows.Input BackViewCommand
Résultat System.Windows.Input.RoutedCommand

BottomViewCommand public_oe static_oe property

The bottom view command.
public static RoutedCommand,System.Windows.Input BottomViewCommand
Résultat System.Windows.Input.RoutedCommand

CameraModeProperty public_oe static_oe property

Identifies the CameraMode dependency property.
public static DependencyProperty,System.Windows CameraModeProperty
Résultat System.Windows.DependencyProperty

CameraProperty public_oe static_oe property

Identifies the Camera dependency property.
public static DependencyProperty,System.Windows CameraProperty
Résultat System.Windows.DependencyProperty

CameraRotationModeProperty public_oe static_oe property

Identifies the CameraRotationMode dependency property.
public static DependencyProperty,System.Windows CameraRotationModeProperty
Résultat System.Windows.DependencyProperty

ChangeFieldOfViewCommand public_oe static_oe property

The change fov command.
public static RoutedCommand,System.Windows.Input ChangeFieldOfViewCommand
Résultat System.Windows.Input.RoutedCommand

ChangeFieldOfViewCursorProperty public_oe static_oe property

Identifies the ChangeFieldOfViewCursor dependency property.
public static DependencyProperty,System.Windows ChangeFieldOfViewCursorProperty
Résultat System.Windows.DependencyProperty

ChangeLookAtCommand public_oe static_oe property

The change look at command.
public static RoutedCommand,System.Windows.Input ChangeLookAtCommand
Résultat System.Windows.Input.RoutedCommand

DefaultCameraProperty public_oe static_oe property

Identifies the DefaultCamera dependency property.
public static DependencyProperty,System.Windows DefaultCameraProperty
Résultat System.Windows.DependencyProperty

EnabledProperty public_oe static_oe property

Identifies the Enabled dependency property.
public static DependencyProperty,System.Windows EnabledProperty
Résultat System.Windows.DependencyProperty

FrontViewCommand public_oe static_oe property

The front view command.
public static RoutedCommand,System.Windows.Input FrontViewCommand
Résultat System.Windows.Input.RoutedCommand

InertiaFactorProperty public_oe static_oe property

Identifies the InertiaFactor dependency property.
public static DependencyProperty,System.Windows InertiaFactorProperty
Résultat System.Windows.DependencyProperty

InfiniteSpinProperty public_oe static_oe property

Identifies the InfiniteSpin dependency property.
public static DependencyProperty,System.Windows InfiniteSpinProperty
Résultat System.Windows.DependencyProperty

IsChangeFieldOfViewEnabledProperty public_oe static_oe property

Identifies the IsChangeFieldOfViewEnabled dependency property.
public static DependencyProperty,System.Windows IsChangeFieldOfViewEnabledProperty
Résultat System.Windows.DependencyProperty

IsInertiaEnabledProperty public_oe static_oe property

Identifies the IsInertiaEnabled dependency property.
public static DependencyProperty,System.Windows IsInertiaEnabledProperty
Résultat System.Windows.DependencyProperty

IsMoveEnabledProperty public_oe static_oe property

Identifies the IsMoveEnabled dependency property.
public static DependencyProperty,System.Windows IsMoveEnabledProperty
Résultat System.Windows.DependencyProperty

IsPanEnabledProperty public_oe static_oe property

Identifies the IsPanEnabled dependency property.
public static DependencyProperty,System.Windows IsPanEnabledProperty
Résultat System.Windows.DependencyProperty

IsRotationEnabledProperty public_oe static_oe property

Identifies the IsRotationEnabled dependency property.
public static DependencyProperty,System.Windows IsRotationEnabledProperty
Résultat System.Windows.DependencyProperty

IsTouchZoomEnabledProperty public_oe static_oe property

Identifies the IsTouchZoomEnabled dependency property.
public static DependencyProperty,System.Windows IsTouchZoomEnabledProperty
Résultat System.Windows.DependencyProperty

IsZoomEnabledProperty public_oe static_oe property

Identifies the IsZoomEnabled dependency property.
public static DependencyProperty,System.Windows IsZoomEnabledProperty
Résultat System.Windows.DependencyProperty

LeftRightPanSensitivityProperty public_oe static_oe property

Identifies the LeftRightPanSensitivity dependency property.
public static DependencyProperty,System.Windows LeftRightPanSensitivityProperty
Résultat System.Windows.DependencyProperty

LeftRightRotationSensitivityProperty public_oe static_oe property

Identifies the LeftRightRotationSensitivity dependency property.
public static DependencyProperty,System.Windows LeftRightRotationSensitivityProperty
Résultat System.Windows.DependencyProperty

LeftViewCommand public_oe static_oe property

The left view command.
public static RoutedCommand,System.Windows.Input LeftViewCommand
Résultat System.Windows.Input.RoutedCommand

LookAtChangedEvent public_oe static_oe property

The look at (target) point changed event
public static RoutedEvent LookAtChangedEvent
Résultat RoutedEvent

MaximumFieldOfViewProperty public_oe static_oe property

Identifies the MaximumFieldOfView dependency property.
public static DependencyProperty MaximumFieldOfViewProperty
Résultat DependencyProperty

MinimumFieldOfViewProperty public_oe static_oe property

Identifies the MinimumFieldOfView dependency property.
public static DependencyProperty MinimumFieldOfViewProperty
Résultat DependencyProperty

ModelUpDirectionProperty public_oe static_oe property

Identifies the ModelUpDirection dependency property.
public static DependencyProperty ModelUpDirectionProperty
Résultat DependencyProperty

MoveSensitivityProperty public_oe static_oe property

Identifies the MoveSensitivity dependency property.
public static DependencyProperty MoveSensitivityProperty
Résultat DependencyProperty

PageUpDownZoomSensitivityProperty public_oe static_oe property

Identifies the PageUpDownZoomSensitivity dependency property.
public static DependencyProperty PageUpDownZoomSensitivityProperty
Résultat DependencyProperty

PanCommand public_oe static_oe property

The pan command.
public static RoutedCommand PanCommand
Résultat RoutedCommand

PanCursorProperty public_oe static_oe property

Identifies the PanCursor dependency property.
public static DependencyProperty PanCursorProperty
Résultat DependencyProperty

ResetCameraCommand public_oe static_oe property

The reset camera command.
public static RoutedCommand ResetCameraCommand
Résultat RoutedCommand

RightViewCommand public_oe static_oe property

The right view command.
public static RoutedCommand RightViewCommand
Résultat RoutedCommand

RotateAroundMouseDownPointProperty public_oe static_oe property

Identifies the RotateAroundMouseDownPoint dependency property.
public static DependencyProperty RotateAroundMouseDownPointProperty
Résultat DependencyProperty

RotateCommand public_oe static_oe property

The rotate command.
public static RoutedCommand RotateCommand
Résultat RoutedCommand

RotateCursorProperty public_oe static_oe property

Identifies the RotateCursor dependency property.
public static DependencyProperty RotateCursorProperty
Résultat DependencyProperty

RotationSensitivityProperty public_oe static_oe property

Identifies the RotationSensitivity dependency property.
public static DependencyProperty RotationSensitivityProperty
Résultat DependencyProperty

ShowCameraTargetProperty public_oe static_oe property

Identifies the ShowCameraTarget dependency property.
public static DependencyProperty ShowCameraTargetProperty
Résultat DependencyProperty

SpinReleaseTimeProperty public_oe static_oe property

Identifies the SpinReleaseTime dependency property.
public static DependencyProperty SpinReleaseTimeProperty
Résultat DependencyProperty

TopViewCommand public_oe static_oe property

The top view command.
public static RoutedCommand TopViewCommand
Résultat RoutedCommand

TouchModeProperty public_oe static_oe property

Identifies the TouchMode dependency property.
public static DependencyProperty TouchModeProperty
Résultat DependencyProperty

UpDownPanSensitivityProperty public_oe static_oe property

Identifies the UpDownPanSensitivity dependency property.
public static DependencyProperty UpDownPanSensitivityProperty
Résultat DependencyProperty

UpDownRotationSensitivityProperty public_oe static_oe property

Identifies the UpDownRotationSensitivity dependency property.
public static DependencyProperty UpDownRotationSensitivityProperty
Résultat DependencyProperty

ViewportProperty public_oe static_oe property

Identifies the Viewport dependency property.
public static DependencyProperty ViewportProperty
Résultat DependencyProperty

ZoomAroundMouseDownPointProperty public_oe static_oe property

Identifies the ZoomAroundMouseDownPoint dependency property.
public static DependencyProperty ZoomAroundMouseDownPointProperty
Résultat DependencyProperty

ZoomCommand public_oe static_oe property

The zoom command.
public static RoutedCommand ZoomCommand
Résultat RoutedCommand

ZoomCursorProperty public_oe static_oe property

Identifies the ZoomCursor dependency property.
public static DependencyProperty ZoomCursorProperty
Résultat DependencyProperty

ZoomExtentsCommand public_oe static_oe property

The zoom extents command.
public static RoutedCommand ZoomExtentsCommand
Résultat RoutedCommand

ZoomRectangleCommand public_oe static_oe property

The zoom rectangle command.
public static RoutedCommand ZoomRectangleCommand
Résultat RoutedCommand

ZoomRectangleCursorProperty public_oe static_oe property

Identifies the ZoomRectangleCursor dependency property.
public static DependencyProperty ZoomRectangleCursorProperty
Résultat DependencyProperty

ZoomSensitivityProperty public_oe static_oe property

Identifies the ZoomSensitivity dependency property.
public static DependencyProperty ZoomSensitivityProperty
Résultat DependencyProperty

ZoomedByRectangleEvent public_oe static_oe property

The zoomed by rectangle event
public static RoutedEvent ZoomedByRectangleEvent
Résultat RoutedEvent