Index: experimental/distortionNG/DistortionManipulator.cpp
===================================================================
--- experimental/distortionNG/DistortionManipulator.cpp	(revision 406)
+++ experimental/distortionNG/DistortionManipulator.cpp	(revision 407)
@@ -308,5 +308,21 @@
 		return;
 
-	OSG_ALWAYS<<"ToDo: resetDistortion()"<<std::endl;
+	
+	_distortionSet->setDistortionMeshDimensions(2, 2, true);	// Reset dimensions and coordinates/texcoords & rebuild mesh data
+	updateDistortionMesh();	// Rebuild OSG Mesh (drawable)
+	// Restore ProjectionMatrix
+	
+	// Set up projection Matrix as it is done in View::setUpViewOnSingleScreen(
+	double fovy, aspectRatio, zNear, zFar;
+	_camera->getProjectionMatrixAsPerspective(fovy, aspectRatio, zNear, zFar);
+
+	double newAspectRatio = double(_distortionSet->intensityMap()->width) / double(_distortionSet->intensityMap()->height);
+	double aspectRatioChange = newAspectRatio / aspectRatio;
+	if (aspectRatioChange != 1.0)
+	{
+		_camera->getProjectionMatrix() *= osg::Matrix::scale(1.0/aspectRatioChange,1.0,1.0);
+	}
+
+
 }
 
@@ -599,5 +615,5 @@
 										0.0	);
 		vertices->push_back( tmpVec );
-		//OSG_ALWAYS<<"Transfering mesh vertex : X:"<<tmpVec.x()<<" Y:"<<tmpVec.y()<<" Z:"<<tmpVec.z()<<std::endl;
+		OSG_ALWAYS<<"Transfering mesh vertex : X:"<<tmpVec.x()<<" Y:"<<tmpVec.y()<<" Z:"<<tmpVec.z()<<std::endl;
 
 		// Note texCoords
@@ -606,5 +622,5 @@
 
 		texCoords->push_back(tmpTexCoords);
-		//OSG_ALWAYS<<"Transfering texcoord vertex : X:"<<tmpTexCoords.x()<<" Y:"<<tmpTexCoords.y()<<std::endl;
+		OSG_ALWAYS<<"Transfering texcoord vertex : X:"<<tmpTexCoords.x()<<" Y:"<<tmpTexCoords.y()<<std::endl;
 
 		colors->push_back(osg::Vec4(1.0f,1.0f,1.0f,1.0f));
Index: experimental/distortionNG/DistortionSet.cpp
===================================================================
--- experimental/distortionNG/DistortionSet.cpp	(revision 406)
+++ experimental/distortionNG/DistortionSet.cpp	(revision 407)
@@ -27,7 +27,5 @@
 	_matrixDirty = false;
 
-	_distortionMeshRows = 2;
-	_distortionMeshColumns = 2;
-	_distortionMesh = new osg::Vec4Array();
+	setDistortionMeshDimensions(2, 2);
 	
 	_intensityMap = NULL;
@@ -52,10 +50,10 @@
 }
 
-void DistortionSet::setDistortionMeshDimensions(int rows, int cols)
+void DistortionSet::setDistortionMeshDimensions(int rows, int cols, bool enforceMeshRebuild)
 {
 	_distortionMeshRows = rows;
 	_distortionMeshColumns = cols;
 
-	if(_distortionMesh->size() != _distortionMeshRows * _distortionMeshColumns)	// If dimensions differ: discard current mesh and create a new one
+	if(!_distortionMesh.valid() || enforceMeshRebuild || _distortionMesh->size() != _distortionMeshRows * _distortionMeshColumns)	// If dimensions differ: discard current mesh and create a new one
 	{
 		_distortionMesh = new osg::Vec4Array(_distortionMeshRows * _distortionMeshColumns);
@@ -64,8 +62,8 @@
 			for(int col=0;col<_distortionMeshColumns;col++)
 			{
-				float x=col/_distortionMeshColumns;	// Vertex X
-				float y=row/_distortionMeshRows;	// Vertex Y
-				float z=col/_distortionMeshColumns;	// TexCoord X
-				float w=row/_distortionMeshRows;	// TexCoord Y
+				float x=col/(float)(_distortionMeshColumns-1);	// Vertex X
+				float y=row/(float)(_distortionMeshRows-1);	// Vertex Y
+				float z=col/(float)(_distortionMeshColumns-1);	// TexCoord X
+				float w=row/(float)(_distortionMeshRows-1);	// TexCoord Y
 
 				_distortionMesh->at(row*_distortionMeshColumns+col).set(x,y,z,w);
Index: experimental/distortionNG/DistortionSet.h
===================================================================
--- experimental/distortionNG/DistortionSet.h	(revision 406)
+++ experimental/distortionNG/DistortionSet.h	(revision 407)
@@ -59,5 +59,5 @@
 	void clearDirtyStatus()	{ _meshDirty = false; _matrixDirty = false;}
 	
-	void setDistortionMeshDimensions(int rows, int cols);
+	void setDistortionMeshDimensions(int rows, int cols, bool enforceMeshRebuild=false);
 
 	osg::Image* getIntensityMap()  { return _intensityMap; }	// Also for manipulating the intensity map
Index: experimental/distortionNG/main.cpp
===================================================================
--- experimental/distortionNG/main.cpp	(revision 406)
+++ experimental/distortionNG/main.cpp	(revision 407)
@@ -230,5 +230,5 @@
  * Laden des Containers.
  * reset distortion implementieren.
- * Anwenden der distortion auf die Meshknoten oder die texturekoordinaten
+ * Anwenden der manuellen distortion auf die Meshknoten oder die texturekoordinaten
  * 
  * 
