# Model3D

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

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

```rust
struct Model3D
```

WPF's `Model3D`: the base of the models and the lights.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`bounds_core`](#function-bounds_core)
- [`transform_property`](#function-transform_property)
- [`construct`](#function-construct)
- [`transform`](#function-transform)
- [`set_transform`](#function-set_transform)
- [`bounds`](#function-bounds)
- [`changed`](#function-changed)

<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/model_3d.rs#L26)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### bounds_core

```rust
fn bounds_core(self: &Self) -> Rect3D
```

The bounds of the model before its own transform (WPF's `CalculateSubgraphBoundsInnerSpace`).

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

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

### transform_property

```rust
fn transform_property() -> &'static StyledProperty<Option<Ref<Transform3D>>>
```



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

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

### construct

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

Creates the class data; see `ferroui_base::FerroObject::construct`.

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

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

### transform

```rust
fn transform(self: &Self) -> Option<Ref<Transform3D>>
```

The transform of the model; none is the identity.

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

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

### set_transform

```rust
fn set_transform(self: &Self, value: Option<Ref<Transform3D>>)
```



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

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

### bounds

```rust
fn bounds(self: &Self) -> Rect3D
```

The axis-aligned bounds of the model after its transform (WPF's `Bounds`):
`Rect3D::EMPTY` for a light, the bounds of the geometry of a `GeometryModel3D`, the
union of the children of a `Model3DGroup`.

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

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

### changed

```rust
fn changed(self: &Self, handler: impl Fn(Scene3DChange) -> () + 'static) -> Subscription
```

Calls `handler` on every change of the model, until the returned guard is dropped.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`Model3DImplExt`](/docs/0.5.0/api/ferroui-media3d/trait-model3dimplext/)
- `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<Model3D>`](/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/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`Model3DImpl`](/docs/0.5.0/api/ferroui-media3d/trait-model3dimpl/)

## Availability

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