Skip to content

Commit

Permalink
wip state file
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoireHENRY committed Dec 15, 2023
1 parent d27a940 commit 5aeb4ba
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions src/simu/routines/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,24 @@ pub trait Routines: DowncastSync {
}
}
CfgState::File(path) => {
dbg!(&path);
dbg!(&path.canonicalize().unwrap());

let df = CsvReader::from_path(&path).unwrap().finish().unwrap();
dbg!(&df[0]);
dbg!(&df[1]);
let df = CsvReader::from_path(&path)
.unwrap()
.has_header(false)
.finish()
.unwrap();
let row = df
.get_row(time.iteration())
.unwrap()
.0
.into_iter()
.map(|v| {
v.cast(&DataType::Float64)
.unwrap()
.try_extract::<Float>()
.unwrap()
});

let t = Mat4::new_translation(&Vec3::from_iterator(row.take(3)));
}
_ => panic!("tempo"),
};
Expand Down

0 comments on commit 5aeb4ba

Please sign in to comment.