Struct LightEnviroment

Source
pub struct LightEnviroment<S> {
    pub point_entity: PointEntity<S>,
    pub pitch: Option<f64>,
    pub direct_color: ColorBrightness,
    pub amb_color: ColorBrightness,
    pub direct_color_hdr: Option<ColorBrightness>,
    pub direct_hdr_scale: f64,
    pub amb_color_hdr: Option<ColorBrightness>,
    pub amb_hdr_scale: f64,
    pub sun_spread_angle: f64,
}
Expand description

Fields§

§point_entity: PointEntity<S>

Common Fields. Including classname, origin, angles, flags, etc.

§pitch: Option<f64>

Pitch (pitch). Overrides the pitch value in Angles, even if left at 0, so it needs to be specified. Contrary to Angles, the rotation of this pitch is measured counter-clockwise from the horizontal, so that 90 is straight up, while -90 is straight down. (It’s simply the negative of a normal pitch value.)

§direct_color: ColorBrightness

Brightness (_light). Color and brightness of the direct sunlight.

§amb_color: ColorBrightness

Ambient (_ambient). Color and brightness of the diffuse skylight.

§direct_color_hdr: Option<ColorBrightness>

BrightnessHDR (_lightHDR) Override for Brightness when compiling HDR lighting. Defaults to -1 -1 -1 1, which means “same as LDR”.

§direct_hdr_scale: f64

BrightnessScaleHDR (_lightscaleHDR) Amount to scale the direct light by when compiling for HDR.

§amb_color_hdr: Option<ColorBrightness>

AmbientHDR (_ambientHDR) Override for Ambient when compiling HDR lighting. Defaults to -1 -1 -1 1, which means “same as LDR”.

§amb_hdr_scale: f64

AmbientScaleHDR (_AmbientScaleHDR) Amount to scale the ambient light by when compiling for HDR.

§sun_spread_angle: f64

SunSpreadAngle (SunSpreadAngle) The angular extent of the sun for casting soft shadows. Higher numbers are more diffuse. 5 is a good starting value. Remember: on cloudy days, the shadows will be blurred because the sunlight is being diffused by clouds. Try 90 for hazy days, and use 135 for cloudy days, rain and fog. If you’re trying a night atmosphere, sometimes you’ll need up to 180. You’ll also have to turn down the shadow alpha in your shadow_control entity - try changing the Shadow Color variable to something such as 50 50 50.

Trait Implementations§

Source§

impl<S: Clone> Clone for LightEnviroment<S>

Source§

fn clone(&self) -> LightEnviroment<S>

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<S: Debug> Debug for LightEnviroment<S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<S: Default> Default for LightEnviroment<S>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<S: PartialEq> PartialEq for LightEnviroment<S>

Source§

fn eq(&self, other: &LightEnviroment<S>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, S> ToLower<Entity<S>> for LightEnviroment<S>
where S: AsRef<str> + Clone + From<&'a str> + From<String>,

Source§

fn into_lower(self) -> Entity<S>

Convert to a lower level of abstraction. See ToLower
Source§

fn to_lower(&self) -> T

Convert to an owned lower level of abstraction. See ToLower
Source§

impl<S> StructuralPartialEq for LightEnviroment<S>

Auto Trait Implementations§

§

impl<S> Freeze for LightEnviroment<S>
where S: Freeze,

§

impl<S> RefUnwindSafe for LightEnviroment<S>
where S: RefUnwindSafe,

§

impl<S> Send for LightEnviroment<S>
where S: Send,

§

impl<S> Sync for LightEnviroment<S>
where S: Sync,

§

impl<S> Unpin for LightEnviroment<S>
where S: Unpin,

§

impl<S> UnwindSafe for LightEnviroment<S>
where S: UnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V