pub fn matrix4(input: &mut &str) -> ModalResult<Matrix4>
Expand description
Parse as Matrix4
§Examples
use havok_types::{Matrix4, Vector4};
use serde_hkx::xml::de::parser::type_kind::matrix4;
use winnow::Parser as _;
assert_eq!(matrix4.parse("
(0.000000 0.000000 0.000000 0.000000)
(-0.000000 0.000000 -0.000000 0.000000)
(1.000000 1.000000 1.000000 0.000000)
(1.000000 1.000000 1.000000 0.000000)
"), Ok(Matrix4::new(
Vector4::default(),
Vector4::new(-0.0, 0.0, -0.0, 0.0),
Vector4::new(1.0, 1.0, 1.0, 0.0),
Vector4::new(1.0, 1.0, 1.0, 0.0),
)));
§Errors
When parse failed.