Changeset 287 in flair-src for trunk/lib/FlairSimulator/src/VisualizationCamera.cpp
- Timestamp:
- Jan 8, 2019, 11:46:02 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSimulator/src/VisualizationCamera.cpp
r286 r287 22 22 #include "Gui.h" 23 23 #include "Gui_impl.h" 24 #include <Euler.h> 24 25 #include <ICursorControl.h> 25 26 #include <ICameraSceneNode.h> … … 52 53 // camera to draw axis, in a new dedicated scene manager 53 54 axis_scenemanager=getGui()->getSceneManager()->createNewSceneManager(); 54 axis_camera 55 axis_camera= axis_scenemanager->addCameraSceneNode(); 55 56 axis_camera->setAspectRatio(1); // same as texture ratio, TODO: get it from texture in renderAxisToTexture 56 57 axis_camera->setUpVector(vector3df(0, 0, 1)); 57 58 axis_camera->setFOV(PI / 2.5f); 58 59 axis_scenemanager->setActiveCamera(axis_camera); 59 prendre en compte le yaw monde/optitrack (rotation de axis_scenemanager?) 60 61 //draw ned axis 60 62 IAnimatedMesh* arrowMeshRed = axis_scenemanager->addArrowMesh( "x_axisArrow",video::SColor(255, 255, 0, 0),video::SColor(255, 255, 0, 0)); 61 63 nodeX = axis_scenemanager->addMeshSceneNode(arrowMeshRed); 62 64 nodeX->setMaterialFlag(video::EMF_LIGHTING, false); 63 nodeX->setRotation(vector3df(0,0,-90 ));65 nodeX->setRotation(vector3df(0,0,-90+core::Euler::ToDegree(getSimulator()->Yaw())));//use vrpn yaw rotation from earth 64 66 nodeX->setScale(vector3df(1,3,1)); 65 67 … … 67 69 nodeY = axis_scenemanager->addMeshSceneNode(arrowMeshGreen); 68 70 nodeY->setMaterialFlag(video::EMF_LIGHTING, false); 71 nodeY->setRotation(vector3df(0,0,core::Euler::ToDegree(getSimulator()->Yaw())));//use vrpn yaw rotation from earth 69 72 nodeY->setScale(vector3df(1,3,1)); 70 73
Note:
See TracChangeset
for help on using the changeset viewer.