mirror of
https://github.com/hannobraun/Fornjot
synced 2025-02-03 13:55:55 +00:00
Add types to represent coordinates
These will be used to improve the usability of `Point` and `Vector`.
This commit is contained in:
parent
44ffc4fc26
commit
f1a82fcea1
24
src/math/coordinates.rs
Normal file
24
src/math/coordinates.rs
Normal 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,
|
||||||
|
}
|
@ -1,4 +1,5 @@
|
|||||||
pub mod aabb;
|
pub mod aabb;
|
||||||
|
pub mod coordinates;
|
||||||
pub mod point;
|
pub mod point;
|
||||||
pub mod scalar;
|
pub mod scalar;
|
||||||
pub mod segment;
|
pub mod segment;
|
||||||
|
Loading…
Reference in New Issue
Block a user