Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
FreeCAD-VR: Some fixes
  • Loading branch information
jriegel committed Sep 16, 2014
1 parent 2a4626d commit 0d6ccb7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/Gui/CoinRiftWidget.cpp
Expand Up @@ -33,6 +33,8 @@
#include "PreCompiled.h"
#include "CoinRiftWidget.h"

#include <Base/Console.h>

#if BUILD_VR


Expand Down Expand Up @@ -319,6 +321,10 @@ void CoinRiftWidget::paintGL()
eyePose[eye].Position.y,
eyePose[eye].Position.z);

//Base::Console().Log("Pos: (%d) %f, %f, %f \n",eye, eyePose[eye].Position.x,
// eyePose[eye].Position.y,
// eyePose[eye].Position.z);

//SbVec3f originalPosition(camera[eye]->position.getValue());

camera[eye]->position.setValue(basePosition - SbVec3f(eyeRenderDesc[eye].ViewAdjust.x,
Expand Down
3 changes: 2 additions & 1 deletion src/Gui/CoinRiftWidget.h
Expand Up @@ -99,13 +99,14 @@ class CoinRiftWidget : public QGLWidget
void setBase(const SbVec3f &pos){basePosition=pos;}
void setBackgoundColor(const SbColor &Col){BackgroundColor = Col;}

SbVec3f basePosition;

protected:
void handlingSafetyWarning(void);
void initializeGL();
void paintGL();
void resizeGL(int width, int height);

SbVec3f basePosition;
SbColor BackgroundColor;
};

Expand Down
2 changes: 1 addition & 1 deletion src/Gui/View3DInventorViewer.cpp
Expand Up @@ -1650,7 +1650,7 @@ void View3DInventorViewer::viewVR(void)
if(oculusUp())
oculusStop();
else{
#if 0
#if 1
// start and load the simple test scene:
oculusSetTestScene(oculusStart());
#else
Expand Down

0 comments on commit 0d6ccb7

Please sign in to comment.