Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneEntityConverter.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneEntityConverter.cpp	(revision 3259)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneEntityConverter.cpp	(revision 3270)
@@ -3,5 +3,5 @@
 #include "Geometry.h"
 #include "Shape.h"
-
+#include "Plane3.h"
 
 using namespace std;
@@ -53,3 +53,78 @@
 
 
+SceneEntity *SceneEntityConverter::ConvertSphere(float radius,
+												 float xspans,
+												 float yspans,
+												 Material *mat, 
+												 Transform3 *trafo)
+{
+	// todo
+	return NULL;
 }
+
+
+SceneEntity *SceneEntityConverter::ConvertPlane(const Plane3 &plane, 
+												float xsize, 
+												float ysize,
+												float xspans,
+												float yspans,
+												Material *mat,
+												Transform3 *trafo)
+{
+	SceneEntity *ent = new SceneEntity(trafo);
+
+	vector<Triangle3> triangles;
+
+	Vector3 x1, x2, x3, x4;
+	float xsize_h = xsize * 0.5f;
+	float ysize_h = xsize * 0.5f;
+
+	x1 = Vector3(xsize_h, ysize_h, 0);
+	x2 = Vector3(xsize_h, -ysize_h, 0);
+	x3 = Vector3(-xsize_h, -ysize_h, 0);
+	x4 = Vector3(-xsize_h, ysize_h, 0);
+	
+	triangles.push_back(Triangle3(x3, x2, x1));
+	triangles.push_back(Triangle3(x3, x1, x4));
+
+	Vector3 *vertices = new Vector3[6];
+	Vector3 *normals = new Vector3[6];
+	Texcoord2 *tex = new Texcoord2[6];
+
+	tex[0].first = 0; tex[0].second = 0;
+	tex[1].first = 1; tex[1].second = 0;
+	tex[2].first = 1; tex[2].second = 1;
+
+	tex[3].first = 0; tex[3].second = 0;
+	tex[4].first = 1; tex[4].second = 1;
+	tex[5].first = 0; tex[5].second = 1;
+
+	for (size_t i = 0; i < triangles.size(); ++ i)
+	{
+		Triangle3 tri = triangles[i];
+
+		vertices[i * 3 + 0] = tri.mVertices[0];
+		vertices[i * 3 + 1] = tri.mVertices[1];
+		vertices[i * 3 + 2] = tri.mVertices[2];
+
+		Vector3 normal = tri.GetNormal();
+
+		normals[i * 3 + 0] = normal;
+		normals[i * 3 + 1] = normal;
+		normals[i * 3 + 2] = normal;
+	}
+
+	Geometry *geom = new Geometry(vertices, normals, tex, 6, true, NULL);
+
+	Shape *shape = new Shape(geom, mat);
+	ent->AddShape(shape);
+
+	LODLevel lodLevel(0);
+
+	lodLevel.AddShape(shape);
+	ent->AddLODLevel(lodLevel);
+
+	return ent;
+}
+
+}
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Bvh.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Bvh.cpp	(revision 3269)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Bvh.cpp	(revision 3270)
@@ -761,5 +761,4 @@
 	{
 		BvhNode *node = *lit;
-
 		Vector3 v;
 
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneEntityConverter.h
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneEntityConverter.h	(revision 3216)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneEntityConverter.h	(revision 3270)
@@ -13,4 +13,6 @@
 class Camera;
 class SceneEntity;
+class Plane3;
+
 
 /** Class that converts geometric objects to scene entities
@@ -19,14 +21,22 @@
 {
 public:
-	
 	/** Creates a scene entity.
 	*/
 	SceneEntityConverter() {};
-	/** Converts this box to a scene entity
+	/** Converts a box to a scene entity
 	*/
 	SceneEntity *ConvertBox(const AxisAlignedBox3 &box, Material *mat, Transform3 *trafo);	
-	/** Converts the box to a scene entity
+	/** Converts a sphere to a scene entity
 	*/
 	SceneEntity *ConvertSphere(float radius, float xspans, float yspans, Material *mat, Transform3 *trafo);	
+	/** Converts a plane to a scene entity
+	*/
+	SceneEntity *ConvertPlane(const Plane3 &plane, 
+		                      float xsize, 
+							  float ysize,
+							  float xspans, 
+							  float yspans,
+							  Material *mat, 
+							  Transform3 *trafo);
 };
 
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp	(revision 3269)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp	(revision 3270)
@@ -587,21 +587,46 @@
 	//LoadModel("sibenik.dem", dynamicObjects);
 
-	//LoadModel("procedural_pompeii_area6_hires/pompeii.dem", dynamicObjects);
-/*
-	AxisAlignedBox3 box;
-	box.Initialize();
-
-	const Vector3 offs(.0f, 3000.0f, 180);
-	//const Vector3 sceneCenter(470.398f, 240.364f, 180.3);
+	// todo: dispose texture
+	Texture *floorTex = new Texture(model_path + "stairs.c.01.tif");
+
+	floorTex->SetBoundaryModeS(Texture::REPEAT);
+	floorTex->SetBoundaryModeT(Texture::REPEAT);
+
+	floorTex->Create();
+
+
+	Material *mymat = resourceManager->CreateMaterial();
+
+	mymat->GetTechnique(0)->SetDiffuse(RgbaColor(1, 1, 1, 1));
+	mymat->GetTechnique(0)->SetTexture(floorTex);
+
+	const Vector3 offs(1300.0f, -2500.0f, .0f);
 	Matrix4x4 moffs = TranslationMatrix(offs);
 
-	for (size_t i = 0; i < dynamicObjects.size(); ++ i)
-	{
-		dynamicObjects[i]->GetTransform()->SetMatrix(moffs);
-		box.Include(dynamicObjects[i]->GetWorldBoundingBox());
-	}
-
-	cout << "pompeii bb:\n" << box << endl;
-*/
+	Plane3 plane;
+	Transform3 *mytrafo = resourceManager->CreateTransform(moffs);
+
+	SceneEntity *myplane = 
+		SceneEntityConverter().ConvertPlane(plane, 
+		                                    500, 
+											500,
+											5, 
+											5,
+											mymat, 
+											mytrafo);
+
+	resourceManager->AddSceneEntity(myplane);
+	staticObjects.push_back(myplane);
+	/*const float side = 400.0f;
+	AxisAlignedBox3 mybox(Vector3(-side, -side, -side), Vector3(side, side, side));
+
+	Transform3 *mytrafo2 = resourceManager->CreateTransform(moffs);
+
+	SceneEntity *myboxEnt = 
+		SceneEntityConverter().ConvertBox(mybox, mymat, mytrafo2);
+
+	staticObjects.push_back(myboxEnt);
+	resourceManager->AddSceneEntity(myboxEnt);*/
+
 #if 0
 	const Vector3 sceneCenter(470.398f, 240.364f, 181.7f);
@@ -698,5 +723,4 @@
 	//-- occlusion query for sun
 
-	// todo: clean up material
 	Material *mat = resourceManager->CreateMaterial();
 
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp	(revision 3247)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp	(revision 3270)
@@ -270,4 +270,5 @@
 	string textures[] = {"flare4.tga", "lens2.jpg", "lens3.jpg", "lens4.jpg", "lens1.jpg"};
 
+	// todo: delete halo textures
 	for (int i = 0; i < 5; ++ i)
 	{
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/default.env
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/default.env	(revision 3269)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/default.env	(revision 3270)
@@ -9,5 +9,5 @@
 #filename=vienna_full_hp
 #filename=procedural_pompeii_area6_hires/pompeii_full
-filename=procedural_pompeii_area6_hires/pompeii_part
+filename=procedural_pompeii_area6_hires/pompeii_part1
 #filename=city
 useLODs=1
@@ -50,4 +50,5 @@
 # initial camera position
 #camPosition=483.398f 242.364f 186.078f
+# pompeii view point
 camPosition=1300.0f -2500.0f 10.0f
 
