Add types to represent coordinates

These will be used to improve the usability of `Point` and `Vector`.
This commit is contained in:
Hanno Braun 2022-02-20 12:33:17 +01:00
parent 44ffc4fc26
commit f1a82fcea1
2 changed files with 25 additions and 0 deletions

24
src/math/coordinates.rs Normal file
View File

@ -0,0 +1,24 @@
#![allow(unused)]
use super::Scalar;
/// 1-dimensional curve coordinates
#[repr(C)]
pub struct T {
pub t: Scalar,
}
/// 2-dimensional surface coordinates
#[repr(C)]
pub struct Uv {
pub u: Scalar,
pub v: Scalar,
}
/// 3-dimensional model coordinates
#[repr(C)]
pub struct Xyz {
pub x: Scalar,
pub y: Scalar,
pub z: Scalar,
}

View File

@ -1,4 +1,5 @@
pub mod aabb;
pub mod coordinates;
pub mod point;
pub mod scalar;
pub mod segment;