Index: trunk/VUT/OcclusionCullingSceneManager/include/OgreSolidBoundingBox.h
===================================================================
--- trunk/VUT/OcclusionCullingSceneManager/include/OgreSolidBoundingBox.h	(revision 25)
+++ trunk/VUT/OcclusionCullingSceneManager/include/OgreSolidBoundingBox.h	(revision 25)
@@ -0,0 +1,34 @@
+#ifndef _SolidBoundingBox_H__
+#define _SolidBoundingBox_H__
+
+#include "OgrePrerequisites.h"
+
+#include "OgreWireBoundingBox.h"
+
+namespace Ogre {
+
+    /** Allows the rendering of a solid bounding box.
+        @remarks
+            This class builds a wireframe renderable from a given aabb. A pointer to this class can be
+			added to a render queue to display the bounding box of an object.
+    */
+	class SolidBoundingBox : public WireBoundingBox
+	{
+    protected:
+       
+        /** Builds the wireframe line list.
+        */
+		void setupBoundingBoxVertices(const AxisAlignedBox& aab);
+		
+	public:
+		
+		bool mIsFirstHalf;
+		void setupBoundingBox(const AxisAlignedBox& aabb);
+		SolidBoundingBox();
+	};
+
+}// namespace
+
+#endif
+
+
Index: trunk/VUT/OcclusionCullingSceneManager/src/OgreSolidBoundingBox.cpp
===================================================================
--- trunk/VUT/OcclusionCullingSceneManager/src/OgreSolidBoundingBox.cpp	(revision 25)
+++ trunk/VUT/OcclusionCullingSceneManager/src/OgreSolidBoundingBox.cpp	(revision 25)
@@ -0,0 +1,92 @@
+#include "OgreStableHeaders.h"
+#include "OgreSolidBoundingBox.h"
+
+#include "OgreSimpleRenderable.h"
+#include "OgreHardwareBufferManager.h"
+#include "OgreCamera.h"
+//#include <windows.h>
+
+namespace Ogre {
+    #define POSITION_BINDING 0
+
+	SolidBoundingBox::SolidBoundingBox(): mIsFirstHalf(true)
+    {
+		mRenderOp.vertexData->vertexCount = 8;
+        mRenderOp.operationType = RenderOperation::OT_TRIANGLE_FAN; 
+	}
+	//-----------------------------------------------------------------------
+	void SolidBoundingBox::setupBoundingBoxVertices(const AxisAlignedBox& aab) {
+
+		Vector3 vmax = aab.getMaximum();
+		Vector3 vmin = aab.getMinimum();
+		
+		
+		Real sqLen = std::max(vmax.squaredLength(), vmin.squaredLength());
+        mRadius = Math::Sqrt(sqLen);
+		
+		Real maxx = vmax.x;
+		Real maxy = vmax.y;
+		Real maxz = vmax.z;
+		
+		Real minx = vmin.x;
+		Real miny = vmin.y;
+		Real minz = vmin.z;
+		
+		// fill in the Vertex buffer: 12 lines with 2 endpoints each make up a box
+        HardwareVertexBufferSharedPtr vbuf =
+            mRenderOp.vertexData->vertexBufferBinding->getBuffer(POSITION_BINDING);     
+
+        float* pPos = static_cast<float*>(
+            vbuf->lock(HardwareBuffer::HBL_DISCARD));
+
+		//     5+------+7
+		//     /|     /|
+		//    / |    / |
+		//   / 1+---/--+3
+		// 2+------+6 /    y   z
+		//  | /    | /     |  /
+		//  |/     |/      |/
+		// 0+------+4      *---x
+
+		// fan 1
+		if(mIsFirstHalf)
+		{
+			*pPos++ = minx; *pPos++ = maxy; *pPos++ = maxz; //011
+			*pPos++ = minx; *pPos++ = miny; *pPos++ = maxz; //001
+			*pPos++ = maxx; *pPos++ = miny; *pPos++ = maxz; //101
+			*pPos++ = maxx; *pPos++ = maxy; *pPos++ = maxz; //111
+			
+			*pPos++ = maxx; *pPos++ = maxy; *pPos++ = minz; //110
+			*pPos++ = minx; *pPos++ = maxy; *pPos++ = minz; //010
+			*pPos++ = minx; *pPos++ = miny; *pPos++ = minz; //000
+			*pPos++ = minx; *pPos++ = miny; *pPos++ = maxz; //001
+
+		}
+		else
+		// fan 2
+		{
+			*pPos++ = maxx; *pPos++ = miny; *pPos++ = minz; //100
+			*pPos++ = minx; *pPos++ = miny; *pPos++ = minz; //000 					
+			*pPos++ = minx; *pPos++ = maxy; *pPos++ = minz; //010
+			*pPos++ = maxx; *pPos++ = maxy; *pPos++ = minz; //110
+
+			*pPos++ = maxx; *pPos++ = maxy; *pPos++ = maxz; //111
+			*pPos++ = maxx; *pPos++ = miny; *pPos++ = maxz; //101
+			*pPos++ = minx; *pPos++ = miny; *pPos++ = maxz; //001
+			*pPos++ = minx; *pPos++ = miny; *pPos++ = minz; //000
+		}
+
+        vbuf->unlock();
+	}
+
+	void SolidBoundingBox::setupBoundingBox(const AxisAlignedBox& aabb) 
+    {
+		// init the vertices to the aabb
+		SolidBoundingBox::setupBoundingBoxVertices(aabb);
+
+    	// setup the bounding box of this SimpleRenderable
+		setBoundingBox(aabb);
+
+	}
+}
+
