Struct rs_pbrt::core::spectrum::RGBSpectrum
source · pub struct RGBSpectrum {
pub c: [Float; 3],
}
Fields§
§c: [Float; 3]
Implementations§
source§impl 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§
source§impl Add<RGBSpectrum> for RGBSpectrum
impl Add<RGBSpectrum> for RGBSpectrum
§type Output = RGBSpectrum
type Output = RGBSpectrum
The resulting type after applying the
+
operator.source§fn add(self, rhs: RGBSpectrum) -> RGBSpectrum
fn add(self, rhs: RGBSpectrum) -> RGBSpectrum
Performs the
+
operation. Read moresource§impl AddAssign<RGBSpectrum> for RGBSpectrum
impl AddAssign<RGBSpectrum> for RGBSpectrum
source§fn add_assign(&mut self, rhs: RGBSpectrum)
fn add_assign(&mut self, rhs: RGBSpectrum)
Performs the
+=
operation. Read moresource§impl Clone for RGBSpectrum
impl Clone for RGBSpectrum
source§fn clone(&self) -> RGBSpectrum
fn clone(&self) -> RGBSpectrum
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 Debug for RGBSpectrum
impl Debug for RGBSpectrum
source§impl Default for RGBSpectrum
impl Default for RGBSpectrum
source§fn default() -> RGBSpectrum
fn default() -> RGBSpectrum
Returns the “default value” for a type. Read more
source§impl Div<RGBSpectrum> for RGBSpectrum
impl Div<RGBSpectrum> for RGBSpectrum
§type Output = RGBSpectrum
type Output = RGBSpectrum
The resulting type after applying the
/
operator.source§fn div(self, rhs: RGBSpectrum) -> RGBSpectrum
fn div(self, rhs: RGBSpectrum) -> RGBSpectrum
Performs the
/
operation. Read moresource§impl Div<f32> for RGBSpectrum
impl Div<f32> for RGBSpectrum
§type Output = RGBSpectrum
type Output = RGBSpectrum
The resulting type after applying the
/
operator.source§impl DivAssign<f32> for RGBSpectrum
impl DivAssign<f32> for RGBSpectrum
source§fn div_assign(&mut self, rhs: Float)
fn div_assign(&mut self, rhs: Float)
Performs the
/=
operation. Read moresource§impl From<f32> for RGBSpectrum
impl From<f32> for RGBSpectrum
source§impl ImageTextureConvert<RGBSpectrum> for ImageTexture<Spectrum>
impl ImageTextureConvert<RGBSpectrum> for ImageTexture<Spectrum>
fn convert_out(from: &Spectrum, to: &mut Spectrum)
source§impl Index<RGBEnum> for RGBSpectrum
impl Index<RGBEnum> for RGBSpectrum
source§impl IndexMut<RGBEnum> for RGBSpectrum
impl IndexMut<RGBEnum> for RGBSpectrum
source§impl Mul<RGBSpectrum> for Float
impl Mul<RGBSpectrum> for Float
§type Output = RGBSpectrum
type Output = RGBSpectrum
The resulting type after applying the
*
operator.source§fn mul(self, rhs: RGBSpectrum) -> RGBSpectrum
fn mul(self, rhs: RGBSpectrum) -> RGBSpectrum
Performs the
*
operation. Read moresource§impl Mul<RGBSpectrum> for RGBSpectrum
impl Mul<RGBSpectrum> for RGBSpectrum
§type Output = RGBSpectrum
type Output = RGBSpectrum
The resulting type after applying the
*
operator.source§fn mul(self, rhs: RGBSpectrum) -> RGBSpectrum
fn mul(self, rhs: RGBSpectrum) -> RGBSpectrum
Performs the
*
operation. Read moresource§impl Mul<f32> for RGBSpectrum
impl Mul<f32> for RGBSpectrum
§type Output = RGBSpectrum
type Output = RGBSpectrum
The resulting type after applying the
*
operator.source§impl MulAssign<RGBSpectrum> for RGBSpectrum
impl MulAssign<RGBSpectrum> for RGBSpectrum
source§fn mul_assign(&mut self, rhs: RGBSpectrum)
fn mul_assign(&mut self, rhs: RGBSpectrum)
Performs the
*=
operation. Read moresource§impl Neg for RGBSpectrum
impl Neg for RGBSpectrum
§type Output = RGBSpectrum
type Output = RGBSpectrum
The resulting type after applying the
-
operator.source§fn neg(self) -> RGBSpectrum
fn neg(self) -> RGBSpectrum
Performs the unary
-
operation. Read moresource§impl PartialEq<RGBSpectrum> for RGBSpectrum
impl PartialEq<RGBSpectrum> for RGBSpectrum
source§fn eq(&self, rhs: &RGBSpectrum) -> bool
fn eq(&self, rhs: &RGBSpectrum) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Sub<RGBSpectrum> for RGBSpectrum
impl Sub<RGBSpectrum> for RGBSpectrum
§type Output = RGBSpectrum
type Output = RGBSpectrum
The resulting type after applying the
-
operator.source§fn sub(self, rhs: RGBSpectrum) -> RGBSpectrum
fn sub(self, rhs: RGBSpectrum) -> RGBSpectrum
Performs the
-
operation. Read moresource§impl Texture<RGBSpectrum> for ImageTexture<Spectrum>
impl Texture<RGBSpectrum> for ImageTexture<Spectrum>
fn evaluate(&self, si: &SurfaceInteraction<'_>) -> Spectrum
source§impl Texture<RGBSpectrum> for MarbleTexture
impl Texture<RGBSpectrum> for MarbleTexture
fn evaluate(&self, si: &SurfaceInteraction<'_>) -> Spectrum
source§impl 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§
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
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere R: Read + ReadEndian<P>, P: Default,
source§fn 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()
.