[−][src]Struct tray_rust::geometry::differential_geometry::DifferentialGeometry
Stores information about a hit piece of geometry of some object in the scene
Fields
p: Point
The hit point
n: Normal
The shading normal
ng: Normal
The geometry normal
u: f32
Surface parameterization u, v for texture mapping
v: f32
time: f32
The intersection time
dp_du: Vector
Derivative of the point with respect to the u parameterization coord of the surface
dp_dv: Vector
Derivative of the point with respect to the v parameterization coord of the surface
geom: &'a (dyn Geometry + 'a)
The geometry that was hit
Methods
impl<'a> DifferentialGeometry<'a>
[src]
pub fn new(
p: &Point,
ng: &Normal,
u: f32,
v: f32,
time: f32,
dp_du: &Vector,
dp_dv: &Vector,
geom: &'a (dyn Geometry + 'a)
) -> DifferentialGeometry<'a>
[src]
p: &Point,
ng: &Normal,
u: f32,
v: f32,
time: f32,
dp_du: &Vector,
dp_dv: &Vector,
geom: &'a (dyn Geometry + 'a)
) -> DifferentialGeometry<'a>
Setup the differential geometry. Note that the normal will be computed using cross(dp_du, dp_dv)
pub fn with_normal(
p: &Point,
n: &Normal,
u: f32,
v: f32,
time: f32,
dp_du: &Vector,
dp_dv: &Vector,
geom: &'a (dyn Geometry + 'a)
) -> DifferentialGeometry<'a>
[src]
p: &Point,
n: &Normal,
u: f32,
v: f32,
time: f32,
dp_du: &Vector,
dp_dv: &Vector,
geom: &'a (dyn Geometry + 'a)
) -> DifferentialGeometry<'a>
Setup the differential geometry using the normal passed for the surface normal
Trait Implementations
impl<'a> Clone for DifferentialGeometry<'a>
[src]
fn clone(&self) -> DifferentialGeometry<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Copy for DifferentialGeometry<'a>
[src]
Auto Trait Implementations
impl<'a> !Send for DifferentialGeometry<'a>
impl<'a> !Sync for DifferentialGeometry<'a>
impl<'a> Unpin for DifferentialGeometry<'a>
impl<'a> !UnwindSafe for DifferentialGeometry<'a>
impl<'a> !RefUnwindSafe for DifferentialGeometry<'a>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,