Enum cogl::FogMode[][src]

#[non_exhaustive]
pub enum FogMode {
    Linear,
    Exponential,
    ExponentialSquared,
    // some variants omitted
}

The fog mode determines the equation used to calculate the fogging blend factor while fogging is enabled. The simplest FogMode::Linear mode determines f as:

  f = end - eye_distance / end - start

Where eye_distance is the distance of the current fragment in eye coordinates from the origin.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Linear

Calculates the fog blend factor as:

  f = end - eye_distance / end - start
Exponential

Calculates the fog blend factor as:

  f = e ^ -(density * eye_distance)
ExponentialSquared

Calculates the fog blend factor as:

  f = e ^ -(density * eye_distance)^2

Trait Implementations

impl Clone for FogMode[src]

impl Copy for FogMode[src]

impl Debug for FogMode[src]

impl Display for FogMode[src]

impl Eq for FogMode[src]

impl<'a> FromValue<'a> for FogMode[src]

impl<'a> FromValueOptional<'a> for FogMode[src]

impl Hash for FogMode[src]

impl Ord for FogMode[src]

impl PartialEq<FogMode> for FogMode[src]

impl PartialOrd<FogMode> for FogMode[src]

impl SetValue for FogMode[src]

impl StaticType for FogMode[src]

impl StructuralEq for FogMode[src]

impl StructuralPartialEq for FogMode[src]

Auto Trait Implementations

impl RefUnwindSafe for FogMode

impl Send for FogMode

impl Sync for FogMode

impl Unpin for FogMode

impl UnwindSafe for FogMode

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: SetValue + Send + ToValue + ?Sized
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.