pub trait CoordinateSystem {
    // Required methods
    fn up() -> Self;
    fn down() -> Self;
    fn right() -> Self;
    fn left() -> Self;
    fn forward() -> Self;
    fn back() -> Self;
}
Expand description

Coordinate system extension to Vec3

This crate is opinionated with what coordinate system it uses and this adds additional functions to access the coordinate system axis

The exact coordinate system we use is right-handed with +X = right, +Y = up, -Z = forward, +Z = back

Required Methods§

source

fn up() -> Self

A unit length vector pointing in the canonical up direction.

source

fn down() -> Self

A unit length vector pointing in the canonical down direction.

source

fn right() -> Self

A unit length vector pointing in the canonical right direction.

This is the right hand side of a first person character.

source

fn left() -> Self

A unit length vector pointing in the canonical left direction.

source

fn forward() -> Self

A unit length vector pointing in the canonical forward direction.

This is the direction a character faces, or a car drives towards.

source

fn back() -> Self

A unit length vector pointing in the canonical back direction.

Implementors§