1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
use std::io::Read;
use crate::{
read_dict,
read_int,
};
#[derive(Default, Debug)]
pub struct Camera {
name: String,
dist: f32,
rot: [[f32; 4]; 4],
offset: i32,
ortho: bool,
}
impl Camera {
pub fn new(stream: &mut dyn Read) -> Self {
let length = read_int(stream);
let _dict = read_dict(stream, length);
// TODO: Research on how to parse byte array to float, float array, bool, etc
// let name = get_value_string(&dict, "name");
// let dist = get_value_f32(&dict, "dist");
// let rot = get_value(&dict, "rot");
// let offset = get_value_i32(&dict, "ofs");
// let ortho = get_value_bool(&dict, "ortho");
//
// Camera {
// name,
// dist,
// rot,
// offset,
// ortho,
// }
Default::default()
}
}