Camera |
public class CameraControlPanel : BaseControllerControl
The CameraControlPanel type exposes the following members.
Name | Description | |
---|---|---|
CameraControlPanel | Constructor |
Name | Description | |
---|---|---|
Delay | Gets or sets the amount of time, in milliseconds, the buttons on CameraControlPanel wait while they begin to repeatedly change the camera. Default value is 250. | |
Interval | Gets or sets the amount of time, in milliseconds, between repeats once repeating starts. | |
MoveAmount | When MoveAmount is set to a value that is not 0 or double.NaN, then the camera is moved for this value when the left, right, up or down button is pressed. When MoveAmount is 0 or NaN, then the move amount is calculated based on the current camera's Distance or CameraWidth and the size of the Viewport3D. Default value is 0. | |
MoveChangeFactor | Gets or sets the value that is used on each Change Interval to move the camera forward or backward. The value is multiplied with the current Camera Distance. Default value is 1.05. | |
RotationChange | Gets or sets the value in degrees that is used on each Change Interval to rotate the camera. Default value is 5. | |
ShowMoveButtons | Gets or sets a Boolean that specifies if the move buttons are shown. Default value is false. | |
ShowRotateButtons | Gets or sets a Boolean that specifies if the rotate buttons are shown. Default value is true. | |
ShowZoomButtons | Gets or sets a Boolean that specifies if the move forward and move backward buttons are shown. Default value is true. |
Name | Description | |
---|---|---|
ChangeCameraDistance | ChangeCameraDistance method change the distance of the TargetCamera by multiplying it by the changeFactor | |
GetSelectedBitmapForImageName | GetSelectedBitmapForImageName method gets the Selected BitmapSource for the Image with imageName. If null is returned, the original image is not changed. | |
GetUnSelectedBitmapForImageName | GetUnSelectedBitmapForImageName method gets the Un-Selected BitmapSource for the Image with imageName. If null is returned, the original image is not changed. | |
MeasureOverride |
MeasureOverride
(Overrides ControlMeasureOverride(Size)) | |
MoveCamera | MoveCamera method moves the camera for the mouse change defined by offsetXChange and offsetYChange parameters. | |
OnApplyTemplate |
OnApplyTemplate
(Overrides FrameworkElementOnApplyTemplate) | |
RotateCamera | RotateCamera method rotates the camera for the mouse change defined by headingChange and attitudeChange parameters. | |
SubscribeImageEvents | SubscribeImageEvents method subscribes mouse events to Images used in CameraControlPanel | |
UpdateShownButtons | UpdateShownButtons method shows or hides the shown buttons based on the ShowMoveButtons, ShowRotateButtons and ShowZoomButtons properties. |
Name | Description | |
---|---|---|
DelayProperty | DelayProperty | |
IntervalProperty | IntervalProperty | |
MoveAmountProperty | MoveAmountProperty | |
moveBackImage | backImage | |
moveCanvas | Canvas that hosts move buttons | |
MoveChangeFactorProperty | MoveChangeFactorProperty | |
moveDownImage | move down Image | |
moveForwardImage | forwardImage | |
moveLeftImage | move left Image | |
moveRightImage | move right Image | |
moveUpImage | move up Image | |
rootStackPanel | StackPanel control that hosts all three Canvases | |
rootViewbox | rootViewbox control | |
rotateCanvas | Canvas that hosts rotate buttons | |
rotateDownImage | rotate down Image | |
rotateLeftImage | rotate left Image | |
rotateRightImage | rotate right Image | |
rotateUpImage | rotate up Image | |
RotationChangeProperty | RotationChangeProperty | |
ShowMoveButtonsProperty | ShowMoveButtonsProperty | |
ShowRotateButtonsProperty | ShowRotateButtonsProperty | |
ShowZoomButtonsProperty | ShowZoomButtonsProperty | |
zoomCanvas | Canvas that hosts zoom buttons |
The Ab3d.Camera that is controlled by the CameraControlPanel is defined by the TargetCamera or TargetCameraName properties.
If the Ab3d.Camera is not set manually and the IsAutoCameraFindingEnabled property is set to true, the contoller try to find the first Ab3d.Camera by looking at controls parents.
The amount of the camera change is defined by the following properties:
RotationChange, MoveChangeFactor, Interval and Delay.
It is also possible to control the camera by the ChangeCameraDistance(Double) and RotateCamera(Double, Double) helper methods.