Skip to content

Commit

Permalink
wip: move mesh and texture to bevy level
Browse files Browse the repository at this point in the history
  • Loading branch information
berkus committed Mar 4, 2024
1 parent 550e3a4 commit 199c80e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/support/brender/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<R: BufRead>(reader: &mut R) -> Result<String, Error> {
Expand Down
4 changes: 2 additions & 2 deletions src/support/brender/mesh.rs → src/support/mesh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Check failure on line 27 in src/support/mesh.rs

View workflow job for this annotation

GitHub Actions / Clippy Output

cannot find type `Mesh` in this scope

error[E0412]: cannot find type `Mesh` in this scope --> src/support/mesh.rs:27:6 | 27 | impl Mesh { | ^^^^ not found in this scope | help: consider importing this struct | 9 + use bevy::render::mesh::Mesh; |
// Single mesh file may contain multiple meshes
#[throws(support::Error)]
Expand All @@ -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<f32>, v2: Vector3<f32>, v3: Vector3<f32>) -> Vector3<f32> {
(v1 - v2).cross(v2 - v3).normalize()
}
Expand Down
2 changes: 2 additions & 0 deletions src/support/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.

0 comments on commit 199c80e

Please sign in to comment.