pub enum LightSource<T = f64, const N: usize = 3> {
Ambient,
Point(Point<T, N>),
Direction(Vector<T, N>),
}Expand description
Source of Light.
Variants§
Ambient
Ambient light.
Point(Point<T, N>)
Light from a specific point.
Direction(Vector<T, N>)
Light from a specific direction.
Trait Implementations§
Source§impl<T: Clone, const N: usize> Clone for LightSource<T, N>
impl<T: Clone, const N: usize> Clone for LightSource<T, N>
Source§fn clone(&self) -> LightSource<T, N>
fn clone(&self) -> LightSource<T, N>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<T: Copy, const N: usize> Copy for LightSource<T, N>
Source§impl<'de, T, const N: usize> Deserialize<'de> for LightSource<T, N>where
T: Serialize + DeserializeOwned,
impl<'de, T, const N: usize> Deserialize<'de> for LightSource<T, N>where
T: Serialize + DeserializeOwned,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<T: Eq, const N: usize> Eq for LightSource<T, N>
Source§impl<T: PartialEq, const N: usize> PartialEq for LightSource<T, N>
impl<T: PartialEq, const N: usize> PartialEq for LightSource<T, N>
Source§fn eq(&self, other: &LightSource<T, N>) -> bool
fn eq(&self, other: &LightSource<T, N>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<T, const N: usize> Serialize for LightSource<T, N>where
T: Serialize + DeserializeOwned,
impl<T, const N: usize> Serialize for LightSource<T, N>where
T: Serialize + DeserializeOwned,
impl<T, const N: usize> StructuralPartialEq for LightSource<T, N>
Auto Trait Implementations§
impl<T, const N: usize> Freeze for LightSource<T, N>where
T: Freeze,
impl<T, const N: usize> RefUnwindSafe for LightSource<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for LightSource<T, N>where
T: Send,
impl<T, const N: usize> Sync for LightSource<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for LightSource<T, N>where
T: Unpin,
impl<T, const N: usize> UnsafeUnpin for LightSource<T, N>where
T: UnsafeUnpin,
impl<T, const N: usize> UnwindSafe for LightSource<T, N>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.