# MeshGeometry3D

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

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

```rust
struct MeshGeometry3D
```

WPF's `MeshGeometry3D`: `Positions`, `Normals`, `TextureCoordinates` and
`TriangleIndices`.

When `TriangleIndices` is empty the positions are taken three at a time; a triangle with an
index out of range is left out; normals are generated from the faces when there is not one
per position, as WPF does.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`positions_property`](#function-positions_property)
- [`normals_property`](#function-normals_property)
- [`texture_coordinates_property`](#function-texture_coordinates_property)
- [`triangle_indices_property`](#function-triangle_indices_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`id`](#function-id)
- [`version`](#function-version)
- [`positions`](#function-positions)
- [`set_positions`](#function-set_positions)
- [`normals`](#function-normals)
- [`set_normals`](#function-set_normals)
- [`texture_coordinates`](#function-texture_coordinates)
- [`set_texture_coordinates`](#function-set_texture_coordinates)
- [`triangle_indices`](#function-triangle_indices)
- [`set_triangle_indices`](#function-set_triangle_indices)
- [`mesh_data`](#function-mesh_data)

<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/geometry_3d.rs#L86)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### positions_property

```rust
fn positions_property() -> &'static StyledProperty<Option<Point3DCollection>>
```



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

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

### normals_property

```rust
fn normals_property() -> &'static StyledProperty<Option<Vector3DCollection>>
```



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

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

### texture_coordinates_property

```rust
fn texture_coordinates_property() -> &'static StyledProperty<Option<Points>>
```



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

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

### triangle_indices_property

```rust
fn triangle_indices_property() -> &'static StyledProperty<Option<Int32Collection>>
```



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

<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/geometry_3d.rs#L165)

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

### new

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

An empty mesh.

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

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

### id

```rust
fn id(self: &Self) -> u64
```

The identity of the mesh, unique in the process.

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

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

### version

```rust
fn version(self: &Self) -> u64
```

The version of the content of the mesh: bumped by every change of a collection or of a
property.

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

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

### positions

```rust
fn positions(self: &Self) -> Point3DCollection
```

The positions of the vertices. Panics if the property has been cleared.

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

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

### set_positions

```rust
fn set_positions(self: &Self, value: Point3DCollection)
```



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

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

### normals

```rust
fn normals(self: &Self) -> Vector3DCollection
```

The normals of the vertices. Panics if the property has been cleared.

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

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

### set_normals

```rust
fn set_normals(self: &Self, value: Vector3DCollection)
```



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

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

### texture_coordinates

```rust
fn texture_coordinates(self: &Self) -> Points
```

The texture coordinates of the vertices. Panics if the property has been cleared.

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

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

### set_texture_coordinates

```rust
fn set_texture_coordinates(self: &Self, value: Points)
```



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

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

### triangle_indices

```rust
fn triangle_indices(self: &Self) -> Int32Collection
```

The indices of the vertices of the triangles, three per triangle. Panics if the property
has been cleared.

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

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

### set_triangle_indices

```rust
fn set_triangle_indices(self: &Self, value: Int32Collection)
```



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

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

### mesh_data

```rust
fn mesh_data(self: &Self) -> Arc<MeshData>
```

The triangles in single precision, made once per version and shared.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`Geometry3DImplExt`](/docs/0.5.0/api/ferroui-media3d/trait-geometry3dimplext/)
- `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<MeshGeometry3D>`](/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/)
- [`Geometry3DImpl`](/docs/0.5.0/api/ferroui-media3d/trait-geometry3dimpl/)

## Availability

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