# SpotLight

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

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

```rust
struct SpotLight
```

WPF's `SpotLight`: light from `Position` in a cone along `Direction`, full inside
`InnerConeAngle` (180 degrees by default) and none beyond `OuterConeAngle` (90 degrees by
default), both full angles in degrees.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`direction_property`](#function-direction_property)
- [`inner_cone_angle_property`](#function-inner_cone_angle_property)
- [`outer_cone_angle_property`](#function-outer_cone_angle_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`with_values`](#function-with_values)
- [`direction`](#function-direction)
- [`set_direction`](#function-set_direction)
- [`inner_cone_angle`](#function-inner_cone_angle)
- [`set_inner_cone_angle`](#function-set_inner_cone_angle)
- [`outer_cone_angle`](#function-outer_cone_angle)
- [`set_outer_cone_angle`](#function-set_outer_cone_angle)

<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/light.rs#L291)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### direction_property

```rust
fn direction_property() -> &'static StyledProperty<Vector3D>
```



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

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

### inner_cone_angle_property

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



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

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

### outer_cone_angle_property

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



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

<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/light.rs#L317)

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

### new

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

A white light at the origin along the negative z axis.

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

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

### with_values

```rust
fn with_values(color: Color, position: Point3D, direction: Vector3D, outer_cone_angle: f64, inner_cone_angle: f64) -> Ref<Self>
```

A light of `color` at `position` along `direction` with the outer and inner cone angles,
in the order of WPF's constructor.

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

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

### direction

```rust
fn direction(self: &Self) -> Vector3D
```

The direction of the cone.

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

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

### set_direction

```rust
fn set_direction(self: &Self, value: Vector3D)
```



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

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

### inner_cone_angle

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

The full angle of the cone of full light, in degrees.

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

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

### set_inner_cone_angle

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



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

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

### outer_cone_angle

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

The full angle of the cone beyond which there is no light, in degrees.

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

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

### set_outer_cone_angle

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



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

## 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<SpotLight>`](/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/)
- [`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/).
