Changeset 99 in pacpusframework


Ignore:
Timestamp:
May 28, 2013, 5:55:14 PM (11 years ago)
Author:
morasjul
Message:

Add function Geodesie::yprenuToMatrix

Location:
branches/2.0-beta1
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0-beta1/cmake/PacpusUtilities.cmake

    r89 r99  
    229229    endif()
    230230endfunction()
     231
     232# ========================================
     233# Get sub directories
     234# ========================================
     235MACRO(SUBDIRLIST result curdir)
     236  FILE(GLOB children RELATIVE ${curdir} ${curdir}/*)
     237  SET(dirlist "")
     238  FOREACH(child ${children})
     239    IF(IS_DIRECTORY ${curdir}/${child})
     240        SET(dirlist ${dirlist} ${child})
     241    ENDIF()
     242  ENDFOREACH()
     243  SET(${result} ${dirlist})
     244ENDMACRO()
  • branches/2.0-beta1/include/Pacpus/PacpusTools/geodesie.h

    r89 r99  
    1818#include <iostream>
    1919#include <vector>
     20
     21#include <QMatrix4x4>
     22#include <QVector3D>
    2023
    2124namespace Geodesie {
     
    204207}
    205208
     209QMatrix4x4 yprenuToMatrix(QVector3D angle, QVector3D position);
     210
    206211} // namespace Geodesie
    207212
  • branches/2.0-beta1/src/PacpusLib/CMakeLists.txt

    r98 r99  
    9696
    9797if(UNIX)
    98         set(LIBS optimized FileLib debug FileLib_d)
     98        set(LIBS FileLib)#optimized FileLib debug FileLib_d)
    9999else()
    100100    set(LIBS
  • branches/2.0-beta1/src/PacpusTools/src/geodesie.cpp

    r89 r99  
    343343    C.Apply(x,y,z, e,n,u);
    344344}
     345
     346QMatrix4x4 Geodesie::yprenuToMatrix(QVector3D angle, QVector3D position) {
     347
     348    float c1 = cos(angle.x());
     349    float c2 = cos(angle.y());
     350    float c3 = cos(angle.z());
     351
     352    float s1 = sin(angle.x());
     353    float s2 = sin(angle.y());
     354    float s3 = sin(angle.z());
     355
     356
     357    // Source : https://en.wikipedia.org/wiki/Euler_angles
     358    return QMatrix4x4 (  c1*c2, c1*s2*s3-c3*s1, s1*s3+c1*c3*s2, position.x(),
     359                         c2*s1, c1*c3+s1*s2*s3, c3*s1*s2-c1*s3, position.y(),
     360                           -s2,          c2*s3,          c2*c3, position.z(),
     361                             0,              0,              0,          1);
     362}
Note: See TracChangeset for help on using the changeset viewer.