Closed ndehio closed 7 years ago
@ndehio Should be fixed. Please check that
works for me =) thanks!
I realized that the current implementation is not correct... When constructing a rotation with different yaw-angles, the internal representation is filled with wrong values. Attached I provide four rotations with corresponding euler and quaternion constructor. The output should be the same, which is unfortunately not the case.
##################################################################
import("rst-rt_typekit") var rstrt.geometry.Rotation r1; var rstrt.geometry.Rotation r2; var rstrt.geometry.Rotation r3; var rstrt.geometry.Rotation r4;
r1 = rstrt.geometry.Rotation(0,0,0) r2 = rstrt.geometry.Rotation(0,0,0.785398) r3 = rstrt.geometry.Rotation(0,0,1.5708) r4 = rstrt.geometry.Rotation(0,0,2.35619)
r1 = rstrt.geometry.Rotation(0,0,0.0) r2 = rstrt.geometry.Rotation(+0.92388,0,0,+0.382683) r3 = rstrt.geometry.Rotation(+0.707107,0,0,+0.707107) r4 = rstrt.geometry.Rotation(+0.382683,0,0,+0.92388)
works fine now =)
In the deployer, I am able to create a rotation by using the "quaternion" constructor: var rstrt.geometry.Rotation r = rstrt.geometry.Rotation(1,0,0,0);
Unfortunately, it is not possible for me to create a rotation by using the "euler" constructor and providing roll/pitch/yaw: var rstrt.geometry.Rotation r = rstrt.geometry.Rotation(1,1,1);
Both constructors should be available, see https://github.com/corlab/rst-rt/blob/master/src/rst-rt/geometry/Rotation.hpp