diff --git a/examples/read-write.rs b/examples/read-write.rs index 2c5a73c..1f786b1 100644 --- a/examples/read-write.rs +++ b/examples/read-write.rs @@ -1,28 +1,11 @@ use std::assert_eq; -use c3dio::file_formats::Sto; -use c3dio::file_formats::Trc; use c3dio::prelude::*; fn main() { let c3d = C3d::load("tests/c3d_org_samples/sample_30/admarche2.c3d").unwrap(); - // Sto::from_c3d(&c3d).write("examples/short-copy2.sto").unwrap(); let c3d = c3d.write("examples/short-copy.c3d").unwrap(); let c3d2 = C3d::load("examples/short-copy.c3d").unwrap(); - // let c3d2 = C3d::load("tests/c3d_org_samples/sample_01/Eb015pr.c3d").unwrap(); assert_eq!(c3d, c3d2); - dbg!(c3d.points.descriptions); - dbg!(c3d2.points.descriptions); - // assert_eq!(c3d.points.size(), c3d2.points.size()); - // for i in 0..c3d.points.size().0 { - // for j in 0..c3d.points.size().1 { - // if c3d.points[i][j] != c3d2.points[i][j] { - // dbg!(i, j); - // dbg!(c3d.points[i][j]); - // dbg!(c3d2.points[i][j]); - // dbg!(c3d2.points.scale_factor); - // } - // } - // } } diff --git a/examples/short-copy.c3d b/examples/short-copy.c3d deleted file mode 100644 index 0344a00..0000000 Binary files a/examples/short-copy.c3d and /dev/null differ diff --git a/src/file_formats/mod.rs b/src/file_formats/mod.rs index 9e41d04..042d40d 100644 --- a/src/file_formats/mod.rs +++ b/src/file_formats/mod.rs @@ -1,33 +1,5 @@ //! Structures to represent auxiliary data types that C3D files can be written to. -use crate::data::MarkerPoint; -use grid::Grid; -use std::path::PathBuf; pub mod trc; - -#[derive(Debug, Clone)] -pub struct Trc { - pub path_file_type: u8, - pub path_file_type_description: String, - pub file_name: Option, - pub data_rate: f32, - pub camera_rate: f32, - pub num_frames: usize, - pub units: [char; 4], - pub marker_names: Vec, - pub first_frame: usize, - pub data: Grid, -} - pub mod sto; -#[derive(Debug, Clone)] -pub struct Sto { - pub file_description: Option, - pub version: u8, - pub in_degrees: bool, - pub first_frame: usize, - pub data_rate: f32, - pub column_names: Vec, - pub data: Grid, -}