Dieser Beitrag wurde bereits 5 mal editiert, zuletzt von »indexofrefraction« (30. Juli 2016, 22:43)
Benutzerinformationen überspringen
Wohnort: Netherlands
Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.com
the rotation results are also depending on the 'order' of the axis-rotations!
By default rx/ry/rz are using the order 'Y-X-Z'
|
|
Quellcode |
1 2 |
set(ry,30); set(rx,45); set(rz,60); set(rx,45); set(ry,30); set(rz,60); |
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
<action name="calc_ry_ry_rz_from_yaw_pitch_roll"> div(yaw,%1,-57.295779); div(pitch,%2,57.295779); div(roll,%3,-57.295779); Math.cos(ch,yaw);Math.sin(sh,yaw); Math.cos(ca,pitch);Math.sin(sa,pitch); Math.cos(cb,roll);Math.sin(sb,roll); mul(m0,ca,ch); mul(tmp,cb,sa);mul(tmp,ch);mul(tmp2,sb,sh);add(m3,tmp,tmp2); mul(m4,cb,ca); mul(tmp,cb,sa);mul(tmp,sh);mul(tmp2,sb,ch);sub(m5n,tmp,tmp2);mul(m5n,-1); mul(tmp,sb,sa);mul(tmp,ch);mul(tmp2,cb,sh);sub(m6n,tmp,tmp2);mul(m6n,-1); Math.atan2(yaw,m6n,m0); Math.atan2(roll,m5n,m4); Math.asin(pitch,m3); mul(rx,yaw,57.295779); mul(ry,pitch,57.295779); mul(rz,roll,57.295779); </action> calc_ry_ry_rz_from_yaw_pitch_roll(calc(atv-90),0,0); <!-- works fine, but same as just set(rx,calc(atv-90)); --> calc_ry_ry_rz_from_yaw_pitch_roll(calc(atv-90),0,30); <!-- uncorrect rotation --> calc_ry_ry_rz_from_yaw_pitch_roll(calc(atv-90),30,0); <!-- uncorrect rotation --> |
Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »indexofrefraction« (2. Januar 2017, 12:15)
Benutzerinformationen überspringen
Wohnort: Netherlands
Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.comDieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Tuur« (4. Januar 2017, 09:50)