#graphics #quaternions #vector-math #vulkan-graphics #vulkan #maths

gfx-maths

Implementations for the most essential Graphics Math operations

10 releases

0.2.9 Mar 12, 2023
0.2.8 Feb 9, 2022
0.2.6 Jan 31, 2022
0.2.4 Aug 19, 2021
0.1.0 Aug 17, 2021

#1204 in Math

Download history 353/week @ 2024-08-12 1100/week @ 2024-08-19 391/week @ 2024-08-26 994/week @ 2024-09-02 754/week @ 2024-09-09 809/week @ 2024-09-16 1148/week @ 2024-09-23 1118/week @ 2024-09-30 136/week @ 2024-10-07 120/week @ 2024-10-14 310/week @ 2024-10-21 233/week @ 2024-10-28 288/week @ 2024-11-04 390/week @ 2024-11-11 411/week @ 2024-11-18 120/week @ 2024-11-25

1,212 downloads per month
Used in 6 crates

MIT license

54KB
1.5K SLoC

MIT LICENSE CRATES.IO DOCS CI

GFX Maths

This crate implements all the basic mathematical structures and operations that are needed for almost any graphical program, namely:

The usual operations are implemented via member functions and operator overloads. Operators should handle almost exactly as they would in GLSL, e.g.

use gfx_maths_rs::*;

let v = Vec3::new(5.0, 6.0, 7.0);
let s = 1.0 / v;

let t = Mat4::translate(Vec3::new(1.0, 0.0, 0.0)) * s;

Notation

Vectors are always treated as column vectors, which is why only Mat4 * Vec4 is implemented and not Vec4 * Mat4.

Dependencies

~190KB