Click or drag to resize
AB4D logo

SphericalCamera Class

SphericalCamera class defines a camera that is defined by Heading, Attitude and Bank properties.
Inheritance Hierarchy
SystemObject
  System.Windows.ThreadingDispatcherObject
    System.WindowsDependencyObject
      System.Windows.MediaVisual
        System.WindowsUIElement
          System.WindowsFrameworkElement
            Ab3d.CamerasBaseCamera
              Ab3d.CamerasSphericalCamera
                Ab3d.CamerasBaseTargetPositionCamera
                Ab3d.CamerasFirstPersonCamera

Namespace: Ab3d.Cameras
Assembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.1.8864.1045
Syntax
C#
public class SphericalCamera : BaseCamera

The SphericalCamera type exposes the following members.

Constructors
 NameDescription
Public methodSphericalCamera Constructor
Top
Properties
 NameDescription
Public propertyAttitude Gets or sets a Camera Attitude (up-down) angle in degrees.
Public propertyBank Gets or sets a Camera Bank angle in degrees (UpDirection is rotated left-right)
Public propertyHeading Gets or sets a Camera Heading (left-right) angle in degrees.
Top
Methods
 NameDescription
Protected methodBaseCreateFrom This method is called from CreateFrom method and actually sets the properties on this camera.
(Overrides BaseCameraBaseCreateFrom(Camera))
Protected methodForceRefresh Forces a refresh of the camera.
(Overrides BaseCameraForceRefresh)
Public methodGetNormalizedAttitude Returns a double that is a Attitude value normalized so that it is always in interval between 0 and 360 degrees (or between -180 to 180 when normalizeTo180Degrees is true).
Public methodGetNormalizedBank Returns a double that is a Bank value normalized so that it is always in interval between 0 and 360 degrees (or between -180 to 180 when normalizeTo180Degrees is true).
Public methodGetNormalizedHeading Returns a double that is a Heading value normalized so that it is always in interval between 0 and 360 degrees (or between -180 to 180 when normalizeTo180Degrees is true).
Public methodIsValid Gets a Boolean that specifies if the camera is valid (has TargetViewport3D that has a valid size; has valid values for all properties). When camera is valid the Point3DTo2D(Point3D) returns correct value; when the camera is not valid, the Point3DTo2D method cannot calculate the 2D screen position.
(Overrides BaseCameraIsValid(Boolean))
Public methodNormalizeAngles NormalizeAngles normalizes the Heading, Attitude and Bank angles so that their values are between 0 and 360 (for example converting 390 into 30). When normalizeTo180Degrees parameter is true (false by default), the value is returned in range from -180 to 180 instead of 0 to 360.
Public methodRotateCamera Rotates the camera for the specified heading and attitude
(Overrides BaseCameraRotateCamera(Double, Double))
Public methodRotateFor Animates the camera rotation with changing the Camera's Heading and Attitude for the specified amount. The animation takes animationDurationInMilliseconds and uses easingFunction.
Public methodRotateTo Animates the camera rotation to the targetHeading and targetAttitude. The animation takes animationDurationInMilliseconds and uses easingFunction. By default (when useShortestPath is true), the animation uses the shortest path to get to the target heading and attitude.
Protected methodSetCameraLookDirection Updates the LookDirection and UpDirection based on the current Heading, Attitude and Bank values
Protected methodUpdateCamera Updates the ProjectionCamera
(Overrides BaseCameraUpdateCamera(ProjectionCamera))
Top
Fields
 NameDescription
Public fieldStatic memberAttitudeProperty AttitudeProperty
Public fieldStatic memberBankProperty BankProperty
Public fieldStatic memberHeadingProperty HeadingProperty
Top
Remarks

SphericalCamera class defines a camera that is defined by Heading, Attitude and Bank properties.

See Also