Enum pix_engine::lighting::LightSource
source · 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 copy 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: 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
This method 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: 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> StructuralEq for LightSource<T, N>
impl<T, const N: usize> StructuralPartialEq for LightSource<T, N>
Auto Trait Implementations§
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more