Index: src/Shapes/BaseShapes.cpp
===================================================================
--- src/Shapes/BaseShapes.cpp	(revision 6a7fcbb3e0bb0faf7b7f53598e63aac469a4434d)
+++ src/Shapes/BaseShapes.cpp	(revision b92e4abd2c9d2269cf58be33cf7cd809f3e304bd)
@@ -61,6 +61,11 @@
 }
 
-std::string Sphere_impl::toString(){
+std::string Sphere_impl::toString() const{
   return "Sphere()";
+}
+
+enum ShapeType Sphere_impl::getType() const
+{
+	return SphereType;
 }
 
@@ -192,6 +197,11 @@
 }
 
-std::string Cuboid_impl::toString(){
+std::string Cuboid_impl::toString() const{
   return "Cuboid()";
+}
+
+enum ShapeType Cuboid_impl::getType() const
+{
+	return CuboidType;
 }
 
Index: src/Shapes/BaseShapes_impl.hpp
===================================================================
--- src/Shapes/BaseShapes_impl.hpp	(revision 6a7fcbb3e0bb0faf7b7f53598e63aac469a4434d)
+++ src/Shapes/BaseShapes_impl.hpp	(revision b92e4abd2c9d2269cf58be33cf7cd809f3e304bd)
@@ -20,4 +20,5 @@
 #include "Shapes/Shape_impl.hpp"
 #include "Shapes/ShapeExceptions.hpp"
+#include "Shapes/ShapeType.hpp"
 
 class Sphere_impl : public Shape_impl {
@@ -26,5 +27,6 @@
   virtual Vector getNormal(const Vector &point) throw(NotOnSurfaceException);
   virtual LineSegmentSet getLineIntersections(const Line&);
-  virtual std::string toString();
+  virtual std::string toString() const;
+  virtual enum ShapeType getType() const;
   virtual std::vector<Vector> getHomogeneousPointsOnSurface(const size_t N) const;
 };
@@ -35,5 +37,6 @@
   virtual Vector getNormal(const Vector &point) throw(NotOnSurfaceException);
   virtual LineSegmentSet getLineIntersections(const Line&);
-  virtual std::string toString();
+  virtual std::string toString() const;
+  virtual enum ShapeType getType() const;
   virtual std::vector<Vector> getHomogeneousPointsOnSurface(const size_t N) const;
 };
Index: src/Shapes/Shape.cpp
===================================================================
--- src/Shapes/Shape.cpp	(revision 6a7fcbb3e0bb0faf7b7f53598e63aac469a4434d)
+++ src/Shapes/Shape.cpp	(revision b92e4abd2c9d2269cf58be33cf7cd809f3e304bd)
@@ -26,4 +26,5 @@
 #include "Shapes/Shape_impl.hpp"
 #include "Shapes/ShapeExceptions.hpp"
+#include "Shapes/ShapeType.hpp"
 
 #include <string>
@@ -67,6 +68,14 @@
 }
 
+bool Shape::operator==(const Shape &rhs) const{
+	return (this->getType() == rhs.getType());
+}
+
 std::string Shape::toString() const{
   return impl->toString();
+}
+
+enum ShapeType Shape::getType() const{
+	return impl->getType();
 }
 
@@ -153,6 +162,10 @@
 }
 
-std::string AndShape_impl::toString() {
+std::string AndShape_impl::toString() const{
   return std::string("(") + lhs->toString() + std::string("&&") + rhs->toString() + std::string(")");
+}
+
+enum ShapeType AndShape_impl::getType() const{
+	return CombinedType;
 }
 
@@ -239,6 +252,10 @@
 }
 
-std::string OrShape_impl::toString() {
+std::string OrShape_impl::toString() const{
   return std::string("(") + lhs->toString() + std::string("||") + rhs->toString() + std::string(")");
+}
+
+enum ShapeType OrShape_impl::getType() const{
+	return CombinedType;
 }
 
@@ -289,6 +306,10 @@
 }
 
-std::string NotShape_impl::toString(){
+std::string NotShape_impl::toString() const{
   return std::string("!") + arg->toString();
+}
+
+enum ShapeType NotShape_impl::getType() const{
+	return CombinedType;
 }
 
Index: src/Shapes/Shape.hpp
===================================================================
--- src/Shapes/Shape.hpp	(revision 6a7fcbb3e0bb0faf7b7f53598e63aac469a4434d)
+++ src/Shapes/Shape.hpp	(revision b92e4abd2c9d2269cf58be33cf7cd809f3e304bd)
@@ -19,4 +19,5 @@
 
 #include "Shapes/ShapeExceptions.hpp"
+#include "Shapes/ShapeType.hpp"
 
 #include <vector>
@@ -41,4 +42,7 @@
   Vector getNormal(const Vector &point) const throw(NotOnSurfaceException);
 
+  Vector getCenter() const;
+  Vector getRadius() const;
+
   LineSegmentSet getLineIntersections(const Line&);
   std::vector<Vector> getHomogeneousPointsOnSurface(const size_t N) const;
@@ -46,5 +50,9 @@
   Shape &operator=(const Shape& rhs);
 
+  bool operator==(const Shape &rhs) const;
+
   std::string toString() const;
+  enum ShapeType getType() const;
+
 protected:
   impl_ptr getImpl() const;
Index: src/Shapes/ShapeOps.cpp
===================================================================
--- src/Shapes/ShapeOps.cpp	(revision 6a7fcbb3e0bb0faf7b7f53598e63aac469a4434d)
+++ src/Shapes/ShapeOps.cpp	(revision b92e4abd2c9d2269cf58be33cf7cd809f3e304bd)
@@ -71,4 +71,8 @@
 }
 
+enum ShapeType ShapeOpsBase_impl::getType() const {
+	return getArg()->getType();
+}
+
 std::vector<Vector> ShapeOpsBase_impl::getHomogeneousPointsOnSurface(const size_t N) const {
   return getArg()->getHomogeneousPointsOnSurface(N);;
@@ -105,5 +109,5 @@
 }
 
-std::string Resize_impl::toString() {
+std::string Resize_impl::toString() const{
   std::stringstream sstr;
   sstr << "resize(" << getArg()->toString() << "," << size << ")";
@@ -149,5 +153,5 @@
 }
 
-std::string Translate_impl::toString() {
+std::string Translate_impl::toString() const{
   std::stringstream sstr;
   sstr << "translate(" << getArg()->toString() << "," << offset << ")";
@@ -213,5 +217,5 @@
 }
 
-std::string Stretch_impl::toString() {
+std::string Stretch_impl::toString() const{
   std::stringstream sstr;
   sstr << "stretch(" << getArg()->toString() << "," << factors << ")";
@@ -259,5 +263,5 @@
 }
 
-std::string Transform_impl::toString() {
+std::string Transform_impl::toString() const{
   std::stringstream sstr;
   sstr << "transform(" << getArg()->toString() << "," << transformation << ")";
Index: src/Shapes/ShapeOps_impl.hpp
===================================================================
--- src/Shapes/ShapeOps_impl.hpp	(revision 6a7fcbb3e0bb0faf7b7f53598e63aac469a4434d)
+++ src/Shapes/ShapeOps_impl.hpp	(revision b92e4abd2c9d2269cf58be33cf7cd809f3e304bd)
@@ -17,4 +17,5 @@
 #include "Shapes/Shape_impl.hpp"
 #include "Shapes/ShapeExceptions.hpp"
+#include "Shapes/ShapeType.hpp"
 #include "LinearAlgebra/Vector.hpp"
 #include "LinearAlgebra/RealSpaceMatrix.hpp"
@@ -32,4 +33,5 @@
   virtual Vector getNormal(const Vector &point) throw (NotOnSurfaceException);
   virtual LineSegmentSet getLineIntersections(const Line&);
+  virtual enum ShapeType getType() const;
   virtual std::vector<Vector> getHomogeneousPointsOnSurface(const size_t N) const;
 protected:
@@ -51,5 +53,5 @@
   virtual Vector translateOutPos(const Vector &point);
   virtual Vector translateOutNormal(const Vector &point);
-  virtual std::string toString();
+  virtual std::string toString() const;
   virtual bool isInside(const Vector& point);
   virtual std::vector<Vector> getHomogeneousPointsOnSurface(const size_t N) const;
@@ -67,5 +69,5 @@
   virtual Vector translateOutPos(const Vector &point);
   virtual Vector translateOutNormal(const Vector &point);
-  virtual std::string toString();
+  virtual std::string toString() const;
   virtual bool isInside(const Vector& point);
   virtual std::vector<Vector> getHomogeneousPointsOnSurface(const size_t N) const;
@@ -83,5 +85,5 @@
   virtual Vector translateOutPos(const Vector &point);
   virtual Vector translateOutNormal(const Vector &point);
-  virtual std::string toString();
+  virtual std::string toString() const;
   virtual bool isInside(const Vector& point);
   virtual std::vector<Vector> getHomogeneousPointsOnSurface(const size_t N) const;
@@ -100,5 +102,5 @@
   virtual Vector translateOutPos(const Vector &point);
   virtual Vector translateOutNormal(const Vector &point);
-  virtual std::string toString();
+  virtual std::string toString() const;
   virtual bool isInside(const Vector& point);
   virtual std::vector<Vector> getHomogeneousPointsOnSurface(const size_t N) const;
Index: src/Shapes/ShapeType.hpp
===================================================================
--- src/Shapes/ShapeType.hpp	(revision b92e4abd2c9d2269cf58be33cf7cd809f3e304bd)
+++ src/Shapes/ShapeType.hpp	(revision b92e4abd2c9d2269cf58be33cf7cd809f3e304bd)
@@ -0,0 +1,27 @@
+/*
+ * ShapeType.hpp
+ *
+ *  Created on: 18.01.2012
+ *      Author: heber
+ */
+
+#ifndef SHAPETYPE_HPP_
+#define SHAPETYPE_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+//!> enumeration of the possible ShapeTypes
+enum ShapeType {
+	NowhereType,
+	EverywhereType,
+	SphereType,
+	CuboidType,
+	PolygonType,
+	CombinedType,
+	MAX_ShapeType
+};
+
+#endif /* SHAPETYPE_HPP_ */
Index: src/Shapes/Shape_impl.hpp
===================================================================
--- src/Shapes/Shape_impl.hpp	(revision 6a7fcbb3e0bb0faf7b7f53598e63aac469a4434d)
+++ src/Shapes/Shape_impl.hpp	(revision b92e4abd2c9d2269cf58be33cf7cd809f3e304bd)
@@ -19,4 +19,5 @@
 #include "Shapes/Shape.hpp"
 #include "Shapes/ShapeExceptions.hpp"
+#include "Shapes/ShapeType.hpp"
 #include "LinearAlgebra/Line.hpp"
 #include "LinearAlgebra/LineSegment.hpp"
@@ -33,5 +34,6 @@
   virtual Vector getNormal(const Vector &point) throw(NotOnSurfaceException)=0;
   virtual LineSegmentSet getLineIntersections(const Line&)=0;
-  virtual std::string toString()=0;
+  virtual std::string toString() const =0;
+  virtual enum ShapeType getType() const =0;
   virtual std::vector<Vector> getHomogeneousPointsOnSurface(const size_t N) const=0;
 };
@@ -53,6 +55,9 @@
     return res;
   }
-  virtual std::string toString(){
+  virtual std::string toString() const{
     return "Everywhere()";
+  }
+  virtual enum ShapeType getType() const {
+  	return EverywhereType;
   }
   virtual std::vector<Vector> getHomogeneousPointsOnSurface(const size_t N) const {
@@ -75,6 +80,9 @@
     return LineSegmentSet(line);
   }
-  virtual std::string toString(){
+  virtual std::string toString() const{
     return "Nowhere()";
+  }
+  virtual enum ShapeType getType() const {
+  	return NowhereType;
   }
   virtual std::vector<Vector> getHomogeneousPointsOnSurface(const size_t N) const {
@@ -92,5 +100,6 @@
   virtual Vector getNormal(const Vector &point) throw(NotOnSurfaceException);
   virtual LineSegmentSet getLineIntersections(const Line&);
-  virtual std::string toString();
+  virtual std::string toString() const;
+  virtual enum ShapeType getType() const;
   virtual std::vector<Vector> getHomogeneousPointsOnSurface(const size_t N) const;
 private:
@@ -107,5 +116,6 @@
   virtual Vector getNormal(const Vector &point) throw(NotOnSurfaceException);
   virtual LineSegmentSet getLineIntersections(const Line&);
-  virtual std::string toString();
+  virtual std::string toString() const;
+  virtual enum ShapeType getType() const;
   virtual std::vector<Vector> getHomogeneousPointsOnSurface(const size_t N) const;
 private:
@@ -122,5 +132,6 @@
   virtual Vector getNormal(const Vector &point) throw(NotOnSurfaceException);
   virtual LineSegmentSet getLineIntersections(const Line&);
-  virtual std::string toString();
+  virtual std::string toString() const;
+  virtual enum ShapeType getType() const;
   virtual std::vector<Vector> getHomogeneousPointsOnSurface(const size_t N) const;
 private:
