[][src]Struct pbrt::core::spectrum::RGBSpectrum

pub struct RGBSpectrum {
    pub c: [Float; 3],
}

Fields

c: [Float; 3]

Methods

impl RGBSpectrum[src]

pub fn new(v: Float) -> Self[src]

pub fn rgb(r: Float, g: Float, b: Float) -> RGBSpectrum[src]

pub fn from_srgb(rgb: &[u8; 3]) -> RGBSpectrum[src]

pub fn inverse_gamma_correct(&self) -> RGBSpectrum[src]

pub fn from_rgb(rgb: &[Float; 3]) -> RGBSpectrum[src]

pub fn to_rgb(&self, rgb: &mut [Float; 3])[src]

pub fn to_xyz(&self, xyz: &mut [Float; 3])[src]

pub fn from_xyz(xyz: &[Float; 3], _spectrum_type: SpectrumType) -> RGBSpectrum[src]

pub fn y(&self) -> Float[src]

pub fn from_sampled(lambda: &[Float], v: &[Float], n: i32) -> RGBSpectrum[src]

pub fn is_black(&self) -> bool[src]

pub fn sqrt(&self) -> RGBSpectrum[src]

pub fn exp(&self) -> RGBSpectrum[src]

pub fn clamp(&self, low: Float, high: Float) -> RGBSpectrum[src]

Clamp spectrum to lie between the values low and high. Use (0.0 as Float, std::f32::INFINITY as Float) if there are no specific values.

pub fn max_component_value(&self) -> Float[src]

pub fn has_nans(&self) -> bool[src]

Trait Implementations

impl Texture<RGBSpectrum> for ImageTexture<Spectrum>[src]

impl Texture<RGBSpectrum> for MarbleTexture[src]

impl ImageTextureConvert<RGBSpectrum> for ImageTexture<Spectrum>[src]

impl Default for RGBSpectrum[src]

impl Clone for RGBSpectrum[src]

impl PartialEq<RGBSpectrum> for RGBSpectrum[src]

impl From<f32> for RGBSpectrum[src]

impl Copy for RGBSpectrum[src]

impl Add<RGBSpectrum> for RGBSpectrum[src]

type Output = RGBSpectrum

The resulting type after applying the + operator.

impl Sub<RGBSpectrum> for RGBSpectrum[src]

type Output = RGBSpectrum

The resulting type after applying the - operator.

impl Mul<RGBSpectrum> for RGBSpectrum[src]

type Output = RGBSpectrum

The resulting type after applying the * operator.

impl Mul<f32> for RGBSpectrum[src]

type Output = RGBSpectrum

The resulting type after applying the * operator.

impl Mul<RGBSpectrum> for Float[src]

type Output = RGBSpectrum

The resulting type after applying the * operator.

impl Div<RGBSpectrum> for RGBSpectrum[src]

type Output = RGBSpectrum

The resulting type after applying the / operator.

impl Div<f32> for RGBSpectrum[src]

type Output = RGBSpectrum

The resulting type after applying the / operator.

impl Neg for RGBSpectrum[src]

type Output = RGBSpectrum

The resulting type after applying the - operator.

impl AddAssign<RGBSpectrum> for RGBSpectrum[src]

impl MulAssign<RGBSpectrum> for RGBSpectrum[src]

impl DivAssign<f32> for RGBSpectrum[src]

impl Index<usize> for RGBSpectrum[src]

type Output = Float

The returned type after indexing.

impl IndexMut<usize> for RGBSpectrum[src]

impl Debug for RGBSpectrum[src]

impl Zero for RGBSpectrum[src]

Auto Trait Implementations

impl Send for RGBSpectrum

impl Unpin for RGBSpectrum

impl Sync for RGBSpectrum

impl UnwindSafe for RGBSpectrum

impl RefUnwindSafe for RGBSpectrum

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> for T[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.

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

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

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

impl<T> SetParameter for T[src]