# CameraImpl

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-media3d/trait-cameraimpl/

**trait** · [`ferroui-media3d`](/docs/0.5.0/api/ferroui-media3d/) · v0.5.0

```rust
trait CameraImpl: FerroObjectImpl + $crate::Upcast<Camera>
```

The overridable members introduced by the class.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media3D/camera.rs#L28)

## Members

- [`get_view_matrix`](#function-get_view_matrix)
- [`get_projection_matrix`](#function-get_projection_matrix)

<a id="function-get_view_matrix"></a>

### get_view_matrix

```rust
fn get_view_matrix(this: &Self) -> Matrix3D
```

The matrix from the world to the coordinates of the camera, its transform included
(WPF's `GetViewMatrix`). Not finite when the transform has no inverse: the camera
then shows nothing.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media3D/camera.rs#L28)

<a id="function-get_projection_matrix"></a>

### get_projection_matrix

```rust
fn get_projection_matrix(this: &Self, aspect_ratio: f64, near_plane_distance: f64, far_plane_distance: f64) -> Matrix3D
```

The matrix from the coordinates of the camera to the clip space for the aspect ratio
(width over height) and the near and far planes (WPF's `GetProjectionMatrix`, with
the planes given, as the snapshot fits them to the scene). A matrix camera ignores
the planes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media3D/camera.rs#L28)

## Trait implementations

- [`CameraImpl`](/docs/0.5.0/api/ferroui-media3d/trait-cameraimpl/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
