Skip to main content

LightAPI

Struct LightAPI 

Source
pub struct LightAPI<'a>(/* private fields */);
Expand description

API schema that imparts the quality of being a light onto a prim.

Implementations§

Source§

impl LightAPI<'_>

Source

pub fn define(stage: &Stage, path: impl Into<Path>) -> LightAPI<'_>

Source

pub fn intensity_attr(&self) -> Attribute<'_>

Scales the brightness of the light linearly.

Source

pub fn exposure_attr(&self) -> Attribute<'_>

Scales the brightness of the light exponentially as a power of 2 (similar to an F-stop control over exposure). The result is multiplied against the intensity.

Source

pub fn diffuse_attr(&self) -> Attribute<'_>

A multiplier for the effect of this light on the diffuse response of materials. This is a non-physical control.

Source

pub fn specular_attr(&self) -> Attribute<'_>

A multiplier for the effect of this light on the specular response of materials. This is a non-physical control.

Source

pub fn normalize_attr(&self) -> Attribute<'_>

Normalizes the emission such that the power of the light remains constant while altering the size of the light, by dividing the luminance by the world-space surface area of the light.

This makes it easier to independently adjust the brightness and size of the light, by causing the total illumination provided by a light to not vary with the area or angular size of the light.

Source

pub fn color_attr(&self) -> Attribute<'_>

The color of emitted light, in the rendering color space. This color is just multiplied with the emission.

Source

pub fn enable_color_temperature_attr(&self) -> Attribute<'_>

Enables using colorTemperature.

Source

pub fn color_temperature_attr(&self) -> Attribute<'_>

Color temperature, in degrees Kelvin, representing the white point. The default is a common white point, D65. Lower values are warmer and higher values are cooler. The valid range is from 1000 to 10000. Only takes effect when enableColorTemperature is set to true.

Methods from Deref<Target = SchemaBase<'a>>§

Source

pub fn prim(&self) -> &Prim<'a>

Trait Implementations§

Source§

impl<'a> Deref for LightAPI<'a>

Source§

type Target = SchemaBase<'a>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for LightAPI<'a>

§

impl<'a> !Send for LightAPI<'a>

§

impl<'a> !Sync for LightAPI<'a>

§

impl<'a> !UnwindSafe for LightAPI<'a>

§

impl<'a> Freeze for LightAPI<'a>

§

impl<'a> Unpin for LightAPI<'a>

§

impl<'a> UnsafeUnpin for LightAPI<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.