Index: trunk/VUT/GtpVisibility/include/QueryManager.h
===================================================================
--- trunk/VUT/GtpVisibility/include/QueryManager.h	(revision 144)
+++ trunk/VUT/GtpVisibility/include/QueryManager.h	(revision 159)
@@ -51,4 +51,5 @@
 			    InfoContainer<NodeInfo> *visibleNodes,
 			    InfoContainer<MeshInfo> *visibleGeometry,
+				InfoContainer<GtpVisibility::PatchInfo> *visiblePatches,
 			    bool relativeVisibility = false
 			    ) = 0;
@@ -62,4 +63,5 @@
 			       InfoContainer<NodeInfo> *visibleNodes,
 			       InfoContainer<MeshInfo> *visibleGeometry,
+				   InfoContainer<GtpVisibility::PatchInfo> *visiblePatches,
 			       bool relativeVisibility = false
 			       ) = 0;
Index: trunk/VUT/GtpVisibility/include/VisibilityInfo.h
===================================================================
--- trunk/VUT/GtpVisibility/include/VisibilityInfo.h	(revision 150)
+++ trunk/VUT/GtpVisibility/include/VisibilityInfo.h	(revision 159)
@@ -77,5 +77,23 @@
     Mesh *mMesh;
 };
-  
+
+/** Class storing the visibility information of a patch, i.e., parts of meshes having the same material
+	properties.
+*/
+class PatchInfo: public VisibilityInfo
+{
+public:
+	PatchInfo(Patch *Patch, const int visiblePixels, const int projectedPixels);
+
+	Patch *GetPatch() const;
+	void SetPatch(Patch *patch);
+	
+protected:
+
+    /** Pointer to the patch.
+	*/
+    Patch *mPatch;
+};
+
 //TODO: this define shall be replaced by template typedef
 #define InfoContainer std::vector
Index: trunk/VUT/GtpVisibility/include/VisibilityMesh.h
===================================================================
--- trunk/VUT/GtpVisibility/include/VisibilityMesh.h	(revision 130)
+++ trunk/VUT/GtpVisibility/include/VisibilityMesh.h	(revision 159)
@@ -7,4 +7,5 @@
 namespace GtpVisibility {
   typedef Ogre::Entity Mesh;
+  typedef Ogre::SubEntity Patch;
 }
 
Index: trunk/VUT/GtpVisibility/include/DummyQueryManager.h
===================================================================
--- trunk/VUT/GtpVisibility/include/DummyQueryManager.h	(revision 144)
+++ trunk/VUT/GtpVisibility/include/DummyQueryManager.h	(revision 159)
@@ -25,4 +25,5 @@
 			    InfoContainer<NodeInfo> *visibleNodes,
 			    InfoContainer<MeshInfo> *visibleGeometry,
+				InfoContainer<GtpVisibility::PatchInfo> *visiblePatches,
 			    bool relativeVisibility = false );
     
@@ -34,4 +35,5 @@
 			       InfoContainer<NodeInfo> *visibleNodes,
 			       InfoContainer<MeshInfo> *visibleGeometry,
+				   	InfoContainer<GtpVisibility::PatchInfo> *visiblePatches,
 			       bool relativeVisibility = false
 			       );
Index: trunk/VUT/GtpVisibility/src/VisibilityInfo.cpp
===================================================================
--- trunk/VUT/GtpVisibility/src/VisibilityInfo.cpp	(revision 153)
+++ trunk/VUT/GtpVisibility/src/VisibilityInfo.cpp	(revision 159)
@@ -88,3 +88,21 @@
 	return mMesh;
 }
+
+/****************************************************/
+/*              PatchInfo implementation             */
+/****************************************************/
+//-----------------------------------------------------------------------
+PatchInfo::PatchInfo(Patch *patch, const int visiblePixels, const int projectedPixels): 
+VisibilityInfo(visiblePixels, projectedPixels), mPatch(patch) 
+{}
+//-----------------------------------------------------------------------
+void PatchInfo::SetPatch(Patch *patch) 
+{
+	mPatch = patch;
+}
+//-----------------------------------------------------------------------	
+Patch *PatchInfo::GetPatch() const 
+{
+	return mPatch;
+}
 }// namespace GtpVisibility
Index: trunk/VUT/GtpVisibility/src/DummyQueryManager.cpp
===================================================================
--- trunk/VUT/GtpVisibility/src/DummyQueryManager.cpp	(revision 155)
+++ trunk/VUT/GtpVisibility/src/DummyQueryManager.cpp	(revision 159)
@@ -11,4 +11,5 @@
 					     InfoContainer<NodeInfo> *visibleNodes,
 					     InfoContainer<MeshInfo> *visibleGeometry,
+						 InfoContainer<GtpVisibility::PatchInfo> *visiblePatches,
 					     bool relativeVisibility)
   {
@@ -29,4 +30,5 @@
 						InfoContainer<NodeInfo> *visibleNodes,
 						InfoContainer<MeshInfo> *visibleGeometry,
+						InfoContainer<GtpVisibility::PatchInfo> *visiblePatches,
 						bool relativeVisibility)
   {
