library: render: mesh: parse rotation in degrees
This commit is contained in:
parent
e1f18786ce
commit
2994a7dcfa
|
@ -44,8 +44,11 @@ impl TryFrom<Wavefront> for Mesh {
|
||||||
let (models, materials) = load_obj(&wavefront.obj_file)?;
|
let (models, materials) = load_obj(&wavefront.obj_file)?;
|
||||||
|
|
||||||
// The object to world transformation matrix
|
// The object to world transformation matrix
|
||||||
let transform =
|
let transform = Similarity3::new(
|
||||||
Similarity3::new(wavefront.translation, wavefront.rotation, wavefront.scale);
|
wavefront.translation,
|
||||||
|
wavefront.rotation * std::f32::consts::PI / 180., // From degrees to radians
|
||||||
|
wavefront.scale,
|
||||||
|
);
|
||||||
|
|
||||||
for model in models {
|
for model in models {
|
||||||
let mesh = &model.mesh;
|
let mesh = &model.mesh;
|
||||||
|
|
Loading…
Reference in a new issue