diff options
Diffstat (limited to 'stockton-levels/src/parts')
-rw-r--r-- | stockton-levels/src/parts/faces.rs | 2 | ||||
-rw-r--r-- | stockton-levels/src/parts/vertices.rs | 2 | ||||
-rw-r--r-- | stockton-levels/src/parts/visdata.rs | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/stockton-levels/src/parts/faces.rs b/stockton-levels/src/parts/faces.rs index 0168cd8..1023af7 100644 --- a/stockton-levels/src/parts/faces.rs +++ b/stockton-levels/src/parts/faces.rs @@ -3,7 +3,7 @@ use serde::{Deserialize, Serialize}; pub type FaceRef = u32; -#[derive(Debug, Clone, Serialize, Deserialize)] +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub enum Geometry { Vertices(Vertex, Vertex, Vertex), } diff --git a/stockton-levels/src/parts/vertices.rs b/stockton-levels/src/parts/vertices.rs index 0b7dfd6..f2f5a2d 100644 --- a/stockton-levels/src/parts/vertices.rs +++ b/stockton-levels/src/parts/vertices.rs @@ -42,7 +42,7 @@ impl<'de> Deserialize<'de> for Vertex { TexV, Color, } - const FIELDS: &'static [&'static str] = + const FIELDS: &[&str] = &["pos_x", "pos_y", "pos_z", "tex_x", "tex_y", "color"]; struct VertexVisitor; diff --git a/stockton-levels/src/parts/visdata.rs b/stockton-levels/src/parts/visdata.rs index f311bf7..aa2ec3d 100644 --- a/stockton-levels/src/parts/visdata.rs +++ b/stockton-levels/src/parts/visdata.rs @@ -1,8 +1,8 @@ use super::faces::FaceRef; -use na::Vector3; use std::iter::Iterator; +use stockton_types::components::{CameraSettings, Transform}; -pub trait HasVisData { +pub trait HasVisData<'a> { type Faces: Iterator<Item = FaceRef>; - fn get_visible(pos: Vector3<f32>, rot: Vector3<f32>) -> Self::Faces; + fn get_visible(&'a self, transform: &Transform, settings: &CameraSettings) -> Self::Faces; } |