Fields
c: [Float; 3]
Implementations
sourceimpl RGBSpectrum
impl RGBSpectrum
pub fn new(v: Float) -> Self
pub fn rgb(r: Float, g: Float, b: Float) -> RGBSpectrum
pub fn from_srgb(rgb: [u8; 3]) -> RGBSpectrum
pub fn inverse_gamma_correct(&self) -> RGBSpectrum
pub fn from_rgb(rgb: &[Float; 3]) -> RGBSpectrum
pub fn to_rgb(&self, rgb: &mut [Float; 3])
pub fn to_xyz(&self, xyz: &mut [Float; 3])
pub fn from_xyz(xyz: &[Float; 3], _spectrum_type: SpectrumType) -> RGBSpectrum
pub fn y(&self) -> Float
pub fn from_sampled(lambda: &[Float], v: &[Float], n: i32) -> RGBSpectrum
pub fn is_black(&self) -> bool
pub fn sqrt(&self) -> RGBSpectrum
pub fn exp(&self) -> RGBSpectrum
sourcepub fn clamp(&self, low: Float, high: Float) -> RGBSpectrum
pub fn clamp(&self, low: Float, high: Float) -> RGBSpectrum
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
pub fn has_nans(&self) -> bool
Trait Implementations
sourceimpl Add<RGBSpectrum> for RGBSpectrum
impl Add<RGBSpectrum> for RGBSpectrum
type Output = RGBSpectrum
type Output = RGBSpectrum
The resulting type after applying the +
operator.
sourcefn add(self, rhs: RGBSpectrum) -> RGBSpectrum
fn add(self, rhs: RGBSpectrum) -> RGBSpectrum
Performs the +
operation. Read more
sourceimpl AddAssign<RGBSpectrum> for RGBSpectrum
impl AddAssign<RGBSpectrum> for RGBSpectrum
sourcefn add_assign(&mut self, rhs: RGBSpectrum)
fn add_assign(&mut self, rhs: RGBSpectrum)
Performs the +=
operation. Read more
sourceimpl Clone for RGBSpectrum
impl Clone for RGBSpectrum
sourcefn clone(&self) -> RGBSpectrum
fn clone(&self) -> RGBSpectrum
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RGBSpectrum
impl Debug for RGBSpectrum
sourceimpl Default for RGBSpectrum
impl Default for RGBSpectrum
sourcefn default() -> RGBSpectrum
fn default() -> RGBSpectrum
Returns the “default value” for a type. Read more
sourceimpl Div<RGBSpectrum> for RGBSpectrum
impl Div<RGBSpectrum> for RGBSpectrum
type Output = RGBSpectrum
type Output = RGBSpectrum
The resulting type after applying the /
operator.
sourcefn div(self, rhs: RGBSpectrum) -> RGBSpectrum
fn div(self, rhs: RGBSpectrum) -> RGBSpectrum
Performs the /
operation. Read more
sourceimpl Div<f32> for RGBSpectrum
impl Div<f32> for RGBSpectrum
type Output = RGBSpectrum
type Output = RGBSpectrum
The resulting type after applying the /
operator.
sourcefn div(self, rhs: Float) -> RGBSpectrum
fn div(self, rhs: Float) -> RGBSpectrum
Performs the /
operation. Read more
sourceimpl DivAssign<f32> for RGBSpectrum
impl DivAssign<f32> for RGBSpectrum
sourcefn div_assign(&mut self, rhs: Float)
fn div_assign(&mut self, rhs: Float)
Performs the /=
operation. Read more
sourceimpl From<f32> for RGBSpectrum
impl From<f32> for RGBSpectrum
sourceimpl ImageTextureConvert<RGBSpectrum> for ImageTexture<Spectrum>
impl ImageTextureConvert<RGBSpectrum> for ImageTexture<Spectrum>
fn convert_out(from: &Spectrum, to: &mut Spectrum)
sourceimpl Index<RGBEnum> for RGBSpectrum
impl Index<RGBEnum> for RGBSpectrum
sourceimpl IndexMut<RGBEnum> for RGBSpectrum
impl IndexMut<RGBEnum> for RGBSpectrum
sourceimpl Mul<RGBSpectrum> for RGBSpectrum
impl Mul<RGBSpectrum> for RGBSpectrum
type Output = RGBSpectrum
type Output = RGBSpectrum
The resulting type after applying the *
operator.
sourcefn mul(self, rhs: RGBSpectrum) -> RGBSpectrum
fn mul(self, rhs: RGBSpectrum) -> RGBSpectrum
Performs the *
operation. Read more
sourceimpl Mul<RGBSpectrum> for Float
impl Mul<RGBSpectrum> for Float
type Output = RGBSpectrum
type Output = RGBSpectrum
The resulting type after applying the *
operator.
sourcefn mul(self, rhs: RGBSpectrum) -> RGBSpectrum
fn mul(self, rhs: RGBSpectrum) -> RGBSpectrum
Performs the *
operation. Read more
sourceimpl Mul<f32> for RGBSpectrum
impl Mul<f32> for RGBSpectrum
type Output = RGBSpectrum
type Output = RGBSpectrum
The resulting type after applying the *
operator.
sourcefn mul(self, rhs: Float) -> RGBSpectrum
fn mul(self, rhs: Float) -> RGBSpectrum
Performs the *
operation. Read more
sourceimpl MulAssign<RGBSpectrum> for RGBSpectrum
impl MulAssign<RGBSpectrum> for RGBSpectrum
sourcefn mul_assign(&mut self, rhs: RGBSpectrum)
fn mul_assign(&mut self, rhs: RGBSpectrum)
Performs the *=
operation. Read more
sourceimpl Neg for RGBSpectrum
impl Neg for RGBSpectrum
type Output = RGBSpectrum
type Output = RGBSpectrum
The resulting type after applying the -
operator.
sourcefn neg(self) -> RGBSpectrum
fn neg(self) -> RGBSpectrum
Performs the unary -
operation. Read more
sourceimpl PartialEq<RGBSpectrum> for RGBSpectrum
impl PartialEq<RGBSpectrum> for RGBSpectrum
sourceimpl Sub<RGBSpectrum> for RGBSpectrum
impl Sub<RGBSpectrum> for RGBSpectrum
type Output = RGBSpectrum
type Output = RGBSpectrum
The resulting type after applying the -
operator.
sourcefn sub(self, rhs: RGBSpectrum) -> RGBSpectrum
fn sub(self, rhs: RGBSpectrum) -> RGBSpectrum
Performs the -
operation. Read more
sourceimpl Texture<RGBSpectrum> for ImageTexture<Spectrum>
impl Texture<RGBSpectrum> for ImageTexture<Spectrum>
fn evaluate(&self, si: &SurfaceInteraction<'_>) -> Spectrum
sourceimpl Texture<RGBSpectrum> for MarbleTexture
impl Texture<RGBSpectrum> for MarbleTexture
fn evaluate(&self, si: &SurfaceInteraction<'_>) -> Spectrum
sourceimpl Zero for RGBSpectrum
impl Zero for RGBSpectrum
impl Copy for RGBSpectrum
Auto Trait Implementations
impl RefUnwindSafe for RGBSpectrum
impl Send for RGBSpectrum
impl Sync for RGBSpectrum
impl Unpin for RGBSpectrum
impl UnwindSafe for RGBSpectrum
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<R, P> ReadPrimitive<R> for P where
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for P where
R: Read + ReadEndian<P>,
P: Default,
sourcefn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian()
.
sourcefn read_from_big_endian(read: &mut R) -> Result<Self, Error>
fn read_from_big_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian()
.
sourcefn read_from_native_endian(read: &mut R) -> Result<Self, Error>
fn read_from_native_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian()
.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more