[][src]Enum gltf::khr_lights_punctual::Kind

pub enum Kind {
    Directional,
    Point,
    Spot {
        inner_cone_angle: f32,
        outer_cone_angle: f32,
    },
}
This is supported on feature="KHR_lights_punctual" only.

Light subcategory.

Variants

Directional
This is supported on feature="KHR_lights_punctual" only.

Directional lights are light sources that act as though they are infinitely far away and emit light in the direction of the local -z axis. This light type inherits the orientation of the node that it belongs to; position and scale are ignored except for their effect on the inherited node orientation. Because it is at an infinite distance, the light is not attenuated. Its intensity is defined in lumens per metre squared, or lux (lm/m2).

Point
This is supported on feature="KHR_lights_punctual" only.

Point lights emit light in all directions from their position in space; rotation and scale are ignored except for their effect on the inherited node position. The brightness of the light attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). Point light intensity is defined in candela, which is lumens per square radian (lm/sr).

Spot
This is supported on feature="KHR_lights_punctual" only.

Spot lights emit light in a cone in the direction of the local -z axis. The angle and falloff of the cone is defined using two numbers, the inner_cone_angle and outer_cone_angle. As with point lights, the brightness also attenuates in a physically correct manner as distance increases from the light's position (i.e. brightness goes like the inverse square of the distance). Spot light intensity refers to the brightness inside the inner_cone_angle (and at the location of the light) and is defined in candela, which is lumens per square radian (lm/sr). Engines that don't support two angles for spotlights should use outer_cone_angle as the spotlight angle (leaving inner_cone_angle to implicitly be 0).

A spot light's position and orientation are inherited from its node transform. Inherited scale does not affect cone shape, and is ignored except for its effect on position and orientation.

Fields of Spot

inner_cone_angle: f32
This is supported on feature="KHR_lights_punctual" only.

Angle in radians from centre of spotlight where falloff begins.

outer_cone_angle: f32
This is supported on feature="KHR_lights_punctual" only.

Angle in radians from centre of spotlight where falloff ends.

Auto Trait Implementations

impl RefUnwindSafe for Kind

impl Send for Kind

impl Sync for Kind

impl Unpin for Kind

impl UnwindSafe for Kind

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.