This commit is contained in:
Quaternions 2024-01-10 19:52:38 -08:00
parent 828c35dab6
commit 5250a0178f

View File

@ -199,10 +199,13 @@ pub fn generate_indexed_models<R:std::io::Read+std::io::Seek>(input:&mut R)->Res
transform:crate::integer::Planar64Affine3::new( transform:crate::integer::Planar64Affine3::new(
crate::integer::Planar64Mat3::try_from( crate::integer::Planar64Mat3::try_from(
glam::Mat3A::from_diagonal(glam::Vec3::splat(placement.scale)) glam::Mat3A::from_diagonal(glam::Vec3::splat(placement.scale))
*glam::Mat3A::from_quat( //TODO: figure this out
//TODO: does rotation need valve transform? *glam::Mat3A::from_quat(glam::Quat::from_xyzw(
glam::Quat::from_xyzw(placement.rotation.v.x,placement.rotation.v.y,placement.rotation.v.z,placement.rotation.s), placement.rotation.v.x,//b
) placement.rotation.v.y,//c
placement.rotation.v.z,//d
placement.rotation.s,//a
))
).unwrap(), ).unwrap(),
valve_transform(<[f32;3]>::from(placement.origin)), valve_transform(<[f32;3]>::from(placement.origin)),
), ),