# OrthographicCamera

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-media3d/struct-orthographiccamera/

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

```rust
struct OrthographicCamera
```

WPF's `OrthographicCamera`: a parallel projection `Width` wide (2 by default).

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`width_property`](#function-width_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`with_values`](#function-with_values)
- [`width`](#function-width)
- [`set_width`](#function-set_width)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

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

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

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<OrthographicCamera>
```

Returns a strong reference to this object.

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

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

### width_property

```rust
fn width_property() -> &'static StyledProperty<f64>
```



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

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

### construct

```rust
fn construct() -> Self
```

Creates the class data.

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

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

### new

```rust
fn new() -> Ref<Self>
```

A camera with WPF's defaults: at the origin, looking down the negative z axis, 2 wide.

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

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

### with_values

```rust
fn with_values(position: Point3D, look_direction: Vector3D, up_direction: Vector3D, width: f64) -> Ref<Self>
```

A camera at `position` looking along `look_direction` with `up_direction` up, `width`
wide.

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

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

### width

```rust
fn width(self: &Self) -> f64
```

The width of the view.

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

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

### set_width

```rust
fn set_width(self: &Self, value: f64)
```



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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`CameraImplExt`](/docs/0.5.0/api/ferroui-media3d/trait-cameraimplext/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<OrthographicCamera>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`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/).
