-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
0 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
// } | ||
// } | ||
// } | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<PathBuf>, | ||
pub data_rate: f32, | ||
pub camera_rate: f32, | ||
pub num_frames: usize, | ||
pub units: [char; 4], | ||
pub marker_names: Vec<String>, | ||
pub first_frame: usize, | ||
pub data: Grid<MarkerPoint>, | ||
} | ||
|
||
pub mod sto; | ||
|
||
#[derive(Debug, Clone)] | ||
pub struct Sto { | ||
pub file_description: Option<String>, | ||
pub version: u8, | ||
pub in_degrees: bool, | ||
pub first_frame: usize, | ||
pub data_rate: f32, | ||
pub column_names: Vec<String>, | ||
pub data: Grid<f64>, | ||
} |