summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDennis Peeten <dpeeten@onsneteindhoven.nl>2008-05-28 09:02:56 (GMT)
committerDennis Peeten <dpeeten@onsneteindhoven.nl>2008-05-28 09:02:56 (GMT)
commit335f0cdff6264d6d8be9e32bd1fe6dc4fd93521a (patch)
treecb80a42012a0ea96a1802cfca7c06ea901ce4697
parenta2642d3545821f1a35dc2dff3c0ff5b632f78397 (diff)
download2iv55-335f0cdff6264d6d8be9e32bd1fe6dc4fd93521a.zip
2iv55-335f0cdff6264d6d8be9e32bd1fe6dc4fd93521a.tar.gz
2iv55-335f0cdff6264d6d8be9e32bd1fe6dc4fd93521a.tar.bz2
-rw-r--r--matchblox/engine/C_MatchBloxEngine.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/matchblox/engine/C_MatchBloxEngine.cpp b/matchblox/engine/C_MatchBloxEngine.cpp
index e380300..5925fb2 100644
--- a/matchblox/engine/C_MatchBloxEngine.cpp
+++ b/matchblox/engine/C_MatchBloxEngine.cpp
@@ -59,10 +59,10 @@ C_MatchBloxEngine::C_MatchBloxEngine(const char *f_strModelPath,
srand ( time(NULL) );
//init vars
- m_CurrentBox = BS_SMALL;
+ m_CurrentBox = BS_LARGE;
- m_bHeadTrackingEnabled = false;
- m_bStereoEnabled = false;
+ m_bHeadTrackingEnabled = true;
+ m_bStereoEnabled = true;
//init the world bounding box
m_WorldBox.m_Min = Vect3D_t(-15.0, -5.0, -15.0);
@@ -200,7 +200,7 @@ void C_MatchBloxEngine::Render(unsigned int f_uiElapsedTime, input_payload_wiimo
{
Vect3D_t l_LeftEye, l_CenterEye, l_RightEye;
- if (f_HTWiimote.posDataValid)
+ if (f_HTWiimote.posDataValid && m_bHeadTrackingEnabled)
{
//calculate the eye positions
CalcEyePosInMM(&f_HTWiimote, STEREO_LEFT_EYE, f_FrustParms, l_LeftEye);
@@ -283,7 +283,7 @@ void C_MatchBloxEngine::RenderMain(unsigned int f_uiElapsedTime)
glPushMatrix();
//move the camera backwards
- glTranslated(0.0, 0.0, -16.0);
+ glTranslated(0.0, m_WorldBox.m_Min.y + 1.0 , m_pBox[m_CurrentBox]->GetBoundingBox().m_Min.z - 1.0);
glRotated(20.0, 1.0, 0.0, 0.0);
//always render the box
@@ -294,10 +294,7 @@ void C_MatchBloxEngine::RenderMain(unsigned int f_uiElapsedTime)
case ES_PLAYING_GRAB_BLOCK:
case ES_PLAYING_PUT_BLOCK:
m_pBlock[(int)m_CurrentBlock]->Render(f_uiElapsedTime, l_iTexShaderLocation);
- m_pHand->Render(f_uiElapsedTime); //do not break also render the hand
- case ES_INITIALISED:
- case ES_ERROR:
- m_pHand->Render(f_uiElapsedTime);
+ m_pHand->Render(f_uiElapsedTime);
break;
}
@@ -577,7 +574,7 @@ bool C_MatchBloxEngine::LoadModels(const char* f_strModelDir)
std::string l_BaseName = f_strModelDir;
//create the environment mapped cube
- m_pEnvMap = new C_Environment("envmaps/brightday2_", 50.0);
+ m_pEnvMap = new C_Environment("envmaps/terrain_", 50.0);
//load the bitmaps for the textures
LoadTexture((l_BaseName + "/wood1.bmp").c_str(), m_uiWood1Tex);