[][src]Crate vek

Generic 2D-3D math swiss army knife for game engines, with SIMD support and focus on convenience.

See the wiki for an overview, FAQ, guides, and other info.

Issues and bug reports are very welcome!

Cargo features

  • vec8, vec16, vec32, vec64, rgba, rgb, uvw, uv Enable these types. Other types are always enabled for the sake of doc-tests.
  • repr_simd enables Nightly Rust's repr_simd and simd_ffi features, and unlock SIMD versions of all appropriate types (though repr_simd modules). On Stable, this feature has no effect.
  • serde makes vectors and matrices derive Serialize and Deserialize.
  • image makes color vectors implement the Pixel trait from the image crate.
  • mint enables conversion to the mint crate's types. mint is an interoperability layer for math libraries.

#![no_std]

This crate is #![no_std].

Re-exports

pub use crate::ops::*;
pub use crate::vec::*;
pub use crate::mat::*;
pub use crate::quaternion::*;
pub use crate::transition::*;
pub use crate::transform::*;
pub use crate::bezier::*;
pub use crate::geom::*;

Modules

bezier

Low-order (quadratic and cubic) Bézier curves.

geom

Common and trivial geometric primitives.

mat

Matrix types.

ops

Operations defined by this crate, such as MulAdd, Lerp, Clamp, and Wrap.

quaternion

Quaternions are a convenient representation for rotations in 3D spaces.

transform

A convenient position + orientation + scale container, backed by two Vec3 and a Quaternion.

transition

Convenience structures for representing a transition from one value to another.

vec

Vector types.