Ignore:
Timestamp:
Apr 12, 2017, 1:59:38 PM (5 years ago)
Author:
Sanahuja Guillaume
Message:

modifs pour template vectors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairSimulator/src/FixedCamera.cpp

    r120 r167  
    3535namespace simulator {
    3636
    37 FixedCamera::FixedCamera(std::string name,core::Vector3D position,core::Vector3D lookat,float inRotateSpeed,float inZoomSpeed):VisualizationCamera(name)  {
     37FixedCamera::FixedCamera(std::string name,core::Vector3Df position,core::Vector3Df lookat,float inRotateSpeed,float inZoomSpeed):VisualizationCamera(name)  {
    3838  Rotating = false;
    3939  rotateSpeed=inRotateSpeed;
     
    6262
    6363      //normal between target and up vector
    64       cameraAxeY=target.crossProduct(irr::core::vector3df(0,0,1));
     64      cameraAxeY=target.crossProduct(vector3df(0,0,1));
    6565      cameraAxeY.normalize();
    6666
     
    8181
    8282      //check angle
    83       irr::core::vector3df newTarget(q3.X,q3.Y,q3.Z);
    84       float angle=acos(newTarget.dotProduct(irr::core::vector3df(0,0,1))/newTarget.getLength());
    85       irr::core::vector3df cross = newTarget.crossProduct(irr::core::vector3df(0,0,1));
     83      vector3df newTarget(q3.X,q3.Y,q3.Z);
     84      float angle=acos(newTarget.dotProduct(vector3df(0,0,1))/newTarget.getLength());
     85      vector3df cross = newTarget.crossProduct(vector3df(0,0,1));
    8686      if (cross.dotProduct(cameraAxeY) > 0) {
    8787        newTarget += camera->getAbsolutePosition();
Note: See TracChangeset for help on using the changeset viewer.