pub struct Transform {
pub m: Matrix4x4,
pub minv: Matrix4x4,
}
Fields§
§m: Matrix4x4
§minv: Matrix4x4
Implementations§
Source§impl Transform
impl Transform
pub fn new() -> Self
pub fn identity() -> Self
pub fn translate(x: Float, y: Float, z: Float) -> Self
pub fn scale(x: Float, y: Float, z: Float) -> Self
pub fn rotate_x(theta: Float) -> Self
pub fn rotate_y(theta: Float) -> Self
pub fn rotate_z(theta: Float) -> Self
pub fn rotate(theta: Float, x: Float, y: Float, z: Float) -> Transform
pub fn look_at( ex: Float, ey: Float, ez: Float, lx: Float, ly: Float, lz: Float, ux: Float, uy: Float, uz: Float, ) -> Self
pub fn orthographic(z_near: Float, z_far: Float) -> Self
pub fn perspective(fov: Float, n: Float, f: Float) -> Self
pub fn set(&mut self, other: &Transform)
pub fn inverse(&self) -> Self
pub fn swaps_handedness(&self) -> bool
pub fn transform_point(&self, p: &Point3f) -> Point3f
pub fn transform_vector(&self, p: &Vector3f) -> Vector3f
pub fn transform_normal(&self, p: &Normal3f) -> Normal3f
pub fn transform_bounds(&self, bounds: &Bounds3f) -> Bounds3f
pub fn transform_point_with_error(&self, p: &Point3f) -> (Point3f, Vector3f)
pub fn transform_point_with_abs_error( &self, p: &Point3f, pt_error: &Vector3f, ) -> (Point3f, Vector3f)
pub fn transform_vector_with_error(&self, v: &Vector3f) -> (Vector3f, Vector3f)
pub fn transform_ray(&self, r: &Ray) -> (Ray, Vector3f, Vector3f)
pub fn transform_ray_differential( &self, r: &RayDifferential, ) -> (RayDifferential, Vector3f, Vector3f)
pub fn transform_surface_interaction( &self, si: &SurfaceInteraction, ) -> SurfaceInteraction
pub fn is_identity(&self) -> bool
pub fn has_scale(&self) -> bool
Trait Implementations§
impl Copy for Transform
impl StructuralPartialEq for Transform
Auto Trait Implementations§
impl Freeze for Transform
impl RefUnwindSafe for Transform
impl Send for Transform
impl Sync for Transform
impl Unpin for Transform
impl UnwindSafe for Transform
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
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()
.