Trait shades::Geometry[][src]

pub trait Geometry: Sized {
    type LengthExpr;
    fn length(&self) -> Self::LengthExpr;
fn distance(&self, other: impl Into<Self>) -> Self::LengthExpr;
fn dot(&self, other: impl Into<Self>) -> Self::LengthExpr;
fn cross(&self, other: impl Into<Self>) -> Self;
fn normalize(&self) -> Self;
fn face_forward(
        &self,
        normal: impl Into<Self>,
        reference: impl Into<Self>
    ) -> Self;
fn reflect(&self, normal: impl Into<Self>) -> Self;
fn refract(
        &self,
        normal: impl Into<Self>,
        eta: impl Into<Expr<f32>>
    ) -> Self; }

Associated Types

Loading content...

Required methods

fn length(&self) -> Self::LengthExpr[src]

fn distance(&self, other: impl Into<Self>) -> Self::LengthExpr[src]

fn dot(&self, other: impl Into<Self>) -> Self::LengthExpr[src]

fn cross(&self, other: impl Into<Self>) -> Self[src]

fn normalize(&self) -> Self[src]

fn face_forward(
    &self,
    normal: impl Into<Self>,
    reference: impl Into<Self>
) -> Self
[src]

fn reflect(&self, normal: impl Into<Self>) -> Self[src]

fn refract(&self, normal: impl Into<Self>, eta: impl Into<Expr<f32>>) -> Self[src]

Loading content...

Implementors

impl Geometry for Expr<V2<f32>>[src]

type LengthExpr = Expr<f32>

impl Geometry for Expr<V3<f32>>[src]

type LengthExpr = Expr<f32>

impl Geometry for Expr<V4<f32>>[src]

type LengthExpr = Expr<f32>

Loading content...