Struct rs_pbrt::media::grid::GridDensityMedium
source · pub struct GridDensityMedium {
pub sigma_a: Spectrum,
pub sigma_s: Spectrum,
pub g: Float,
pub nx: i32,
pub ny: i32,
pub nz: i32,
pub world_to_medium: Transform,
pub density: Arc<Vec<Float>>,
pub sigma_t: Float,
pub inv_max_density: Float,
}
Fields§
§sigma_a: Spectrum
§sigma_s: Spectrum
§g: Float
§nx: i32
§ny: i32
§nz: i32
§world_to_medium: Transform
§density: Arc<Vec<Float>>
§sigma_t: Float
§inv_max_density: Float
Implementations§
source§impl GridDensityMedium
impl GridDensityMedium
pub fn new( sigma_a: &Spectrum, sigma_s: &Spectrum, g: Float, nx: i32, ny: i32, nz: i32, medium_to_world: &Transform, d: Arc<Vec<Float>> ) -> Self
pub fn d(&self, p: &Point3i) -> Float
pub fn density(&self, p: &Point3f) -> Float
pub fn tr(&self, r_world: &Ray, sampler: &mut Sampler) -> Spectrum
pub fn sample( &self, r_world: &Ray, sampler: &mut Sampler ) -> (Spectrum, Option<MediumInteraction>)
Auto Trait Implementations§
impl RefUnwindSafe for GridDensityMedium
impl Send for GridDensityMedium
impl Sync for GridDensityMedium
impl Unpin for GridDensityMedium
impl UnwindSafe for GridDensityMedium
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