FreeCAD-VR: Some fixes
This commit is contained in:
parent
2a4626d27a
commit
0d6ccb7654
|
@ -33,6 +33,8 @@
|
||||||
#include "PreCompiled.h"
|
#include "PreCompiled.h"
|
||||||
#include "CoinRiftWidget.h"
|
#include "CoinRiftWidget.h"
|
||||||
|
|
||||||
|
#include <Base/Console.h>
|
||||||
|
|
||||||
#if BUILD_VR
|
#if BUILD_VR
|
||||||
|
|
||||||
|
|
||||||
|
@ -319,6 +321,10 @@ void CoinRiftWidget::paintGL()
|
||||||
eyePose[eye].Position.y,
|
eyePose[eye].Position.y,
|
||||||
eyePose[eye].Position.z);
|
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());
|
//SbVec3f originalPosition(camera[eye]->position.getValue());
|
||||||
|
|
||||||
camera[eye]->position.setValue(basePosition - SbVec3f(eyeRenderDesc[eye].ViewAdjust.x,
|
camera[eye]->position.setValue(basePosition - SbVec3f(eyeRenderDesc[eye].ViewAdjust.x,
|
||||||
|
|
|
@ -99,13 +99,14 @@ public:
|
||||||
void setBase(const SbVec3f &pos){basePosition=pos;}
|
void setBase(const SbVec3f &pos){basePosition=pos;}
|
||||||
void setBackgoundColor(const SbColor &Col){BackgroundColor = Col;}
|
void setBackgoundColor(const SbColor &Col){BackgroundColor = Col;}
|
||||||
|
|
||||||
|
SbVec3f basePosition;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void handlingSafetyWarning(void);
|
void handlingSafetyWarning(void);
|
||||||
void initializeGL();
|
void initializeGL();
|
||||||
void paintGL();
|
void paintGL();
|
||||||
void resizeGL(int width, int height);
|
void resizeGL(int width, int height);
|
||||||
|
|
||||||
SbVec3f basePosition;
|
|
||||||
SbColor BackgroundColor;
|
SbColor BackgroundColor;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1650,7 +1650,7 @@ void View3DInventorViewer::viewVR(void)
|
||||||
if(oculusUp())
|
if(oculusUp())
|
||||||
oculusStop();
|
oculusStop();
|
||||||
else{
|
else{
|
||||||
#if 0
|
#if 1
|
||||||
// start and load the simple test scene:
|
// start and load the simple test scene:
|
||||||
oculusSetTestScene(oculusStart());
|
oculusSetTestScene(oculusStart());
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user