Struct rust_pathtracer::fx::F3

source ·
pub struct F3 {
    pub x: F,
    pub y: F,
    pub z: F,
}
Expand description

F3

Fields§

§x: F§y: F§z: F

Implementations§

source§

impl F3

source

pub fn from(v: F3) -> Self

source

pub fn zeros() -> Self

source

pub fn new_x(x: F) -> Self

source

pub fn new(x: F, y: F, z: F) -> Self

source

pub fn color(color: String) -> Self

source

pub fn get_x(&mut self) -> F

source

pub fn set_x(&mut self, new_val: F)

source

pub fn get_y(&mut self) -> F

source

pub fn set_y(&mut self, new_val: F)

source

pub fn get_z(&mut self) -> F

source

pub fn set_z(&mut self, new_val: F)

source

pub fn copy(&mut self) -> F3

Creates a copy

source

pub fn normalize(&self) -> F3

Normalizes this vector

source

pub fn abs(&self) -> F3

abs this vector

source

pub fn floor(&self) -> F3

floor this vector

source

pub fn fract(&self) -> F3

fract this vector

source

pub fn length(&self) -> F

Returns the length

source

pub fn dot(&self, other: &F3) -> F

source

pub fn cross(&self, other: &F3) -> F3

source

pub fn mult_f(&self, other: &F) -> F3

source

pub fn div_f(&self, other: &F) -> F3

source

pub fn max_f(&self, other: &F) -> F3

source

pub fn to_linear(&mut self) -> F3

source

pub fn to_gamma(&mut self) -> F3

source

pub fn register(engine: &mut Engine)

Register to the engine

Trait Implementations§

source§

impl Add<F3> for F3

§

type Output = F3

The resulting type after applying the + operator.
source§

fn add(self, other: F3) -> F3

Performs the + operation. Read more
source§

impl AddAssign<F3> for F3

source§

fn add_assign(&mut self, other: F3)

Performs the += operation. Read more
source§

impl Clone for F3

source§

fn clone(&self) -> F3

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for F3

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Div<F3> for F3

§

type Output = F3

The resulting type after applying the / operator.
source§

fn div(self, other: F3) -> F3

Performs the / operation. Read more
source§

impl Div<F3> for f64

§

type Output = F3

The resulting type after applying the / operator.
source§

fn div(self, other: F3) -> F3

Performs the / operation. Read more
source§

impl DivAssign<F3> for F3

source§

fn div_assign(&mut self, other: F3)

Performs the /= operation. Read more
source§

impl Mul<F3> for F3

§

type Output = F3

The resulting type after applying the * operator.
source§

fn mul(self, other: F3) -> F3

Performs the * operation. Read more
source§

impl Mul<F3> for f64

§

type Output = F3

The resulting type after applying the * operator.
source§

fn mul(self, other: F3) -> F3

Performs the * operation. Read more
source§

impl Neg for F3

§

type Output = F3

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl PartialEq<F3> for F3

source§

fn eq(&self, other: &F3) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Sub<F3> for F3

§

type Output = F3

The resulting type after applying the - operator.
source§

fn sub(self, other: F3) -> F3

Performs the - operation. Read more
source§

impl SubAssign<F3> for F3

source§

fn sub_assign(&mut self, other: F3)

Performs the -= operation. Read more
source§

impl Copy for F3

source§

impl StructuralPartialEq for F3

Auto Trait Implementations§

§

impl RefUnwindSafe for F3

§

impl Send for F3

§

impl Sync for F3

§

impl Unpin for F3

§

impl UnwindSafe for F3

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,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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.

§

impl<T> Pointable for T

§

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

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · 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.
const: unstable · source§

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

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> Variant for Twhere T: Any + Clone + SendSync,

source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert this Variant trait object to &dyn Any.
source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert this Variant trait object to &mut dyn Any.
source§

fn as_boxed_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>

Convert this Variant trait object to Box<dyn Any>.
source§

fn type_name(&self) -> &'static str

Get the name of this type.
source§

fn clone_object(&self) -> Box<dyn Variant + 'static, Global>

Clone this Variant trait object.