Index: src/Shapes/ShapeFactory.cpp
===================================================================
--- src/Shapes/ShapeFactory.cpp	(revision 8f12de70abbc748dfb3f3ce791b30c7615cf0cb8)
+++ src/Shapes/ShapeFactory.cpp	(revision 842aac61c6439ac82216b2a76ac58cea36787afe)
@@ -55,11 +55,4 @@
   for (int i=0; i<MAX_ShapeType; i++)
     nameShapeMap.insert(std::pair<std::string, ShapeType>(shapeNames[i], (ShapeType)i));
-
-  // Init state.
-  type = SphereType;
-  translation.Zero();
-  stretch = Vector(1.,1.,1.);
-  for (int i=0; i<NDIM; i++)
-    angle[i] = 0;
 }
 
@@ -90,24 +83,11 @@
 }
 
-
-void ShapeFactory::setType(ShapeType type)
-{
-  ShapeNameMap::iterator iter = shapeNameMap.find(type);
-  ASSERT(iter != shapeNameMap.end(),
-      "ShapeFactory::setType() - unknown type: "+toString(type)+".");
-  this->type = type;
-}
-
-void ShapeFactory::setStretch(const Vector &stretch)
+Shape ShapeFactory::produce(ShapeType type, const Vector &translation, const Vector &stretch, double angleX, double angleY, double angleZ) const
 {
   for (int i=0; i<NDIM; i++){
     ASSERT(stretch[i] > 0,
-      "ShapeFactory::setStretch() - non positive component.");
+        "ShapeFactory::setStretch() - non positive component.");
   }
-  this->stretch = stretch;
-}
 
-Shape ShapeFactory::produce() const
-{
   // Create the basic shape.
   Shape s = Nowhere();
@@ -130,11 +110,9 @@
   if (stretch != Vector(1., 1., 1.))
     s = ::stretch(s, stretch);
-  for (int i=0; i<NDIM; i++)
-    if (angle[i] != 0){
-      RealSpaceMatrix rotation;
-      rotation.setRotation(angle);
-      s = transform(s, rotation);
-      break;
-    }
+  if ((angleX != 0) && (angleY != 0) && (angleZ != 0)){
+    RealSpaceMatrix rotation;
+    rotation.setRotation(angleX, angleY, angleZ);
+    s = transform(s, rotation);
+  }
   if (!translation.IsZero())
     s = translate(s, translation);
Index: src/Shapes/ShapeFactory.hpp
===================================================================
--- src/Shapes/ShapeFactory.hpp	(revision 8f12de70abbc748dfb3f3ce791b30c7615cf0cb8)
+++ src/Shapes/ShapeFactory.hpp	(revision 842aac61c6439ac82216b2a76ac58cea36787afe)
@@ -30,20 +30,6 @@
   bool isValidShapeName(const std::string &name);
 
-
-  // setters/getters for the current state
-  const double* getAngle() const { return angle; }
-  void setAngle(double angleX, double angleY, double angleZ) { angle[0] = angleX; angle[1] = angleY; angle[2] = angleZ; }
-
-  Vector getStretch() const { return stretch; }
-  void setStretch(const Vector &stretch);
-
-  Vector getTranslation() const { return translation; }
-  void setTranslation(const Vector &translation) { this->translation = translation; }
-
-  ShapeType getType() const { return type; }
-  void setType(ShapeType type);
-
   // create a shape
-  Shape produce() const;
+  Shape produce(ShapeType type, const Vector &translation = Vector(0., 0., 0.), const Vector &stretch = Vector(1., 1., 1.), double angleX = 0, double angleY = 0, double angleZ = 0) const;
 
 private:
@@ -58,10 +44,4 @@
   typedef std::map<std::string,ShapeType> NameShapeMap;
   NameShapeMap nameShapeMap;
-
-  // current state
-  ShapeType type;
-  Vector translation;
-  Vector stretch;
-  double angle[NDIM];
 };
 
Index: src/Shapes/unittests/ShapeFactoryUnitTest.cpp
===================================================================
--- src/Shapes/unittests/ShapeFactoryUnitTest.cpp	(revision 8f12de70abbc748dfb3f3ce791b30c7615cf0cb8)
+++ src/Shapes/unittests/ShapeFactoryUnitTest.cpp	(revision 842aac61c6439ac82216b2a76ac58cea36787afe)
@@ -71,31 +71,18 @@
 void ShapeFactoryTest::typeTest()
 {
-  ShapeFactory::getInstance().setAngle(0., 0., 0.);
-  ShapeFactory::getInstance().setStretch(Vector(1., 1., 1.));
-  ShapeFactory::getInstance().setTranslation(Vector(0., 0., 0.));
+  CPPUNIT_ASSERT_EQUAL( ShapeFactory::getInstance().produce(NowhereType).getType(), NowhereType );
 
-  ShapeFactory::getInstance().setType(NowhereType);
-  CPPUNIT_ASSERT_EQUAL( ShapeFactory::getInstance().produce().getType(), NowhereType );
+  CPPUNIT_ASSERT_EQUAL( ShapeFactory::getInstance().produce(EverywhereType).getType(), EverywhereType );
 
-  ShapeFactory::getInstance().setType(EverywhereType);
-  CPPUNIT_ASSERT_EQUAL( ShapeFactory::getInstance().produce().getType(), EverywhereType );
+  CPPUNIT_ASSERT_EQUAL( ShapeFactory::getInstance().produce(SphereType).getType(), SphereType );
 
-  ShapeFactory::getInstance().setType(SphereType);
-  CPPUNIT_ASSERT_EQUAL( ShapeFactory::getInstance().produce().getType(), SphereType );
+  CPPUNIT_ASSERT_EQUAL( ShapeFactory::getInstance().produce(CuboidType).getType(), CuboidType );
 
-  ShapeFactory::getInstance().setType(CuboidType);
-  CPPUNIT_ASSERT_EQUAL( ShapeFactory::getInstance().produce().getType(), CuboidType );
-
-  ShapeFactory::getInstance().setType(CylinderType);
-  CPPUNIT_ASSERT_EQUAL( ShapeFactory::getInstance().produce().getType(), CylinderType );
+  CPPUNIT_ASSERT_EQUAL( ShapeFactory::getInstance().produce(CylinderType).getType(), CylinderType );
 }
 
 void ShapeFactoryTest::resizeTest()
 {
-  ShapeFactory::getInstance().setType(SphereType);
-  ShapeFactory::getInstance().setAngle(0., 0., 0.);
-  ShapeFactory::getInstance().setStretch(Vector(2., 2., 2.));
-  ShapeFactory::getInstance().setTranslation(Vector(0., 0., 0.));
-  Shape s = ShapeFactory::getInstance().produce();
+  Shape s = ShapeFactory::getInstance().produce(SphereType, Vector(0., 0., 0.), Vector(2., 2., 2.));
 
   CPPUNIT_ASSERT( s.isInside( Vector(1.5,0.,0.) ) );
@@ -109,9 +96,5 @@
 void ShapeFactoryTest::translateTest()
 {
-  ShapeFactory::getInstance().setType(SphereType);
-  ShapeFactory::getInstance().setAngle(0., 0., 0.);
-  ShapeFactory::getInstance().setStretch(Vector(1., 1., 1.));
-  ShapeFactory::getInstance().setTranslation(Vector(1., 0., 0.));
-  Shape s = ShapeFactory::getInstance().produce();
+  Shape s = ShapeFactory::getInstance().produce(SphereType, Vector(1., 0., 0.));
 
   CPPUNIT_ASSERT( s.isInside( Vector(1.5,0.,0.) ) );
@@ -128,9 +111,5 @@
 void ShapeFactoryTest::stretchTest()
 {
-  ShapeFactory::getInstance().setType(SphereType);
-  ShapeFactory::getInstance().setAngle(0., 0., 0.);
-  ShapeFactory::getInstance().setStretch(Vector(2., 1., 1.));
-  ShapeFactory::getInstance().setTranslation(Vector(0., 0., 0.));
-  Shape s = ShapeFactory::getInstance().produce();
+  Shape s = ShapeFactory::getInstance().produce(SphereType, Vector(0., 0., 0.), Vector(2., 1., 1.));
 
   CPPUNIT_ASSERT( s.isInside( Vector(1.5,0.,0.) ) );
@@ -144,9 +123,5 @@
 void ShapeFactoryTest::transformTest()
 {
-  ShapeFactory::getInstance().setType(SphereType);
-  ShapeFactory::getInstance().setAngle(45., 0., 0.);
-  ShapeFactory::getInstance().setStretch(Vector(1., 1., 1.));
-  ShapeFactory::getInstance().setTranslation(Vector(0., 0., 0.));
-  Shape s = ShapeFactory::getInstance().produce();
+  Shape s = ShapeFactory::getInstance().produce(SphereType, Vector(0., 0., 0.), Vector(1., 1., 1.), 45., 0., 0.);
 
   CPPUNIT_ASSERT( s.isInside( Vector(.5,0.,0.) ) );
@@ -160,30 +135,15 @@
 void ShapeFactoryTest::getterSetterTest()
 {
-  ShapeFactory::getInstance().setType(SphereType);
-  CPPUNIT_ASSERT_EQUAL( ShapeFactory::getInstance().getType(), SphereType );
-  ShapeFactory::getInstance().setType(CuboidType);
-  CPPUNIT_ASSERT_EQUAL( ShapeFactory::getInstance().getType(), CuboidType );
 #ifndef NDEBUG
-  CPPUNIT_ASSERT_THROW( ShapeFactory::getInstance().setType((ShapeType)-1), Assert::AssertionFailure );
+  CPPUNIT_ASSERT_THROW( ShapeFactory::getInstance().produce((ShapeType)-1), Assert::AssertionFailure );
 #endif
 
 
-  ShapeFactory::getInstance().setAngle(45., 60., 90.);
-  CPPUNIT_ASSERT_EQUAL( ShapeFactory::getInstance().getAngle()[0], 45. );
-  CPPUNIT_ASSERT_EQUAL( ShapeFactory::getInstance().getAngle()[1], 60. );
-  CPPUNIT_ASSERT_EQUAL( ShapeFactory::getInstance().getAngle()[2], 90. );
-
-
-  ShapeFactory::getInstance().setStretch(Vector(2., 3., 4.));
-  CPPUNIT_ASSERT_EQUAL( ShapeFactory::getInstance().getStretch(), Vector(2., 3., 4.) );
 #ifndef NDEBUG
-  CPPUNIT_ASSERT_THROW( ShapeFactory::getInstance().setStretch(Vector(0., 0., 0.)), Assert::AssertionFailure );
+  CPPUNIT_ASSERT_THROW( ShapeFactory::getInstance().produce(SphereType, Vector(0., 0., 0.), Vector(0., 0., 0.)), Assert::AssertionFailure );
 #endif
 #ifndef NDEBUG
-  CPPUNIT_ASSERT_THROW( ShapeFactory::getInstance().setStretch(Vector(1., 1., 0.)), Assert::AssertionFailure );
+  CPPUNIT_ASSERT_THROW( ShapeFactory::getInstance().produce(SphereType, Vector(0., 0., 0.), Vector(1., 1., 0.)), Assert::AssertionFailure );
 #endif
-
-  ShapeFactory::getInstance().setTranslation(Vector(1., 2., 3.));
-  CPPUNIT_ASSERT_EQUAL( ShapeFactory::getInstance().getTranslation(), Vector(1., 2., 3.) );
 }
 
