diff options
author | tcmal <me@aria.rip> | 2024-08-25 17:44:20 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-25 17:44:20 +0100 |
commit | 58319f04f239ab4a81b4eb878ad987fe453fef9e (patch) | |
tree | b3245686b548b3d5f51bd61be609c1bee239d155 /stockton-levels/src/traits/vertices.rs | |
parent | ac3870a05701933d85c4a8b440d3c7dbc4959d33 (diff) |
feat(levels): coord system types and swizzling
the room is now the right way up! yay!
Diffstat (limited to 'stockton-levels/src/traits/vertices.rs')
-rw-r--r-- | stockton-levels/src/traits/vertices.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/stockton-levels/src/traits/vertices.rs b/stockton-levels/src/traits/vertices.rs index 2afa802..cea1806 100644 --- a/stockton-levels/src/traits/vertices.rs +++ b/stockton-levels/src/traits/vertices.rs @@ -16,6 +16,7 @@ // along with stockton-bsp. If not, see <http://www.gnu.org/licenses/>. use crate::helpers::{slice_to_f32}; +use crate::coords::CoordSystem; use crate::types::RGBA; use na::Vector3; @@ -50,14 +51,14 @@ impl TexCoord { /// A vertex offset, used to describe generalised triangle meshes pub type MeshVert = u32; -pub trait HasVertices { +pub trait HasVertices<S: CoordSystem> { type VerticesIter<'a>: Iterator<Item = &'a Vertex>; fn vertices_iter<'a>(&'a self) -> Self::VerticesIter<'a>; fn get_vertex<'a>(&'a self, index: u32) -> &'a Vertex; } -pub trait HasMeshVerts: HasVertices { +pub trait HasMeshVerts<S: CoordSystem>: HasVertices<S> { type MeshVertsIter<'a>: Iterator<Item = &'a MeshVert>; fn meshverts_iter<'a>(&'a self) -> Self::MeshVertsIter<'a>; |