refactor: moved Vertex back into the utils crate

This commit is contained in:
antifallobst 2023-12-01 00:11:20 +01:00
parent 2a10757c54
commit 80aec21b52
Signed by: antifallobst
GPG Key ID: 2B4F402172791BAF
4 changed files with 18 additions and 28 deletions

View File

@ -2,17 +2,10 @@
# It is not intended for manual editing. # It is not intended for manual editing.
version = 3 version = 3
[[package]]
name = "anyhow"
version = "1.0.75"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6"
[[package]] [[package]]
name = "lithium-loader" name = "lithium-loader"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"anyhow",
"lithium-utils", "lithium-utils",
] ]

View File

@ -8,6 +8,4 @@ authors = ["antifallobst"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
lithium-utils = { path = "../lithium-utils" } lithium-utils = { path = "../lithium-utils" }
anyhow = "1.0.75"

View File

@ -1,21 +1,4 @@
use anyhow::Result; use lithium_utils::{Vector2, Vector3, Vertex};
use lithium_utils::{Vector2, Vector3};
pub struct Vertex {
pub position: Vector3,
pub uv: Vector2,
pub normal: Vector3,
}
impl Vertex {
pub fn new(position: Vector3, uv: Vector2, normal: Vector3) -> Self {
Self {
position,
uv,
normal,
}
}
}
pub struct Model { pub struct Model {
name: String, name: String,

View File

@ -60,3 +60,19 @@ impl Vector3 {
Self { x, y, z } Self { x, y, z }
} }
} }
pub struct Vertex {
pub position: Vector3,
pub uv: Vector2,
pub normal: Vector3,
}
impl Vertex {
pub fn new(position: Vector3, uv: Vector2, normal: Vector3) -> Self {
Self {
position,
uv,
normal,
}
}
}