[][src]Struct magrathea::ElevationColor

pub struct ElevationColor<Kind> {
    pub kind: Kind,
    pub color: Srgb<f32>,
    pub elevation: Length<f32, Kilometers>,
}

A pairing of an elevation and a color

Fields

kind: Kindcolor: Srgb<f32>

The color used for this elevation

elevation: Length<f32, Kilometers>

The elevation of this color

Implementations

impl<Kind> ElevationColor<Kind>[src]

pub fn from_u8(
    kind: Kind,
    r: u8,
    g: u8,
    b: u8,
    elevation: Length<f32, Kilometers>
) -> Self
[src]

Constructor to take RGB byte components and an elevation

impl ElevationColor<Earthlike>[src]

pub fn earthlike() -> SortedVec<Self>[src]

A basic elevation color palette that kinda resembles an earthlike planet

impl ElevationColor<Sunlike>[src]

pub fn sunlike() -> SortedVec<Self>[src]

A basic elevation color palette that kinda resembles a star like our sun

Trait Implementations

impl<Kind: Clone> Clone for ElevationColor<Kind>[src]

impl<Kind: Copy> Copy for ElevationColor<Kind>[src]

impl<Kind: Debug> Debug for ElevationColor<Kind>[src]

impl<Kind> PartialEq<ElevationColor<Kind>> for ElevationColor<Kind>[src]

impl<Kind> PartialOrd<ElevationColor<Kind>> for ElevationColor<Kind>[src]

fn partial_cmp(&self, other: &Self) -> Option<Ordering>[src]

partial_cmp only compares against elevation

Auto Trait Implementations

impl<Kind> RefUnwindSafe for ElevationColor<Kind> where
    Kind: RefUnwindSafe

impl<Kind> Send for ElevationColor<Kind> where
    Kind: Send

impl<Kind> Sync for ElevationColor<Kind> where
    Kind: Sync

impl<Kind> Unpin for ElevationColor<Kind> where
    Kind: Unpin

impl<Kind> UnwindSafe for ElevationColor<Kind> where
    Kind: UnwindSafe

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

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, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Scalar for T where
    T: PartialEq<T> + Copy + Any + Debug
[src]

impl<T> SetParameter for T

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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

type Owned = T

The resulting type after obtaining ownership.

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.

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