Click or drag to resize
Ab4d.SharpEngine logo

CameraNavigationCircles Class

CameraNavigationCircles is a camera controller that shows a 3D axes with axis circles and can be used to rotate the camera.
Inheritance Hierarchy
SystemObject
  Ab4d.SharpEngine.CoreComponentBase
    Ab4d.SharpEngine.OverlayPanelsOverlayPanelBase
      Ab4d.SharpEngine.OverlayPanelsCameraNavigationCircles

Namespace: Ab4d.SharpEngine.OverlayPanels
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 5.0.1075+bc537c8d217949260b11f66ee86aefa6456ac517
Syntax
C#
public class CameraNavigationCircles : OverlayPanelBase

The CameraNavigationCircles type exposes the following members.

Constructors
Properties
 NameDescription
Public propertyAlignment Gets or sets the alignment of the panel relative to the parent SceneView.
Public propertyAxisClickAnimationDuration Gets or sets a double value that specifies duration in seconds of the camera animation that is started when user clicks on axis circle. When the value is 0, then camera change is immediate and not animated. When the value is less then 0, then plane clicking is disabled (but the AxisClicked event is still triggered). Default value is 0.3 seconds.
Public propertyAxisType AxisType defines how the axis lines are shown. Default value is Lines that shows standard lines without arrows.
Public propertyBackgroundCircleColor BackgroundCircleColor defines the color that is used for the background circle. Default value is semi-transparent light gray (0.9f, 0.9f, 0.9f, alpha: 0.8f).
Public propertyBackgroundCircleVisibility BackgroundCircleVisibility defines when the background circle is visible. Default value is OnPointerOver.
Public propertyBackgroundColor Color of the background. By default set to Transparent color (no background).
Public propertyCamera Gets the camera that is controlled by this CameraNavigationCircles.
Public propertyFillNegativeCircles 
Public propertyFillPositiveCircles 
Public propertyIsCameraAnimationStoppedOnUserAction Gets or sets a boolean that specifies if camera rotation that is started by calling StartRotation(Single, Single) is stopped if user start rotating or moving the camera with pointer or mouse. If false then animation is not stopped and this prevents user from rotating or moving the camera with pointer or mouse. Default value is true. This value does not have any effect on camera animations that are created by using CreateCameraAnimation(ICamera, String) method.
Public propertyIsCameraRotationEnabled IsCameraRotationEnabled defines if camera rotation is enabled when user drags the pointer with first button when over the CameraNavigationCircles. Default value is true.
Public propertyIsEnabled True (by default) when CameraNavigationCircles is enabled. When disabled the CameraNavigationCircles are shown and still update on camera changes but do not respond to user input.
Public propertyIsRotateToAxisEnabled IsRotateToAxisEnabled defines if camera is rotated to the selected axis when user clicks on it. Default value is true.
Public propertyModifierKeyForOppositeAxis Gets or sets a modifier key that will rotate to the opposite axis when clicked on axis. Default value is Shift. This means that if user holds down Shift key and clicks on +X axis, the camera will rotate to -X axis. To disable this functionality set this property to None.
Public propertyNegativeAxisCircleVisibility NegativeAxisCircleVisibility defines when the axis circles for the negative axes (-x, -y, -z) are shown. Default value is Always.
Public propertyNegativeAxisNameColor NegativeAxisNameColor defines the color of the axis name on the negative axes (-x, -y, -z). When the value is null (by default), then the color of the axis is used (each axis name is colored by the color of the axis).
Public propertyNegativeAxisNameVisibility PositiveAxisNameNegativeAxisNameVisibilityVisibility defines when the axis names ("X", "Y", "Z") for the negative axes (-x, -y, -z) are shown. Default value is OnPointerOver.
Public propertyPosition Gets or sets the the position offset. Note that the actual position is also determined from Alignment.
Public propertyPositiveAxisCircleVisibility PositiveAxisCircleVisibility defines when the axis circles for the positive axes (+x, +y, +z) are shown. Default value is Always.
Public propertyPositiveAxisNameColor PositiveAxisNameColor defines the color of the axis name on the positive axes (+x, +y, +z). When the value is null, then the color of the axis is used (each axis name is colored by the color of the axis). Default value is null.
Public propertyPositiveAxisNameVisibility PositiveAxisNameVisibility defines when the axis names ("X", "Y", "Z") for the positive axes (+x, +y, +z) are shown. Default value is Always.
Public propertyPreserveAttitude PreserveAttitude specified when the camera's Attitude angle is preserved if clicked on a horizontal axis (X and Y in the common setup). Default value is Control. This means that if user holds down Control key and clicks on +X axis, the camera will rotate to X axis while preserving the existing Attitude (will not set Attitude to zero). To disable this functionality set this property to Never. To always preserve the Attitude (without pressing any modifier key), set this property to Always.
Public propertyShowOppositeAxisWhenClickedOnCurrentAxis When true (by default), then when user clicks on an existing axis (the one in the center), then the camera will rotate to the opposite axis.
Public propertySize Gets or sets the size (width and height) of the panel.
Top
Methods
 NameDescription
Public methodCustomizeAxes CustomizeAxes can be called to specify custom axes vectors and colors. Note that CameraNavigationCircles will also correctly show the axes based on the currently used coordinate system (set by Scene.SetCoordinateSystem method).
Protected methodDispose
(Overrides OverlayPanelBaseDispose(Boolean))
Protected methodOnAxisClicked OnAxisClicked
Protected methodOnAxisDeselected OnAxisDeselected
Protected methodOnAxisSelected OnAxisSelected
Protected methodOnBackgroundCircleEnter OnBackgroundCircleEnter
Protected methodOnBackgroundCircleLeave OnBackgroundCircleEnter
Protected methodOnCameraChanged
(Overrides OverlayPanelBaseOnCameraChanged)
Public methodProcessPointerDown 
Public methodProcessPointerMove 
Public methodProcessPointerUp 
Public methodUpdate Update method updates the orientation of the axes to reflect the rotation of the specified camera. This method is automatically called on each camera change. User can call this method to manually update the axes, though this is usually not needed.
(Overrides OverlayPanelBaseUpdate)
Top
Events
 NameDescription
Public eventAxisClicked ViewCubePlaneClicked event is fired when user clicks on ViewCube's Plane. The click is created when user presses mouse button and released it withing 1 second and does not move mouse for more than 2 pixels. Event handler can prevent processing click event with setting CancelEventHandling in ViewCubePlaneEventArgs to true.
Public eventAxisDeselected ViewCubePlaneLeave event is fired when mouse leaves one of the ViewCube's Planes.
Public eventAxisSelected ViewCubePlaneEnter event is fired when mouse enters one of the ViewCube's Planes.
Public eventBackgroundCircleEnter RotationCircleEnter event is fired when mouse enters of the ViewCube's rotation circle. When and event handler is subscribed to this event, then the default code that sets the selection brush to the rotation circle is not executed.
Public eventBackgroundCircleLeave RotationCircleLeave event is fired when mouse leaves of the ViewCube's rotation circle. When and event handler is subscribed to this event, then the default code that restores the selection brush to the rotation circle is not executed.
Top
Fields
 NameDescription
Public fieldAxisLineThickness Axis line thickness for the axis lines. Default value is 2. After changing this value call CustomizeAxes method.
Public fieldCameraRotationAmount Gets or sets a number of degrees for how much the camera will be rotated when user moves the mouse from one end of the CameraNavigationCircles to the other. Default value is 180.
Public fieldMouseMoveThreshold Gets or sets a double value that specifies how much user needs to move the mouse when pressing the button before rotation is started. If mouse if moved for the specified amount or less and the mouse button is released, this this is considers a mouse click. Default value is 1.
Public fieldSelectClosestAxis Gets or sets a Boolean that specifies if the closest axis to the pointer or mouse is selected (when true). When false, then axis is selected only when mouse or pointer is over the axis circle.
Top
See Also