Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp	(revision 3361)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp	(revision 3362)
@@ -628,4 +628,5 @@
 
 	if (0) LoadPompeiiFloor();
+
 #if 1
 
@@ -642,9 +643,9 @@
 	// sibenik positions
 	VertexArray positions;
-	
+	const float factor2 = 1.6f;
 	// for buddha (lowres)
-	positions.push_back(Vector3(6.07307, 8.20723, 6.62));
-	positions.push_back(Vector3(-17.1935, 11.1687, 8.8781));
-	positions.push_back(Vector3(1.50032, 31.1943, 19.1f));
+	positions.push_back(Vector3(6.07307, 8.20723, 6.62 - factor2));
+	positions.push_back(Vector3(-17.1935, 11.1687, 8.8781 - factor2));
+	//positions.push_back(Vector3(1.50032, 31.1943, 19.1f));
 
 	// for happy buddha
@@ -655,5 +656,5 @@
 	// for dragon
 	//positions.push_back(Vector3(6.07307, 8.20723, 5.0f));
-	//positions.push_back(Vector3(0, 0, -0.8));
+	//positions.push_back(Vector3(0, 0, -0.8f));
 
 #endif
@@ -661,9 +662,11 @@
 	//const Vector3 sceneCenter(470.398f, 240.364f, 180.3);
 	Matrix4x4 transl = TranslationMatrix(positions[0]);
-	
+	//LoadModel("dragon.dem", dynamicObjects);
+
+#if 1
+
 	//LoadModel("hbuddha.dem", dynamicObjects);
 	//LoadModel("horse.dem", dynamicObjects);
-	LoadModel("happy.dem", dynamicObjects);
-	//LoadModel("dragon.dem", dynamicObjects);
+	LoadModel("happy2.dem", dynamicObjects);
 	//LoadModel("torus.dem", dynamicObjects);
 	//LoadModel("venusm.dem", dynamicObjects);
@@ -678,5 +681,5 @@
 	}
 
-	/*
+
 	const float rotAngle = M_PI / 2.0f;
 	const Matrix4x4 rotMatrix = RotationXMatrix(rotAngle);
@@ -685,7 +688,7 @@
 	// hack: second buddha
 	dynamicObjects[0]->GetTransform()->MultMatrix(rotMatrix);
-	dynamicObjects[0]->GetTransform()->MultMatrix(scaleMatrix);
-
-	dynamicObjects[1]->GetTransform()->MultMatrix(rotMatrix);
+	//dynamicObjects[0]->GetTransform()->MultMatrix(scaleMatrix);
+
+	/*dynamicObjects[1]->GetTransform()->MultMatrix(rotMatrix);
 	dynamicObjects[1]->GetTransform()->MultMatrix(scaleMatrix);
 
@@ -698,5 +701,5 @@
 
 #endif
-
+#endif
 	// hack
 	resourceManager->mUseNormalMapping = false;
@@ -732,6 +735,6 @@
 
 	// set far plane based on scene extent
-	//farDist = 10.0f * Magnitude(bvh->GetBox().Diagonal());
-	farDist = 1000.0f;
+	farDist = 10.0f * Magnitude(bvh->GetBox().Diagonal());
+	//farDist = 1000.0f;
 	camera->SetFar(farDist);
 
@@ -1180,4 +1183,10 @@
 		buddha->GetTransform()->SetMatrix(trafo);
 
+		const float rotAngle3 = M_PI / 2.0f;
+		const Matrix4x4 rotMatrix3 = RotationZMatrix(rotAngle3);
+
+		// hack: second buddha
+		buddha->GetTransform()->MultMatrix(rotMatrix3);
+
 #if TODO // drop objects on ground floor
 		for (int i = 0; i < 10; ++ i)
@@ -1194,11 +1203,11 @@
 #endif
 
-#if 1
 		/////////////////////////
 		//-- update animations
 
+
 		//const float rotAngle = M_PI * 1e-3f;
-		const float rotAngle = 0.3f * M_PI / 180.0f;
-		//const float rotAngle = 0.6f * M_PI / 180.0f;
+		//const float rotAngle = 0.3f * M_PI / 180.0f;
+		const float rotAngle = 0.6f * M_PI / 180.0f;
 
 		Matrix4x4 rotMatrix = RotationZMatrix(rotAngle);
@@ -1214,5 +1223,4 @@
 		const float moveSpeed = 1e-1f;
 		motionPath->Move(moveSpeed);
-#endif
 	}
 
@@ -1488,5 +1496,6 @@
 		}
 		
-		if (makeSnapShot) makeSnapShot = false;
+		static int dummy = 0;
+		if (makeSnapShot && (dummy ++ == 650)) makeSnapShot = false;
 
 		ShadowMap *sm = showShadowMap ? shadowMap : NULL;
@@ -2017,6 +2026,6 @@
 void RightMotionLight(int x, int y) 
 {
-	float theta = 0.2f * M_PI * (xEyeBegin - x) / 180.0f;
-	float phi = 0.2f * M_PI * (yMotionBegin - y) / 180.0f;
+	const float theta = .2f * M_PI * (xEyeBegin - x) / 180.0f;
+	const float phi   = .2f * M_PI * (yMotionBegin - y) / 180.0f;
 	
 	Vector3 lightDir = light->GetDirection();
@@ -2069,8 +2078,8 @@
 	Vector3 rVec(viewDir[0], viewDir[1], 0);
 	
-	Matrix4x4 rot = RotationZMatrix(M_PI * 0.5f);
+	Matrix4x4 rot = RotationZMatrix(M_PI * .5f);
 	rVec = rot * rVec;
 	
-	pos -= rVec * (x - horizontalMotionBegin) * mouseMotion;
+	pos    -= rVec * (x - horizontalMotionBegin) * mouseMotion;
 	pos[2] += (verticalMotionBegin - y) * mouseMotion;
 
