mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-03 17:38:27 +00:00
Simplify model
This commit is contained in:
parent
663a794840
commit
fc595f6246
@ -3,6 +3,7 @@ mod model;
|
||||
mod export;
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
model::model()?;
|
||||
let mesh = model::model()?;
|
||||
export::export(mesh.vertices, mesh.triangles)?;
|
||||
Ok(())
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::{export::export, mesh::Mesh};
|
||||
use crate::mesh::Mesh;
|
||||
|
||||
pub fn model() -> anyhow::Result<()> {
|
||||
pub fn model() -> anyhow::Result<Mesh> {
|
||||
let vertices = vec![
|
||||
[-0.5, -0.5, -0.5], // 0
|
||||
[0.5, -0.5, -0.5], // 1
|
||||
@ -27,12 +27,8 @@ pub fn model() -> anyhow::Result<()> {
|
||||
[4, 7, 6],
|
||||
];
|
||||
|
||||
let mesh = Mesh {
|
||||
Ok(Mesh {
|
||||
vertices,
|
||||
triangles,
|
||||
};
|
||||
|
||||
export(mesh.vertices, mesh.triangles)?;
|
||||
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user