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§

source§

impl<'a> SurfaceInteraction<'a>

source

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

source

pub fn get_medium(&self, w: &Vector3f) -> Option<Arc<Medium>>

source

pub fn set_shading_geometry( &mut self, dpdus: &Vector3f, dpdvs: &Vector3f, dndus: &Normal3f, dndvs: &Normal3f, orientation_is_authoritative: bool )

source

pub fn compute_scattering_functions( &mut self, ray: &Ray, allow_multiple_lobes: bool, mode: TransportMode )

source

pub fn compute_differentials(&mut self, ray: &Ray)

source

pub fn le(&self, w: &Vector3f) -> Spectrum

Trait Implementations§

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§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Pointable for T

source§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

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>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
source§

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().
source§

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().
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.