Click or drag to resize
AB4D logo

BaseCameraCameraType Property

Gets or sets a type of camera. The default camera type value is PerspectiveCamera. The camera type can be also OrthographicCamera.

Namespace:  Ab3d.Cameras
Assembly:  Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 10.1.8147.1045
public BaseCameraCameraTypes CameraType { get; set; }

Property Value

Type: BaseCameraCameraTypes

The most used camera types in WPF are PerspectiveCamera and OrthographicCamera. The PerspectiveCamera creates a camera that is similar to the real world where the objects that are farther way from the camera appear smaller. The OrthographicCamera is different because with that camera the distance does not change the objects size. The rendered objects do not appear so real as with PerspectiveCamera. That advantage of OrthographicCamera is that the objects sizes are preserved and the lines that are parallel in 3D stay parallel in 2D.

Because of those differences, some of the properties to control the camera are different for each camera type. The PerspectiveCamera uses FieldOfView and Distance properties. The OrthographicCamera uses CameraWidth property (Note that original WPF's OrthographicCamera uses Width property. But because Ab3d.Cameras are derived from FrameworkElement and therefore already contain Width property, the CameraWidth name is used for that.)

Because changing Distance does not affect the objects shown with OrthographicCamera, the CameraWidth property is changed instead of Distance when the camera is controller by the MouseCameraController or CameraControlPanel

See Also