Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Visualization.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Visualization.cpp	(revision 2790)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Visualization.cpp	(revision 2796)
@@ -14,6 +14,4 @@
 namespace CHCDemoEngine
 {
-
-GLUquadric *mSphere;
 
 
@@ -84,4 +82,10 @@
 
 
+Visualization::~Visualization() 
+{
+	//DEL_PTR(mSphere);
+}
+
+
 void Visualization::SetHierarchy(Bvh *bvh)
 {
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Bvh.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Bvh.cpp	(revision 2795)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Bvh.cpp	(revision 2796)
@@ -141,5 +141,5 @@
 	mGeometrySize = entities.size();
 	mGeometry = new SceneEntity*[mGeometrySize];
-	
+
 	mBox.Initialize();
 
@@ -153,5 +153,5 @@
 	}
 
-	cout << "scene box: " << mBox << endl;
+	//cout << "scene box: " << mBox << endl;
 }
 
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneQuery.h
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneQuery.h	(revision 2782)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneQuery.h	(revision 2796)
@@ -19,5 +19,5 @@
 
 	SceneQuery(const AxisAlignedBox3 &sceneBox, RenderTraverser *traverser);
-
+	~SceneQuery() { DEL_ARRAY_PTR(mDepth); }
 	bool CalcIntersection(Vector3 &pt);
 
@@ -31,4 +31,6 @@
 
 	AxisAlignedBox3 mSceneBox;
+
+	float *mDepth;
 };
 
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Camera.h
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Camera.h	(revision 2782)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Camera.h	(revision 2796)
@@ -20,5 +20,4 @@
 	{
 		/// the 6 clip planes
-		//float mClipPlane[6][4];
 		Plane3 mClipPlanes[6];
 
@@ -30,18 +29,11 @@
 	Camera(int width, int height, float fieldOfView = 90.f);
 
-	void Precompute();
-
-	void LookInBox(const AxisAlignedBox3 &box);
-
-	void LookAtBox(const AxisAlignedBox3 &box);
 
 	void SetPosition(const Vector3 &pos);
 
-	void SetDirection(const Vector3 &dir);
-
 	inline Vector3 GetPosition() const { return mPosition; }
-	inline Vector3 GetDirection() const { return mDirection; }
-	inline Vector3 GetUpVector() const { return mUp; }
-	inline Vector3 GetRightVector() const { return mRight; }
+	Vector3 GetDirection() const;
+	Vector3 GetUpVector() const;
+	Vector3 GetRightVector() const;
 
 	inline float GetFov() const { return mFovy; }
@@ -49,4 +41,6 @@
 	inline float GetAspect() const { return (float) mWidth / mHeight; }
 
+	/** Sets up viewing in gl
+	*/
 	void SetupCameraView();
 	void GetProjectionMatrix(Matrix4x4 &mat);
@@ -60,17 +54,25 @@
 	inline float GetNear() const { return mNear; }
 	void SetNear(float nearDist);
+	
+	inline float GetFar() const { return mFar; }
+
+	void SetFar(float farDist) { mFar = farDist; }
+
+	void SetOrtho(bool ortho);
+
+	void Yaw(float angle);
+	void Pitch(float angle);
+	
 
 
 protected:
 
+	void Precompute(const Vector3 &direction);
+
+	void CalculateFromPitchAndYaw();
+
+
 	////////////////
-
-	Vector3 mPosition;
-	Vector3 mDirection;
-
-	/// up vector takes into account the FOV at a unit distance from the origin
-	Vector3 mUp;
-	/// right vector takes into account the FOV at a unit distance from the origin
-	Vector3 mRight;
+	//-- members
 
 	float mFovy;
@@ -79,4 +81,16 @@
 
 	float mNear;
+
+	float mFar;
+
+	bool mIsOrtho;
+
+	Matrix4x4 mBaseOrientation;
+	Matrix4x4 mViewOrientation;
+
+	float mPitch;
+	float mYaw;
+
+	Vector3 mPosition;
 };
 
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp	(revision 2795)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp	(revision 2796)
@@ -21,4 +21,5 @@
 #include "RenderState.h"
 #include "Timer/PerfTimer.h"
+#include "SceneQuery.h"
 
 
@@ -58,4 +59,6 @@
 int trianglesPerVirtualLeaf = 1000;
 
+SceneQuery *sceneQuery = NULL;
+
 /// these values get scaled with the frame rate
 const float keyForwardMotion = 50.0f;
@@ -98,6 +101,4 @@
 /// the accumulated z axis rotation
 float rotation = 0;
-
-Matrix4x4 visView = IdentityMatrix();
 
 SceneEntityContainer skyGeometry;
@@ -121,4 +122,5 @@
 void Output(int x, int y, const char *string);
 void DrawHelpMessage();
+void RenderSky();
 
 void Begin2D();
@@ -135,5 +137,4 @@
 void RightMotion(int x, int y);
 void MiddleMotion(int x, int y);
-void SetupVisView();
 void CalcDecimalPoint(string &str, int d);
 void ResetTraverser();
@@ -156,5 +157,6 @@
 
 	visCamera = new Camera(winWidth, winHeight, fov);
-	visCamera->SetNear(nearDist);
+	visCamera->SetNear(0.0f);
+	visCamera->Yaw(.5 * M_PI);
 
 	glutInitWindowSize(winWidth, winHeight);
@@ -222,4 +224,5 @@
 
 	bvh->SetCamera(camera);
+
 	ResetTraverser();
 
@@ -229,4 +232,6 @@
 
 	visualization = new Visualization(bvh, camera, NULL, &state);
+
+	sceneQuery = new SceneQuery(bvh->GetBox(), traverser);
 
 	glutMainLoop();
@@ -488,4 +493,9 @@
 		KeyVerticalMotion(KeyShift());
 
+	
+	Vector3 playerPos = camera->GetPosition();
+	sceneQuery->CalcIntersection(playerPos);
+	camera->SetPosition(playerPos);
+
 	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 
@@ -497,17 +507,9 @@
 
 	
-	glEnableClientState(GL_VERTEX_ARRAY);
-	glEnableClientState(GL_NORMAL_ARRAY);
-
-	SceneEntityContainer::const_iterator sit, sit_end = skyGeometry.end();
-
-	for (sit = skyGeometry.begin(); sit != sit_end; ++ sit)
-		(*sit)->Render(&state);
-
-	glDisableClientState(GL_VERTEX_ARRAY);
-	glDisableClientState(GL_NORMAL_ARRAY);
-
-	state.Reset();
-
+	///////////////
+	//-- render sky
+
+	RenderSky();
+	
 	if (visMode) DisplayVisualization();
 	
@@ -764,5 +766,5 @@
 	glLoadIdentity();
 
-	gluPerspective(fov, 1.0f / winAspectRatio, nearDist, 2.0f * Magnitude(bvh->GetBox().Diagonal()));
+	gluPerspective(fov, 1.0f / winAspectRatio, nearDist, 10.0f * Magnitude(bvh->GetBox().Diagonal()));
 
 	glMatrixMode(GL_MODELVIEW);
@@ -926,7 +928,5 @@
 // displays the visualisation of culling algorithm
 void DisplayVisualization()
-{cout<<"here34"<<endl;
-	SetupVisView();
-
+{
 	visualization->SetFrameId(traverser->GetCurrentFrameId());
 	
@@ -940,29 +940,24 @@
 	End2D();
 	
-	glViewport(winWidth - winWidth / 4, winHeight - winHeight / 3, winWidth, winHeight);
+	
+	AxisAlignedBox3 box = bvh->GetBox();
+
+	const float xoffs = box.Size().x * 0.5f;
+	const float yoffs = box.Size().y * 0.5f;
+
+	Vector3 vizpos = Vector3(box.Center().x, box.Center().y, box.Max().z);
+	visCamera->SetPosition(vizpos);
+	
+	glViewport(winWidth - winWidth / 4, winHeight - winHeight / 3, winWidth / 4, winHeight / 3);
 
 	glMatrixMode(GL_PROJECTION);
 	glLoadIdentity();
 	
-	gluPerspective(fov, 1.0f / winAspectRatio, nearDist, 20.0f * Magnitude(bvh->GetBox().Diagonal()));
-	
-	AxisAlignedBox3 box = bvh->GetBox();
-	const float offs = 2000;
-	
-	//glOrtho(box.Min().y - offs, box.Max().y + offs, box.Min().y - offs, box.Max().y + offs, 0.1, 20.0f * Magnitude(bvh->GetBox().Diagonal())); 
-	//glOrtho(-offs, offs, offs, -offs, 0.1, 20.0f * Magnitude(bvh->GetBox().Diagonal())); 
-	//glPushMatrix();
-
-	Vector3 vizpos = Vector3(box.Center().x, box.Center().y, box.Max().z);
-	visCamera->SetPosition(vizpos);
-	visCamera->Yaw(-0.5 * M_PI);
-	cout<<"pos: " << visCamera->GetPosition()<<endl;
+	glOrtho(-xoffs, xoffs, -yoffs, yoffs, 0.0f, box.Size().z); 
+
 	glMatrixMode(GL_MODELVIEW);
-	glLoadIdentity();
 
 	visCamera->SetupCameraView();
-	//glMultMatrixf((float *)visView.x);
-
-	//SetupLighting();
+	
 	GLfloat position[] = {0.8f, 1.0f, 1.5f, 0.0f};
 	glLightfv(GL_LIGHT0, GL_POSITION, position);
@@ -978,35 +973,7 @@
 	visualization->Render();
 	
-	//glPopMatrix();
-	
 	glViewport(0, 0, winWidth, winHeight);
 }
 
-
-/** Sets up view matrix for bird eye view
-*/
-void SetupVisView()
-{
-	Vector3 pos(-bvh->GetBox().Center());
- 
-	pos.z = -15.0f * bvh->GetBox().Size().z;
-	pos.y += 1400;
-	pos.x -= 1170;
-
-	Vector3 dir(0, 0, 1);
-	Vector3 up(0, 1, 0);
-
-	Vector3 left = Normalize(CrossProd(dir, up));
-	up = Normalize(CrossProd(left, dir));
-
-	visView = Matrix4x4(up, left, dir);
-	pos = visView * pos;
-
-	visView.x[3][0] = pos.x;
-	visView.x[3][1] = pos.y;
-	visView.x[3][2] = pos.z;
-
-	//cout << visView<< endl;
-}
 
 // cleanup routine after the main loop
@@ -1014,4 +981,5 @@
 {
 	DEL_PTR(traverser);
+	DEL_PTR(sceneQuery);
 	DEL_PTR(bvh);
 	DEL_PTR(visualization);
@@ -1139,2 +1107,19 @@
 	End2D();
 }	
+
+
+void RenderSky()
+{
+	glEnableClientState(GL_VERTEX_ARRAY);
+	glEnableClientState(GL_NORMAL_ARRAY);
+
+	SceneEntityContainer::const_iterator sit, sit_end = skyGeometry.end();
+
+	for (sit = skyGeometry.begin(); sit != sit_end; ++ sit)
+		(*sit)->Render(&state);
+
+	glDisableClientState(GL_VERTEX_ARRAY);
+	glDisableClientState(GL_NORMAL_ARRAY);
+
+	state.Reset();
+}
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/BvhLoader.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/BvhLoader.cpp	(revision 2795)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/BvhLoader.cpp	(revision 2796)
@@ -94,4 +94,8 @@
 	cout << "... finished loading " << bvh->mNumNodes << " nodes, updating boxes" << endl;
 
+	bvh->mBox = bvh->mRoot->GetBox();
+
+	cout << "scene box: " << bvh->mBox << endl;
+
 	///////////
 	//-- post process nodes
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Visualization.h
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Visualization.h	(revision 2790)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Visualization.h	(revision 2796)
@@ -12,4 +12,5 @@
 class RenderState;
 class AxisAlignedBox3;
+class GLUquadric;
 
 
@@ -22,5 +23,5 @@
 	Visualization(Bvh *bvh, Camera *camera, Camera *vizCamera, RenderState *renderState);
 
-	~Visualization() {}
+	~Visualization();
 
 	/** Renders the visualizatioin
@@ -66,4 +67,6 @@
 	/// the current frame id
 	int mFrameId;
+
+	GLUquadric *mSphere;
 };
 
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneQuery.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneQuery.cpp	(revision 2782)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneQuery.cpp	(revision 2796)
@@ -18,10 +18,10 @@
 
 const static int viewport[4] = {0, 0, 512, 512};
-//static DepthComponent<float> *sDepth = NULL;
+//const static int viewport[4] = {0, 0, 1024, 768};
 
 
 
 SceneQuery::SceneQuery(const AxisAlignedBox3 &sceneBox, RenderTraverser *renderer): 
-mSceneBox(sceneBox)
+mSceneBox(sceneBox), mDepth(NULL)
 {
 	Prepare(renderer);
@@ -32,11 +32,11 @@
 {
 	int px = (pt.x - mSceneBox.Min(0)) * (viewport[2] - 1) / mSceneBox.Size(0);
-	int py = (pt.y - mSceneBox.Min(2)) * (viewport[3] - 1) /  mSceneBox.Size(2);
+	int py = (pt.y - mSceneBox.Min(1)) * (viewport[3] - 1) / mSceneBox.Size(1);
 
-	const float d = 1.0f;// - sDepth->getPixel(px, py);
+	const float d = mDepth[px + py * viewport[1]];
 
 	if (d > 0.0f)
 	{
-		pt.z = mSceneBox.Size(2) * d + mSceneBox.Min(2);
+		pt.z =  mSceneBox.Min().z + mSceneBox.Size().z * d;
 		cout << "new depth " << pt.z << " (" << d << ")" << endl;
 
@@ -52,43 +52,41 @@
 	cout << "Preparing scene queries" << endl;
 
-	// center camera on "highest" point
-	Vector3 pos;
-
-	pos.x = mSceneBox.Center(0);
-	pos.y = mSceneBox.Max(1);
-	pos.z = mSceneBox.Center(2);
-
-	// for ortho cam this is the width
-	const Vector3 len = mSceneBox.Size();
-
-	Camera *orthoCam = new Camera(len.x, len.y);
-	//orthoCam->SetOrtho(true);
+	const float xlen = mSceneBox.Size().x * 0.5f;
+	const float ylen = mSceneBox.Size().y * 0.5f;
+	
+	Camera *orthoCam = new Camera(xlen, ylen);
+	orthoCam->SetOrtho(true);
 
 	orthoCam->SetNear(0.0f);
-	//orthoCam->SetFar(len.z);
+	orthoCam->Yaw(M_PI * 0.5f);
 
+	Vector3 pos = Vector3(mSceneBox.Center().x, mSceneBox.Center().y, mSceneBox.Max().z);
 	orthoCam->SetPosition(pos);
 
-	cout << "fov: " << orthoCam->GetFov() << endl;
-	cout << "near: " << orthoCam->GetNear() << endl;
-	//cout << "far: " << orthoCam->GetFar() << endl;
-	cout << "aspect: " << orthoCam->GetAspect() << endl;
+	glPixelStorei(GL_PACK_ROW_LENGTH, viewport[2]);
 
-	cout << "pos: " << orthoCam->GetPosition() << endl;
-	cout << "view: " << orthoCam->GetDirection() << endl;
-	cout << "up: " << orthoCam->GetUpVector() << endl;
+	// hack: should create offscreen buffer for this
+	glViewport(0, 0, viewport[2], viewport[3]);
 
-	//orthoCam->SetDirection(Vector3(0, 1, 0));
-	//orthoCam->Yaw(M_PI * 0.5f);
+	glMatrixMode(GL_PROJECTION);
+	glLoadIdentity();
 	
-	renderer->SetCamera(orthoCam);
+	glOrtho(-xlen, xlen, -ylen, ylen, 0.0f, mSceneBox.Size().z); 
+	
+	glMatrixMode(GL_MODELVIEW);
+	
+	orthoCam->SetupCameraView();
 
-	//OffscreenRenderArea *of = new OffscreenRenderArea();
-	//of->Init(viewport[2], viewport[3]);
+	glClear(GL_DEPTH_BUFFER_BIT);
+
+	mDepth = new float[viewport[2] * viewport[3]];
+
+	//renderer->SetCamera(orthoCam);
 
 	renderer->RenderScene();
-	//sDepth = of->GetDepthFloat();
 
-	delete orthoCam;
+	glReadPixels(0, 0, viewport[2], viewport[3], GL_DEPTH_COMPONENT, GL_FLOAT, mDepth);
+
+	DEL_PTR(orthoCam);
 }
 
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Camera.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Camera.cpp	(revision 2787)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Camera.cpp	(revision 2796)
@@ -7,4 +7,6 @@
 {
 
+using namespace std;
+
 
 Camera::Camera() 
@@ -12,5 +14,11 @@
 	mWidth = 100;
 	mHeight = 100;
-	mFovy = 90.0f * M_PI / 180.0f;
+	mFovy = 60.0f * M_PI / 180.0f;
+	mIsOrtho = false;
+	
+	SetPosition(Vector3(0, 0, 0));
+
+	mPitch = mYaw = 0;
+	Precompute(Vector3(0, 1, 0));
 }
 
@@ -22,19 +30,29 @@
 	
 	mFovy = fieldOfView * M_PI / 180.0f;
-}
-
-
-void Camera::Precompute() 
-{
-	mDirection.Normalize();
-
-	/*Vector3 side = CrossProd(Vector3(0, 0, 1), mDirection);
-	mUp = -Normalize(CrossProd(side, mDirection));
-	mRight = -Normalize(CrossProd(mDirection, mUp));*/
-
-	mUp = Vector3(0, 0, 1);
-	mRight = -CrossProd(mDirection, mUp);
-	mUp = -Normalize(CrossProd(mRight, mDirection));
-}
+
+	mIsOrtho = false;
+
+	SetPosition(Vector3(0, 0, 0));
+
+	mPitch = mYaw = 0;
+	Precompute(Vector3(0, 1, 0));
+}
+
+
+void Camera::Precompute(const Vector3 &direction) 
+{
+	/*
+	Vector3 side = CrossProd(Vector3(1, 0, 0), direction);
+	Vector3 up = -Normalize(CrossProd(side, direction));
+	Vector3 right = -Normalize(CrossProd(direction, up));
+	*/
+	Vector3 up = Vector3(0, 0, 1);
+	Vector3 right = -Normalize(-CrossProd(direction, up));
+	up = -Normalize(CrossProd(right, direction));
+
+	mBaseOrientation = Matrix4x4(right, up, direction);
+	mViewOrientation = mBaseOrientation;
+}
+
 
 
@@ -42,12 +60,4 @@
 {
 	mPosition = pos;
-	Precompute();
-}
-
-
-void Camera::SetDirection(const Vector3 &dir) 
-{
-	mDirection = dir;
-	Precompute();
 }
 
@@ -56,24 +66,4 @@
 {
 	mNear = nearDist;
-}
-
-
-void Camera::LookInBox(const AxisAlignedBox3 &box)
-{
-	//mDirection = Vector3(0, 0, 1);
-	mDirection = Vector3(0, 1, 0);
-	mPosition = box.Center();
-	mPosition.z = box.Min(2) + 0.9f * box.Size(2);
-
-	Precompute();
-}
-
-
-void Camera::LookAtBox(const AxisAlignedBox3 &box)
-{
-	mDirection = Vector3(0, box.Min().y - box.Max().y, 0);
-	mPosition = Vector3(0);//box.Max() - mDirection;
-
-	Precompute();
 }
 
@@ -156,10 +146,16 @@
 void Camera::SetupCameraView()
 {
-	glLoadIdentity();
-	gluLookAt(mPosition.x, mPosition.y, mPosition.z,
-         	  mPosition.x + mDirection.x, mPosition.y + mDirection.y, mPosition.z + mDirection.z, 
-			  mUp.x, mUp.y, mUp.z);
-
-	//std::cout << "dir: " << mDirection << " pos: " << mPosition << " up: " << mUp << std::endl;
+	Matrix4x4 tview = mViewOrientation;
+
+	Vector3 pos = -mPosition;
+	pos = tview * pos;
+
+	Matrix4x4 viewOrientation = mViewOrientation;
+
+	viewOrientation.x[3][0] = pos.x;
+	viewOrientation.x[3][1] = pos.y;
+	viewOrientation.x[3][2] = pos.z;
+
+	glLoadMatrixf((float *)viewOrientation.x);
 }
 
@@ -177,10 +173,10 @@
 	const float w_far = h_far * GetAspect();
 
-	//const Vector3 view = mDirection;
-	const Vector3 view = mDirection;
+	const Vector3 view = GetDirection();
 	const Vector3 fc = mPosition + view * z_far; 
 	
-	const Vector3 up = mUp;
-	const Vector3 right = mRight;
+	const Vector3 up = GetUpVector();
+
+	const Vector3 right = GetRightVector();
 
 	Vector3 t1, t2;
@@ -194,5 +190,5 @@
 	fbr = fc - t1 + t2;
 
-	const Vector3 nc = mPosition + mDirection * z_near;
+	const Vector3 nc = mPosition + view * z_near;
 	
 	t1 = h_near * 0.5f * up;
@@ -206,4 +202,64 @@
 
 
-}
-
+void Camera::SetOrtho(bool ortho)
+{
+	mIsOrtho = true;
+}
+
+
+void Camera::Yaw(float angle)
+{
+	mYaw += angle;
+	CalculateFromPitchAndYaw();
+	/*
+	Matrix4x4 viewOrientation(mRight, mUp, mDirection);
+	Matrix4x4 rot = RotationYMatrix(angle);
+
+	viewOrientation = viewOrientation * rot;
+
+	mDirection = Vector3(viewOrientation.x[2][0], viewOrientation.x[2][1], viewOrientation.x[2][2]);
+	mRight =     Vector3(viewOrientation.x[0][0], viewOrientation.x[0][1], viewOrientation.x[0][2]);
+	mUp =        Vector3(viewOrientation.x[1][0], viewOrientation.x[1][1], viewOrientation.x[1][2]);*/
+}
+
+
+void Camera::Pitch(float angle)
+{
+	mPitch += angle;
+	CalculateFromPitchAndYaw();
+}
+
+
+void Camera::CalculateFromPitchAndYaw()
+{
+	mViewOrientation = mBaseOrientation;
+
+	Matrix4x4 roty = RotationYMatrix(mPitch);
+	Matrix4x4 rotx = RotationXMatrix(mYaw);
+
+	mViewOrientation *= roty;
+	mViewOrientation *= rotx;
+}
+
+
+Vector3 Camera::GetDirection() const
+{ 
+	return -Vector3(mViewOrientation.x[0][2], mViewOrientation.x[1][2], mViewOrientation.x[2][2]);
+}
+
+
+Vector3 Camera::GetUpVector() const 
+{ 
+	return Vector3(mViewOrientation.x[0][1], mViewOrientation.x[1][1], mViewOrientation.x[2][1]);
+}
+
+
+Vector3 Camera::GetRightVector() const 
+{ 
+	return Vector3(mViewOrientation.x[0][0], mViewOrientation.x[1][0], mViewOrientation.x[2][0]);
+		
+}
+
+
+}
+
