HasNormal

Trait HasNormal 

Source
pub trait HasNormal<const D: usize, Vec: Vector<Self::S, D>> {
    type S: Scalar;

    // Required methods
    fn normal(&self) -> &Vec;
    fn set_normal(&mut self, normal: Vec);
}
Expand description

Indicates that the vertex payload has a normal vector.

Required Associated Types§

Source

type S: Scalar

The scalar type of the coordinates used in the payload. Mainly to choose between f32 and f64. But could also work with fixed point etc…

Required Methods§

Source

fn normal(&self) -> &Vec

returns the normals of the payload

Source

fn set_normal(&mut self, normal: Vec)

Sets the normals.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<S: Scalar, const D: usize> HasNormal<D, Matrix<S, Const<D>, Const<1>, ArrayStorage<S, D, 1>>> for VertexPayloadPNU<S, D>

Source§

type S = S