Struct rs_pbrt::core::interaction::SurfaceInteraction
source · [−]pub struct SurfaceInteraction<'a> {Show 17 fields
pub common: InteractionCommon,
pub uv: Point2f,
pub dpdu: Vector3f,
pub dpdv: Vector3f,
pub dndu: Normal3f,
pub dndv: Normal3f,
pub dpdx: Cell<Vector3f>,
pub dpdy: Cell<Vector3f>,
pub dudx: Cell<Float>,
pub dvdx: Cell<Float>,
pub dudy: Cell<Float>,
pub dvdy: Cell<Float>,
pub primitive: Option<*const Primitive>,
pub shading: Shading,
pub bsdf: Option<Bsdf>,
pub bssrdf: Option<TabulatedBssrdf>,
pub shape: Option<&'a Shape>,
}
Fields
common: InteractionCommon
uv: Point2f
dpdu: Vector3f
dpdv: Vector3f
dndu: Normal3f
dndv: Normal3f
dpdx: Cell<Vector3f>
dpdy: Cell<Vector3f>
dudx: Cell<Float>
dvdx: Cell<Float>
dudy: Cell<Float>
dvdy: Cell<Float>
primitive: Option<*const Primitive>
shading: Shading
bsdf: Option<Bsdf>
bssrdf: Option<TabulatedBssrdf>
shape: Option<&'a Shape>
Implementations
sourceimpl<'a> SurfaceInteraction<'a>
impl<'a> SurfaceInteraction<'a>
pub fn new(
p: &Point3f,
p_error: &Vector3f,
uv: Point2f,
wo: &Vector3f,
dpdu: &Vector3f,
dpdv: &Vector3f,
dndu: &Normal3f,
dndv: &Normal3f,
time: Float,
sh: Option<&'a Shape>
) -> Self
pub fn get_medium(&self, w: &Vector3f) -> Option<Arc<Medium>>
pub fn set_shading_geometry(
&mut self,
dpdus: &Vector3f,
dpdvs: &Vector3f,
dndus: &Normal3f,
dndvs: &Normal3f,
orientation_is_authoritative: bool
)
pub fn compute_scattering_functions(
&mut self,
ray: &Ray,
allow_multiple_lobes: bool,
mode: TransportMode
)
pub fn compute_differentials(&mut self, ray: &Ray)
pub fn le(&self, w: &Vector3f) -> Spectrum
Trait Implementations
sourceimpl<'a> Default for SurfaceInteraction<'a>
impl<'a> Default for SurfaceInteraction<'a>
sourcefn default() -> SurfaceInteraction<'a>
fn default() -> SurfaceInteraction<'a>
Returns the “default value” for a type. Read more
sourceimpl<'a> Interaction for SurfaceInteraction<'a>
impl<'a> Interaction for SurfaceInteraction<'a>
fn is_surface_interaction(&self) -> bool
fn is_medium_interaction(&self) -> bool
fn spawn_ray(&self, d: &Vector3f) -> Ray
fn get_common(&self) -> &InteractionCommon
fn get_p(&self) -> &Point3f
fn get_time(&self) -> Float
fn get_p_error(&self) -> &Vector3f
fn get_wo(&self) -> &Vector3f
fn get_n(&self) -> &Normal3f
fn get_medium_interface(&self) -> Option<Arc<MediumInterface>>
fn get_bsdf(&self) -> Option<&Bsdf>
fn get_shading_n(&self) -> Option<&Normal3f>
fn get_phase(&self) -> Option<Arc<HenyeyGreenstein>>
Auto Trait Implementations
impl<'a> !RefUnwindSafe for SurfaceInteraction<'a>
impl<'a> !Send for SurfaceInteraction<'a>
impl<'a> !Sync for SurfaceInteraction<'a>
impl<'a> Unpin for SurfaceInteraction<'a>
impl<'a> !UnwindSafe for SurfaceInteraction<'a>
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()
.