From 0b957cc9efb4f7df9fb75216d4fd7fbf4667279e Mon Sep 17 00:00:00 2001 From: Benedikt Schwab Date: Tue, 9 Jul 2024 18:56:10 +0200 Subject: [PATCH] refactoring --- .github/workflows/ci.yml | 35 ++++++++ .gitignore | 50 ++++++++++- Cargo.toml | 20 +++-- README.md | 9 ++ crates/egraphics-cli/Cargo.toml | 6 +- crates/egraphics-cli/README.md | 10 +++ crates/egraphics-core/Cargo.toml | 3 +- crates/egraphics-core/README.md | 10 +++ crates/egraphics-core/src/error.rs | 10 +++ .../src/geometry/sample_geometry.rs | 24 +++--- crates/egraphics-core/src/lib.rs | 15 +++- crates/egraphics-core/src/triangle.rs | 77 +++++++++++++++++ .../geometry.rs => triangle_mesh.rs} | 82 ++++--------------- crates/egraphics-io/Cargo.toml | 4 +- crates/egraphics-io/README.md | 10 +++ crates/egraphics-io/src/export.rs | 8 +- crates/egraphics-io/src/export_impl.rs | 17 ++-- crates/egraphics-io/src/lib.rs | 5 +- crates/egraphics/Cargo.toml | 6 +- crates/egraphics/README.md | 10 +++ crates/egraphics/src/lib.rs | 12 +-- 21 files changed, 307 insertions(+), 116 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 crates/egraphics-cli/README.md create mode 100644 crates/egraphics-core/README.md create mode 100644 crates/egraphics-core/src/error.rs create mode 100644 crates/egraphics-core/src/triangle.rs rename crates/egraphics-core/src/{geometry/geometry.rs => triangle_mesh.rs} (50%) create mode 100644 crates/egraphics-io/README.md create mode 100644 crates/egraphics/README.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9c18a84 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +name: CI + +on: + push: + branches: + - main + - develop + pull_request: {} + + +jobs: + + build: + name: cargo build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: Build + run: cargo build + + test: + name: cargo test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt clippy + - name: rustfmt + run: cargo fmt --all -- --check + - name: clippy + run: cargo clippy + - name: test + run: cargo test --verbose diff --git a/.gitignore b/.gitignore index 373271c..5ee7f3a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ -### JetBrains template +# Created by https://www.toptal.com/developers/gitignore/api/rust,macos,jetbrains+all +# Edit at https://www.toptal.com/developers/gitignore?templates=rust,macos,jetbrains+all + +### JetBrains+all ### # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 @@ -77,7 +80,49 @@ fabric.properties # Android studio 3.1+ serialized cache file .idea/caches/build_file_checksums.ser -### Rust template +### JetBrains+all Patch ### +# Ignore everything but code style settings and run configurations +# that are supposed to be shared within teams. + +.idea/* + +!.idea/codeStyles +!.idea/runConfigurations + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + +### Rust ### # Generated by Cargo # will have compiled files and executables debug/ @@ -93,3 +138,4 @@ Cargo.lock # MSVC Windows builds of rustc generate these, which store debugging information *.pdb +# End of https://www.toptal.com/developers/gitignore/api/rust,macos,jetbrains+all diff --git a/Cargo.toml b/Cargo.toml index 595faa6..7d08fc8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,17 +3,19 @@ members = [ "crates/*" ] +resolver = "2" + [workspace.package] -version = "0.0.1-alpha.1" -authors = ["Benedikt Schwab"] +version = "0.0.1-alpha.3" +authors = ["Benedikt Schwab "] edition = "2021" license = "MIT OR Apache-2.0" -repository = "https://github.com/tum-gis/egraphics" +repository = "https://github.com/envis-space/egraphics" [workspace.dependencies] -thiserror = "1.0" -tracing = "0.1.30" -tracing-subscriber = "0.3.8" -gltf = "1.0.0" -gltf-json = "1.0.0" -nalgebra = "0.31.1" +thiserror = "1.0.61" +tracing = "0.1.40" +tracing-subscriber = "0.3.18" +gltf = "1.4.1" +gltf-json = "1.4.1" +nalgebra = "0.33.0" diff --git a/README.md b/README.md index dcd97b1..176e230 100644 --- a/README.md +++ b/README.md @@ -1 +1,10 @@ # egraphics + +A Rust library for processing graphics formats in 3D space. + +> [!WARNING] +> The library is at an early stage of development. + +## Contributing + +The library is developed at the [TUM Chair of Geoinformatics](https://github.com/tum-gis) and contributions are highly welcome. diff --git a/crates/egraphics-cli/Cargo.toml b/crates/egraphics-cli/Cargo.toml index 735a2ef..d6979bd 100644 --- a/crates/egraphics-cli/Cargo.toml +++ b/crates/egraphics-cli/Cargo.toml @@ -5,11 +5,11 @@ authors.workspace = true edition.workspace = true license.workspace = true repository.workspace = true -description = "CLI tool for graphics data operations" +description = "CLI tool for processing graphics formats in 3D space." [dependencies] -egraphics-core = { version = "0.0.1-alpha.1", path = "../egraphics-core", registry = "custom" } -egraphics-io = { version = "0.0.1-alpha.1", path = "../egraphics-io", registry = "custom" } +egraphics-core = { version = "0.0.1-alpha.3", path = "../egraphics-core" } +egraphics-io = { version = "0.0.1-alpha.3", path = "../egraphics-io" } tracing = { workspace = true } tracing-subscriber = { workspace = true } diff --git a/crates/egraphics-cli/README.md b/crates/egraphics-cli/README.md new file mode 100644 index 0000000..ba00c59 --- /dev/null +++ b/crates/egraphics-cli/README.md @@ -0,0 +1,10 @@ +# egraphics-cli + +CLI tool for processing graphics formats in 3D space. + +> [!WARNING] +> The library is at an early stage of development. + +## Contributing + +The library is developed at the [TUM Chair of Geoinformatics](https://github.com/tum-gis) and contributions are highly welcome. diff --git a/crates/egraphics-core/Cargo.toml b/crates/egraphics-core/Cargo.toml index be809d8..c8929de 100644 --- a/crates/egraphics-core/Cargo.toml +++ b/crates/egraphics-core/Cargo.toml @@ -5,10 +5,11 @@ authors.workspace = true edition.workspace = true license.workspace = true repository.workspace = true -description = "Core of the egraphics library" +description = "Core primitives and operations for processing graphics formats in 3D space." [dependencies] +thiserror = { workspace = true } nalgebra = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } diff --git a/crates/egraphics-core/README.md b/crates/egraphics-core/README.md new file mode 100644 index 0000000..78275b8 --- /dev/null +++ b/crates/egraphics-core/README.md @@ -0,0 +1,10 @@ +# egraphics-core + +Core primitives and operations for processing graphics formats in 3D space. + +> [!WARNING] +> The library is at an early stage of development. + +## Contributing + +The library is developed at the [TUM Chair of Geoinformatics](https://github.com/tum-gis) and contributions are highly welcome. diff --git a/crates/egraphics-core/src/error.rs b/crates/egraphics-core/src/error.rs new file mode 100644 index 0000000..e00346f --- /dev/null +++ b/crates/egraphics-core/src/error.rs @@ -0,0 +1,10 @@ +use thiserror::Error; + +#[derive(Error, Debug)] +pub enum Error { + #[error(transparent)] + Io(#[from] std::io::Error), + + #[error("No triangle")] + NoElements, +} diff --git a/crates/egraphics-core/src/geometry/sample_geometry.rs b/crates/egraphics-core/src/geometry/sample_geometry.rs index 94cd3f7..60d04cc 100644 --- a/crates/egraphics-core/src/geometry/sample_geometry.rs +++ b/crates/egraphics-core/src/geometry/sample_geometry.rs @@ -1,46 +1,46 @@ -use crate::geometry::geometry; +use crate::geometry::triangle; use nalgebra; -pub fn generate_sample_triangle_mesh() -> geometry::TriangleMesh { +pub fn generate_sample_triangle_mesh() -> triangle::TriangleMesh { let triangle_a_vertices = vec![ - geometry::Vertex { + triangle::Vertex { position: nalgebra::Point3::new(0.0, 0.5, 0.0), color: nalgebra::Point3::new(1.0, 0.0, 0.0), }, - geometry::Vertex { + triangle::Vertex { position: nalgebra::Point3::new(-0.5, -0.5, 0.0), color: nalgebra::Point3::new(0.0, 1.0, 0.0), }, - geometry::Vertex { + triangle::Vertex { position: nalgebra::Point3::new(0.5, -0.5, 0.0), color: nalgebra::Point3::new(1.0, 1.0, 1.0), }, ]; - let triangle_a = geometry::Triangle { + let triangle_a = triangle::Triangle { vertices: triangle_a_vertices, }; let triangle_b_vertices = vec![ - geometry::Vertex { + triangle::Vertex { position: nalgebra::Point3::new(3.0, 3.5, 3.0), color: nalgebra::Point3::new(1.0, 0.0, 0.0), }, - geometry::Vertex { + triangle::Vertex { position: nalgebra::Point3::new(2.5, 2.5, 3.0), color: nalgebra::Point3::new(0.0, 1.0, 0.0), }, - geometry::Vertex { + triangle::Vertex { position: nalgebra::Point3::new(3.5, 2.5, 3.0), color: nalgebra::Point3::new(1.0, 1.0, 1.0), }, ]; - let triangle_b = geometry::Triangle { + let triangle_b = triangle::Triangle { vertices: triangle_b_vertices, }; - let triangle_list: Vec = vec![triangle_a, triangle_b]; + let triangle_list: Vec = vec![triangle_a, triangle_b]; - geometry::TriangleMesh { + triangle::TriangleMesh { triangles: triangle_list, } } diff --git a/crates/egraphics-core/src/lib.rs b/crates/egraphics-core/src/lib.rs index dd5bf07..08b04c7 100644 --- a/crates/egraphics-core/src/lib.rs +++ b/crates/egraphics-core/src/lib.rs @@ -1,4 +1,15 @@ -mod geometry; +mod error; +mod triangle; +mod triangle_mesh; #[doc(inline)] -pub use geometry::geometry::*; +pub use error::Error; + +#[doc(inline)] +pub use triangle::Triangle; + +#[doc(inline)] +pub use triangle::Vertex; + +#[doc(inline)] +pub use triangle_mesh::TriangleMesh; diff --git a/crates/egraphics-core/src/triangle.rs b/crates/egraphics-core/src/triangle.rs new file mode 100644 index 0000000..ae5fab7 --- /dev/null +++ b/crates/egraphics-core/src/triangle.rs @@ -0,0 +1,77 @@ +use crate::Error; +use crate::Error::NoElements; +use std::mem; + +#[derive(Copy, Clone, Debug, PartialEq)] +pub struct Vector3D { + x: f32, + y: f32, + z: f32, +} + +impl Vector3D { + pub fn new(x: f32, y: f32, z: f32) -> Self { + Self { x, y, z } + } +} + +#[derive(Copy, Clone, Debug, PartialEq)] +#[repr(C)] +pub struct Vertex { + pub(crate) position: nalgebra::Point3, + pub(crate) color: nalgebra::Point3, +} + +impl Vertex { + pub fn new(position: nalgebra::Point3, color: nalgebra::Point3) -> Self { + Self { position, color } + } + + pub fn position(&self) -> &nalgebra::Point3 { + &self.position + } + + pub fn color(&self) -> &nalgebra::Point3 { + &self.color + } +} + +#[derive(Clone, Debug, PartialEq)] +pub struct Triangle { + vertices: Vec, +} + +impl Triangle { + pub fn new(vertices: Vec) -> Result { + if vertices.is_empty() { + return Err(NoElements); + } + + Ok(Self { vertices }) + } + + pub(crate) fn buffer_length(&self) -> u32 { + (self.vertices.len() * mem::size_of::()) as u32 + } + + pub(crate) fn len(&self) -> usize { + self.vertices.len() + } + + pub(crate) fn get_vertices(&self) -> &Vec { + &self.vertices + } +} + +impl From>> for Triangle { + fn from(item: Vec>) -> Self { + let vertices = item + .iter() + .map(|p| Vertex { + position: *p, + color: nalgebra::Point3::new(0.5, 0.5, 0.5), + }) + .collect(); + Triangle { vertices } + } +} diff --git a/crates/egraphics-core/src/geometry/geometry.rs b/crates/egraphics-core/src/triangle_mesh.rs similarity index 50% rename from crates/egraphics-core/src/geometry/geometry.rs rename to crates/egraphics-core/src/triangle_mesh.rs index 71eb3ae..f0c9ec0 100644 --- a/crates/egraphics-core/src/geometry/geometry.rs +++ b/crates/egraphics-core/src/triangle_mesh.rs @@ -1,56 +1,20 @@ -use nalgebra; -use std::mem; +use crate::Error::NoElements; +use crate::{Error, Triangle, Vertex}; -#[derive(Copy, Clone, Debug)] -pub struct Vector3D { - pub x: f32, - pub y: f32, - pub z: f32, -} - -#[derive(Copy, Clone, Debug)] -#[repr(C)] -pub struct Vertex { - pub(crate) position: nalgebra::Point3, - pub(crate) color: nalgebra::Point3, -} - -pub struct Triangle { - pub(crate) vertices: Vec, +#[derive(Clone, Debug, PartialEq)] +pub struct TriangleMesh { + triangles: Vec, } -impl Triangle { - fn buffer_length(&self) -> u32 { - (self.vertices.len() * mem::size_of::()) as u32 - } - - fn len(&self) -> usize { - self.vertices.len() - } - - fn get_vertices(&self) -> &Vec { - &self.vertices - } -} +impl TriangleMesh { + pub fn new(triangles: Vec) -> Result { + if triangles.is_empty() { + return Err(NoElements); + } -impl From>> for Triangle { - fn from(item: Vec>) -> Self { - let vertices = item - .iter() - .map(|p| Vertex { - position: *p, - color: nalgebra::Point3::new(0.5, 0.5, 0.5), - }) - .collect(); - Triangle { vertices } + Ok(Self { triangles }) } -} -pub struct TriangleMesh { - pub triangles: Vec, -} - -impl TriangleMesh { fn buffer_length(&self) -> u32 { self.triangles.iter().map(|x| x.buffer_length()).sum() } @@ -83,21 +47,15 @@ impl TriangleMesh { let min_x = vertices .iter() .map(|p| p.x) - .collect::>() - .iter() - .fold(f32::INFINITY, |a, &b| a.min(b)); + .fold(f32::INFINITY, |a, b| a.min(b)); let min_y = vertices .iter() .map(|p| p.y) - .collect::>() - .iter() - .fold(f32::INFINITY, |a, &b| a.min(b)); + .fold(f32::INFINITY, |a, b| a.min(b)); let min_z = vertices .iter() .map(|p| p.z) - .collect::>() - .iter() - .fold(f32::INFINITY, |a, &b| a.min(b)); + .fold(f32::INFINITY, |a, b| a.min(b)); nalgebra::Point3::new(min_x, min_y, min_z) } @@ -109,21 +67,15 @@ impl TriangleMesh { let max_x = vertices .iter() .map(|p| p.x) - .collect::>() - .iter() - .fold(f32::NEG_INFINITY, |a, &b| a.max(b)); + .fold(f32::NEG_INFINITY, |a, b| a.max(b)); let max_y = vertices .iter() .map(|p| p.y) - .collect::>() - .iter() - .fold(f32::NEG_INFINITY, |a, &b| a.max(b)); + .fold(f32::NEG_INFINITY, |a, b| a.max(b)); let max_z = vertices .iter() .map(|p| p.z) - .collect::>() - .iter() - .fold(f32::NEG_INFINITY, |a, &b| a.max(b)); + .fold(f32::NEG_INFINITY, |a, b| a.max(b)); nalgebra::Point3::new(max_x, max_y, max_z) } diff --git a/crates/egraphics-io/Cargo.toml b/crates/egraphics-io/Cargo.toml index d09fb31..33ba8bd 100644 --- a/crates/egraphics-io/Cargo.toml +++ b/crates/egraphics-io/Cargo.toml @@ -5,10 +5,10 @@ authors.workspace = true edition.workspace = true license.workspace = true repository.workspace = true -description = "IO related logic for the egraphics library" +description = "IO operations for processing graphics formats in 3D space." [dependencies] -egraphics-core = { version = "0.0.1-alpha.1", path = "../egraphics-core", registry = "custom" } +egraphics-core = { version = "0.0.1-alpha.3", path = "../egraphics-core" } thiserror = { workspace = true } tracing = { workspace = true } diff --git a/crates/egraphics-io/README.md b/crates/egraphics-io/README.md new file mode 100644 index 0000000..1bec4fa --- /dev/null +++ b/crates/egraphics-io/README.md @@ -0,0 +1,10 @@ +# egraphics-io + +IO operations for processing graphics formats in 3D space. + +> [!WARNING] +> The library is at an early stage of development. + +## Contributing + +The library is developed at the [TUM Chair of Geoinformatics](https://github.com/tum-gis) and contributions are highly welcome. diff --git a/crates/egraphics-io/src/export.rs b/crates/egraphics-io/src/export.rs index 44bbc52..c91d489 100644 --- a/crates/egraphics-io/src/export.rs +++ b/crates/egraphics-io/src/export.rs @@ -17,9 +17,9 @@ pub struct EgraphicsExporter { } impl EgraphicsExporter { - pub fn new(directory_path: impl AsRef) -> Self { + pub fn new(path: impl AsRef) -> Self { Self { - path: directory_path.as_ref().to_owned(), + path: path.as_ref().to_owned(), derive_obj_file: false, create_parent_directories: false, } @@ -47,12 +47,14 @@ impl EgraphicsExporter { write_gltf_file(triangle_mesh, &self.path); if self.derive_obj_file { - Command::new("assimp") + let mut child = Command::new("assimp") .arg("export") .arg(&self.path) .arg(self.get_obj_file_path()) .spawn() .expect("assimp command failed to start"); + + let _result = child.wait().unwrap(); } Ok(()) diff --git a/crates/egraphics-io/src/export_impl.rs b/crates/egraphics-io/src/export_impl.rs index cda41ab..1b375bf 100644 --- a/crates/egraphics-io/src/export_impl.rs +++ b/crates/egraphics-io/src/export_impl.rs @@ -1,5 +1,6 @@ use gltf_json as json; +use gltf_json::buffer::Stride; use json::validation::Checked::Valid; use std::io::Write; use std::path::Path; @@ -29,9 +30,9 @@ pub fn write_gltf_file(triangle_mesh: egraphics_core::TriangleMesh, gltf_path: i let position_min = triangle_mesh.get_min(); let position_max = triangle_mesh.get_max(); - let buffer_length = (triangle_vertices.len() * mem::size_of::()) as u32; + let buffer_length = triangle_vertices.len() * mem::size_of::(); let buffer = json::Buffer { - byte_length: buffer_length, + byte_length: buffer_length.into(), extensions: Default::default(), extras: Default::default(), name: None, @@ -41,7 +42,7 @@ pub fn write_gltf_file(triangle_mesh: egraphics_core::TriangleMesh, gltf_path: i buffer: json::Index::new(0), byte_length: buffer.byte_length, byte_offset: None, - byte_stride: Some(mem::size_of::() as u32), + byte_stride: Some(Stride(mem::size_of::())), extensions: Default::default(), extras: Default::default(), name: None, @@ -49,8 +50,8 @@ pub fn write_gltf_file(triangle_mesh: egraphics_core::TriangleMesh, gltf_path: i }; let positions = json::Accessor { buffer_view: Some(json::Index::new(0)), - byte_offset: 0, - count: triangle_vertices.len() as u32, + byte_offset: None, + count: triangle_vertices.len().into(), component_type: Valid(json::accessor::GenericComponentType( json::accessor::ComponentType::F32, )), @@ -73,8 +74,8 @@ pub fn write_gltf_file(triangle_mesh: egraphics_core::TriangleMesh, gltf_path: i }; let colors = json::Accessor { buffer_view: Some(json::Index::new(0)), - byte_offset: (3 * mem::size_of::()) as u32, - count: triangle_vertices.len() as u32, + byte_offset: Some((3 * mem::size_of::()).into()), + count: triangle_vertices.len().into(), component_type: Valid(json::accessor::GenericComponentType( json::accessor::ComponentType::F32, )), @@ -90,7 +91,7 @@ pub fn write_gltf_file(triangle_mesh: egraphics_core::TriangleMesh, gltf_path: i let primitive = json::mesh::Primitive { attributes: { - let mut map = std::collections::HashMap::new(); + let mut map = std::collections::BTreeMap::new(); map.insert(Valid(json::mesh::Semantic::Positions), json::Index::new(0)); map.insert(Valid(json::mesh::Semantic::Colors(0)), json::Index::new(1)); map diff --git a/crates/egraphics-io/src/lib.rs b/crates/egraphics-io/src/lib.rs index 8dd0372..4b60dae 100644 --- a/crates/egraphics-io/src/lib.rs +++ b/crates/egraphics-io/src/lib.rs @@ -3,4 +3,7 @@ mod export; mod export_impl; #[doc(inline)] -pub use export::EgraphicsExporter; +pub use crate::export::EgraphicsExporter; + +#[doc(inline)] +pub use crate::error::Error; diff --git a/crates/egraphics/Cargo.toml b/crates/egraphics/Cargo.toml index 7f2cdce..a981903 100644 --- a/crates/egraphics/Cargo.toml +++ b/crates/egraphics/Cargo.toml @@ -5,9 +5,9 @@ authors.workspace = true edition.workspace = true license.workspace = true repository.workspace = true -description = "Library for processing graphics formats" +description = "Library for processing graphics formats in 3D space." [dependencies] -egraphics-core = { version = "0.0.1-alpha.1", path = "../egraphics-core", registry = "custom" } -egraphics-io = { version = "0.0.1-alpha.1", path = "../egraphics-io", registry = "custom" } +egraphics-core = { version = "0.0.1-alpha.3", path = "../egraphics-core" } +egraphics-io = { version = "0.0.1-alpha.3", path = "../egraphics-io" } diff --git a/crates/egraphics/README.md b/crates/egraphics/README.md new file mode 100644 index 0000000..af25bf8 --- /dev/null +++ b/crates/egraphics/README.md @@ -0,0 +1,10 @@ +# egraphics + +Library for processing graphics formats in 3D space. + +> [!WARNING] +> The library is at an early stage of development. + +## Contributing + +The library is developed at the [TUM Chair of Geoinformatics](https://github.com/tum-gis) and contributions are highly welcome. diff --git a/crates/egraphics/src/lib.rs b/crates/egraphics/src/lib.rs index b04c446..2a0bcf2 100644 --- a/crates/egraphics/src/lib.rs +++ b/crates/egraphics/src/lib.rs @@ -1,4 +1,6 @@ -//! Library for using georeferencing [glTF 2.0](https://github.com/KhronosGroup/glTF/tree/main/specification/2.0). +//! `egraphics` is a library for processing graphics formats in 3D space. +//! +//! It is mainly wrapping [glTF 2.0](https://github.com/KhronosGroup/glTF/tree/main/specification/2.0) and adding an ecoords. //! //! # Overview //! @@ -7,13 +9,13 @@ //! //! For serializing and annotating a graphical format, this data structure is used: //! -//! - `model_name` (directory) or `model_name.egra` (single file as [tarball](https://en.wikipedia.org/wiki/Tar_(computing))) +//! - `model_name` (directory) or `model_name.egraphics` (single file as [tarball](https://en.wikipedia.org/wiki/Tar_(computing))) //! - `model.gltf` (uncompressed) or `model.glb` (compressed) //! - using: [gltf-rs](https://github.com/gltf-rs/gltf) //! - `model.bin` //! - contains vector data -//! - `frames.json` -//! - contains a transformation tree with validity durations +//! - `ecoord.json` +//! - contains a transform tree with validity durations //! - information: srid //! - purpose: translate and rotate the point cloud without reading/writing the point data //! @@ -29,6 +31,6 @@ //! //! -pub use egraphics_core as core; +pub use egraphics_core::{Error, Triangle, TriangleMesh, Vertex}; pub use egraphics_io as io;