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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§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
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: Copy, const N: usize> Copy for LightSource<T, N>
impl<T: Eq, const N: usize> Eq for LightSource<T, N>
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> 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.