diff --git a/src/support/brender/mod.rs b/src/support/brender/mod.rs index 77081c8..fdc481e 100644 --- a/src/support/brender/mod.rs +++ b/src/support/brender/mod.rs @@ -2,11 +2,9 @@ use {super::Error, std::io::BufRead}; pub mod actor; pub mod material; -// pub mod mesh; pub mod model; pub mod pixelmap; pub mod resource; -pub mod texture; // Load a C-style 0-terminated string from the file and return it pub fn read_c_string(reader: &mut R) -> Result { diff --git a/src/support/brender/mesh.rs b/src/support/mesh.rs similarity index 96% rename from src/support/brender/mesh.rs rename to src/support/mesh.rs index e942060..ad41ee8 100644 --- a/src/support/brender/mesh.rs +++ b/src/support/mesh.rs @@ -23,7 +23,7 @@ use { // VertexUV in resource.rs type UvCoord = VertexUV; -// This should be Model @todo +// This should be in Model @todo impl Mesh { // Single mesh file may contain multiple meshes #[throws(support::Error)] @@ -41,7 +41,7 @@ impl Mesh { Ok(meshes) } - // Calculate normal from vertices in counter-clockwise order. + /// Calculate normal from vertices in counter-clockwise order. pub fn calc_normal(v1: Vector3, v2: Vector3, v3: Vector3) -> Vector3 { (v1 - v2).cross(v2 - v3).normalize() } diff --git a/src/support/mod.rs b/src/support/mod.rs index 8874720..1a84f14 100644 --- a/src/support/mod.rs +++ b/src/support/mod.rs @@ -25,7 +25,9 @@ pub mod brender; pub mod camera; pub mod car; pub mod logger; +pub mod mesh; pub mod render_manager; +pub mod texture; pub mod visitor; // Vertex and VertexUV in resource.rs diff --git a/src/support/brender/texture.rs b/src/support/texture.rs similarity index 100% rename from src/support/brender/texture.rs rename to src/support/texture.rs