Changeset 212 in pacpusframework for trunk/src/PacpusTools
- Timestamp:
- Nov 6, 2013, 11:51:51 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/PacpusTools/src/geodesie.cpp
r211 r212 10 10 11 11 #include <fstream> 12 #include <QMatrix4x4> 13 #include <QVector3D> 12 14 13 15 using ::boost::math::constants::pi; … … 413 415 } 414 416 415 //QMatrix4x4 Geodesy::yprenuToMatrix(QVector3D angle, QVector3D position)416 //{417 //float c1 = cos(angle.x());418 //float c2 = cos(angle.y());419 //float c3 = cos(angle.z());420 // 421 //float s1 = sin(angle.x());422 //float s2 = sin(angle.y());423 //float s3 = sin(angle.z());424 // 425 //// Source : https://en.wikipedia.org/wiki/Euler_angles426 //return QMatrix4x4(c1 * c2, c1 * s2 * s3 - c3 * s1, s1 * s3 + c1 * c3 * s2, position.x(),427 //c2 * s1, c1 * c3 + s1 * s2 * s3, c3 * s1 * s2 - c1 * s3, position.y(),428 //-s2, c2 * s3, c2 * c3, position.z(),429 //0, 0, 0, 1);430 //}417 QMatrix4x4 Geodesy::yprenuToMatrix(QVector3D angle, QVector3D position) 418 { 419 float c1 = cos(angle.x()); 420 float c2 = cos(angle.y()); 421 float c3 = cos(angle.z()); 422 423 float s1 = sin(angle.x()); 424 float s2 = sin(angle.y()); 425 float s3 = sin(angle.z()); 426 427 // Source : https://en.wikipedia.org/wiki/Euler_angles 428 return QMatrix4x4(c1 * c2, c1 * s2 * s3 - c3 * s1, s1 * s3 + c1 * c3 * s2, position.x(), 429 c2 * s1, c1 * c3 + s1 * s2 * s3, c3 * s1 * s2 - c1 * s3, position.y(), 430 -s2, c2 * s3, c2 * c3, position.z(), 431 0, 0, 0, 1); 432 }
Note:
See TracChangeset
for help on using the changeset viewer.