Index: /code/branches/core/src/orxonox/Orxonox.cc
===================================================================
--- /code/branches/core/src/orxonox/Orxonox.cc	(revision 803)
+++ /code/branches/core/src/orxonox/Orxonox.cc	(revision 804)
@@ -76,4 +76,5 @@
 #include "GraphicsEngine.h"
 
+#include "core/ClassTreeMask.h"
 #include "objects/WorldEntity.h"
 #include "core/BaseObject.h"
@@ -717,6 +718,6 @@
         std::cout << "13\n";
 */
+/*
         std::cout << "Test 11\n";
-/*
         std::cout << "1\n";
         count = 0; for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it) { count++; }
@@ -736,5 +737,5 @@
         Test2* test11_2 = new Test2;
 */
-
+/*
         std::cout << "3\n";
         Test3* test11_3 = new Test3;
@@ -742,4 +743,5 @@
 
         std::cout << "4\n";
+*/
 /*
         std::cout << "Test 12\n";
@@ -752,4 +754,87 @@
         std::cout << "2\n";
 */
+        std::cout << "Test 13\n";
+
+        #define BoolToYesNo(bool) \
+            if (bool) \
+                std::cout << "yes "; \
+            else \
+                std::cout << "no  "
+
+        #define TestClassTreeMask(mask) \
+            std::cout << "========== ClassTreeMask-Test ===========" << std::endl; \
+            std::cout << "                 "; \
+            BoolToYesNo(mask.isIncluded(Class(BaseObject))); \
+            std::cout << std::endl; \
+            \
+            std::cout << "     "; \
+            BoolToYesNo(mask.isIncluded(Class(A1))); \
+            std::cout << "        "; \
+            BoolToYesNo(mask.isIncluded(Class(A2))); \
+            std::cout << "           "; \
+            BoolToYesNo(mask.isIncluded(Class(A3))); \
+            std::cout << std::endl; \
+            \
+            std::cout << "  "; \
+            BoolToYesNo(mask.isIncluded(Class(A1B1))); \
+            std::cout << "  "; \
+            BoolToYesNo(mask.isIncluded(Class(A1B2))); \
+            std::cout << "  "; \
+            BoolToYesNo(mask.isIncluded(Class(A2B1))); \
+            std::cout << "  "; \
+            BoolToYesNo(mask.isIncluded(Class(A2B2))); \
+            std::cout << "    "; \
+            BoolToYesNo(mask.isIncluded(Class(A3B1))); \
+            std::cout << "    "; \
+            BoolToYesNo(mask.isIncluded(Class(A3B2))); \
+            std::cout << std::endl; \
+            \
+            BoolToYesNo(mask.isIncluded(Class(A1B1C1))); \
+            BoolToYesNo(mask.isIncluded(Class(A1B1C2))); \
+            BoolToYesNo(mask.isIncluded(Class(A1B2C1))); \
+            std::cout << "  "; \
+            BoolToYesNo(mask.isIncluded(Class(A2B1C1))); \
+            std::cout << "  "; \
+            BoolToYesNo(mask.isIncluded(Class(A2B2C1))); \
+            std::cout << "  "; \
+            BoolToYesNo(mask.isIncluded(Class(A3B1C1))); \
+            BoolToYesNo(mask.isIncluded(Class(A3B1C2))); \
+            BoolToYesNo(mask.isIncluded(Class(A3B2C1))); \
+            BoolToYesNo(mask.isIncluded(Class(A3B2C2))); \
+            std::cout << std::endl; \
+            std::cout << "=========================================" << std::endl
+
+        std::cout << "1\n";
+
+        ClassTreeMask test13_1;
+//        test13_1.include(Class(BaseObject));
+        test13_1.exclude(Class(A1B1));
+        test13_1.exclude(Class(A2));
+        test13_1.include(Class(A2B2));
+        test13_1.exclude(Class(A2B2C1));
+        test13_1.exclude(Class(A3B1));
+        test13_1.include(Class(A3B1C2));
+        test13_1.exclude(Class(A3B2C1));
+        test13_1.exclude(Class(A3B2C2));
+
+        ClassTreeMask test13_2;
+        test13_2.exclude(Class(BaseObject));
+        test13_2.include(Class(A1));
+        test13_2.exclude(Class(A1B2));
+        test13_2.exclude(Class(A1B1C2));
+        test13_2.include(Class(A2));
+        test13_2.exclude(Class(A2B2));
+        test13_2.include(Class(A3B1));
+        test13_2.include(Class(A3B2));
+        test13_2.exclude(Class(A3B2C2));
+
+//        TestClassTreeMask(test13_1);
+std::cout << "1_0: " << ClassIdentifier<BaseObject>::getIdentifier() << std::endl;
+
+        TestClassTreeMask(test13_2);
+
+        std::cout << "2\n";
+
+        std::cout << "3\n";
 
 //    startRenderLoop();
Index: /code/branches/core/src/orxonox/core/ClassTreeMask.cc
===================================================================
--- /code/branches/core/src/orxonox/core/ClassTreeMask.cc	(revision 803)
+++ /code/branches/core/src/orxonox/core/ClassTreeMask.cc	(revision 804)
@@ -237,11 +237,18 @@
     bool ClassTreeMask::isIncluded(ClassTreeMaskNode* node, const Identifier* subclass) const
     {
+std::cout << "1_0: " << ClassIdentifier<BaseObject>::getIdentifier() << std::endl;
+std::cout << "1_1: " << subclass->getName() << " (" << subclass << ") / " << node->getClass()->getName() << " (" << node->getClass() << ")" << std::endl;
         // Check if the searched subclass is of the same type as the class in the current node or a derivative
         if (subclass->isA(node->getClass()))
         {
+std::cout << "1_2\n";
             // Check for the special case
             if (subclass == node->getClass())
+            {
+std::cout << "1_3\n";
                 return node->isIncluded();
-
+            }
+
+std::cout << "1_4\n";
             // Go through the list of subnodes and look for a node containing the searched subclass
             for (std::list<ClassTreeMaskNode*>::iterator it = node->subnodes_.begin(); it != node->subnodes_.end(); ++it)
@@ -249,4 +256,5 @@
                     return isIncluded(*it, subclass);
 
+std::cout << "1_5\n";
             // There is no subnode containing our class -> the rule of the current node takes in effect
             return node->isIncluded();
@@ -254,4 +262,5 @@
         else
         {
+std::cout << "1_6\n";
             // The class is not included in the mask: return false
             return false;
