Click or drag to resize
AB4D logo

BaseTargetPositionCamera Class

BaseTargetPositionCamera is a base class for cameras that define the target position (TargetPositionCamera) or target object (TargetRect3DCamera, SceneCamera and ThirdPersonCamera).
Inheritance Hierarchy
SystemObject
  System.Windows.ThreadingDispatcherObject
    System.WindowsDependencyObject
      System.Windows.MediaVisual
        System.WindowsUIElement
          System.WindowsFrameworkElement
            Ab3d.CamerasBaseCamera
              Ab3d.CamerasSphericalCamera
                Ab3d.CamerasBaseTargetPositionCamera
                  Ab3d.CamerasBaseTargetRect3DCamera
                  Ab3d.CamerasTargetPositionCamera

Namespace: Ab3d.Cameras
Assembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.2.9104.2045
Syntax
C#
public class BaseTargetPositionCamera : SphericalCamera, 
	IFitIntoViewCamera

The BaseTargetPositionCamera type exposes the following members.

Constructors
 NameDescription
Public methodBaseTargetPositionCamera Constructor
Top
Properties
 NameDescription
Public propertyDistance Gets or sets a double that defines the distance from the camera to the Camera's target position.
Top
Methods
 NameDescription
Public methodFitIntoView(FitIntoViewType, Boolean, Double, Boolean) FitIntoView adjusts the camera's Distance (for PerspectiveCamera) or CameraWidth (for OrthographicCamera) and TargetPosition (if adjustTargetPosition is true) so that all the objects on the scene will be visible from one edge of the viewport to another edge.
Public methodFitIntoView(IListPoint3D, Boolean, Double, Boolean) FitIntoView adjusts the camera's Distance (for PerspectiveCamera) or CameraWidth (for OrthographicCamera) and TargetPosition (if adjustTargetPosition is true) so that all the specified positions will be visible from one edge of the viewport to another edge.
Public methodFitIntoView(Rect3D, Boolean, Double, Boolean) FitIntoView adjusts the camera's Distance (for PerspectiveCamera) or CameraWidth (for OrthographicCamera) and TargetPosition (if adjustTargetPosition is true) so that all the specified Rect3D will be visible from one edge of the viewport to another edge.
Public methodFitIntoView(IListVisual3D, FitIntoViewType, Boolean, Double, Boolean) FitIntoView adjusts the camera's Distance (for PerspectiveCamera) or CameraWidth (for OrthographicCamera) and TargetPosition (if adjustTargetPosition is true) so that all the objects on defined in list of Visual3D objects will be visible from one edge of the viewport to another edge.
Public methodGetFitIntoViewDistanceOrCameraWidth GetFitIntoViewDistanceOrCameraWidth returns Distance (for PerspectiveCamera) or CameraWidth (for OrthographicCamera) and sets the newTargetPosition that will adjust the camera so that all the objects on the scene will be visible from one edge of the viewport to another edge.
Protected methodGetTargetPosition Gets the value of TargetPositionProperty
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 SphericalCameraIsValid(Boolean))
Protected methodOnIsValidChanged OnIsValidChanged is called on IsValidChanged event. The event is subscribed by calling SubscribeToIsValidChanged and unsubscribed by calling UnsubscribeFromIsValidChanged.
(Overrides BaseCameraOnIsValidChanged(Object, EventArgs))
Protected methodSetCameraPosition Sets the camera position on cameraToUpdate based on the TargetPosition
Protected methodSetTargetPosition Sets the value of TargetPositionProperty
Protected methodUpdateCamera Updates the PerspectiveCamera
(Overrides SphericalCameraUpdateCamera(ProjectionCamera))
Top
Fields
 NameDescription
Public fieldStatic memberDistanceProperty DistanceProperty
Public fieldStatic memberTargetPositionProperty TargetPositionProperty
Top
See Also