1use super::Vector3;
2use binrw::BinRead;
3
4#[derive(Debug, PartialEq, BinRead, Clone)]
5pub struct Matrix33 {
6 pub column_major: [f32; 9],
7}
8
9impl From<&Matrix33> for glam::Mat3 {
10 fn from(val: &Matrix33) -> Self {
11 glam::Mat3::from_cols_array(&val.column_major).transpose()
12 }
13}
14
15impl From<Matrix33> for glam::Mat3 {
16 fn from(val: Matrix33) -> Self {
17 (&val).into()
18 }
19}
20
21#[derive(Debug, PartialEq, BinRead)]
22pub struct NiTransform {
23 pub rotation: Matrix33,
24 pub translation: Vector3,
25 pub scale: f32,
26}