Index: experimental/distortionNG/distortionNG.cpp
===================================================================
--- experimental/distortionNG/distortionNG.cpp	(revision 339)
+++ experimental/distortionNG/distortionNG.cpp	(revision 340)
@@ -52,5 +52,7 @@
 		if ( viewer )
 		{
-			osg::ref_ptr<osgUtil::LineSegmentIntersector> intersector = new osgUtil::LineSegmentIntersector(osgUtil::Intersector::WINDOW, ea.getX(), ea.getY());
+			osg::notify(osg::ALWAYS)<<std::endl<<"Intersection:"<<std::endl<<"ea.getX()="<<ea.getX()<<std::endl;
+			osg::notify(osg::ALWAYS)<<"ea.getY()="<<ea.getY()<<std::endl;
+			osg::ref_ptr<osgUtil::LineSegmentIntersector> intersector = new osgUtil::LineSegmentIntersector(osgUtil::Intersector::PROJECTION, ea.getX(), ea.getY());
 			osgUtil::IntersectionVisitor iv( intersector.get() );
 			//viewer->getCamera()->accept( iv );
@@ -67,5 +69,5 @@
 	if ( ea.getEventType() == osgGA::GUIEventAdapter::DRAG  )
 	{
-        osg::notify(osg::ALWAYS)<<std::endl<<"ea.getGraphicsContext()="<<ea.getGraphicsContext()<<std::endl;
+		osg::notify(osg::ALWAYS)<<std::endl<<"Drag:"<<std::endl<<"ea.getGraphicsContext()="<<ea.getGraphicsContext()<<std::endl;
         osg::notify(osg::ALWAYS)<<"ea.getXnormalized()="<<ea.getXnormalized()<<std::endl;
         osg::notify(osg::ALWAYS)<<"ea.getYnormalized()="<<ea.getYnormalized()<<std::endl;
@@ -112,6 +114,6 @@
 				closestVertexIndex = result.indexList[i];
 			}
-		//	OSG_NOTIFY(osg::ALWAYS)<<"maxRatio="<<maxRatio<<std::endl;
-		//	OSG_NOTIFY(osg::ALWAYS)<<"closestVertexIndex="<<closestVertexIndex<<std::endl;
+			OSG_NOTIFY(osg::ALWAYS)<<"maxRatio="<<maxRatio<<std::endl;
+			OSG_NOTIFY(osg::ALWAYS)<<"closestVertexIndex="<<closestVertexIndex<<std::endl;
 		}
 		OSG_NOTIFY(osg::ALWAYS)<<"nearest vertex: X="<<(*vertices)[closestVertexIndex].x()<<" Y="<<(*vertices)[closestVertexIndex].y()<<" Z="<<(*vertices)[closestVertexIndex].z()<<std::endl;
Index: experimental/distortionNG/extViewer.cpp
===================================================================
--- experimental/distortionNG/extViewer.cpp	(revision 339)
+++ experimental/distortionNG/extViewer.cpp	(revision 340)
@@ -148,8 +148,20 @@
 		geom->setTexCoordArray(1,texcoords1);
 
-	//// Quads grid
+	// Quads grid
+	for ( unsigned int row=0; row<rows-1; row++ )	// each strip consists of two affected vertex rows, so we need only row-1 strips.
+	{
+		osg::ref_ptr<osg::DrawElementsUInt> de = new osg::DrawElementsUInt(GL_QUAD_STRIP, columns*2);	// columns*2 = number of involved vertices for this strip.
+		for ( unsigned int col=0; col<columns; col++ )
+		{
+			(*de)[col*2 + 0] = row*columns + col;
+			(*de)[col*2 + 1] = (row+1)*columns + col;
+		}
+		geom->addPrimitiveSet( de.get() );
+	}
+
+	//// Triangle grid
 	//for ( unsigned int row=0; row<rows-1; row++ )	// each strip consists of two affected vertex rows, so we need only row-1 strips.
 	//{
-	//	osg::ref_ptr<osg::DrawElementsUInt> de = new osg::DrawElementsUInt(GL_QUAD_STRIP, columns*2);	// columns*2 = number of involved vertices for this strip.
+	//	osg::ref_ptr<osg::DrawElementsUInt> de = new osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLE_STRIP, columns * 2 );	
 	//	for ( unsigned int col=0; col<columns; col++ )
 	//	{
@@ -159,16 +171,4 @@
 	//	geom->addPrimitiveSet( de.get() );
 	//}
-
-	// Triangle grid
-	for ( unsigned int row=0; row<rows-1; row++ )	// each strip consists of two affected vertex rows, so we need only row-1 strips.
-	{
-		osg::ref_ptr<osg::DrawElementsUInt> de = new osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLE_STRIP, columns * 2 );	
-		for ( unsigned int col=0; col<columns; col++ )
-		{
-			(*de)[col*2 + 0] = row*columns + col;
-			(*de)[col*2 + 1] = (row+1)*columns + col;
-		}
-		geom->addPrimitiveSet( de.get() );
-	}
 
 	return geom.release();
@@ -340,9 +340,11 @@
 		geode->getOrCreateStateSet()->setMode( GL_LIGHTING, osg::StateAttribute::OFF );
 		geode->getOrCreateStateSet()->setAttributeAndModes( new osg::PolygonOffset(1.0f, 1.0f) );
-		osg::ref_ptr<distortionHandler> selector = new distortionHandler( camera, distortionMesh );
+		osg::ref_ptr<distortionHandler> selectorHandler = new distortionHandler( camera, distortionMesh );
 		osg::ref_ptr<osg::Group> root = new osg::Group;
 		root->addChild(geode);
-		root->addChild(selector->createVertexHighlighter());
-		addEventHandler( selector.get() );
+		osg::Geode* selectorHighlighter = selectorHandler->createVertexHighlighter();
+		selectorHighlighter->setCullingActive(false);	// disable the culling for the selector, otherwise the selector is culled away on the edge.
+		root->addChild(selectorHighlighter);
+		addEventHandler( selectorHandler.get() );
 		camera->addChild(root);
 		// Avoid that the highlighter is culled away
Index: experimental/distortionNG/main.cpp
===================================================================
--- experimental/distortionNG/main.cpp	(revision 339)
+++ experimental/distortionNG/main.cpp	(revision 340)
@@ -140,12 +140,15 @@
 /*
 ToDo: 
+
+The intersection works and the selector highlighter is set and displayed correctly.
+Next steps:
+ * use a variable to control whether distortion setup is active or not. temporarily track the Ctrl Key to enably(push or disable(release) the edit mode.
+ * Hide the highlighter and disable the intersection/drag tracking on diabled edit mode.
+ * catch up dragging values and translate them in the correct coordinate frame.
+ * apply dragging values:
+ *	a) either on the texture coordinate while the grid is constant,
+ *  b) or apply them on the grid node coordinates while the texture coordinates are constant (check/compare solutions!)
  * 
- * distortionHandler::handle startet Intersections. Da jedoch das distortion Mesh keine Geometry der Scene mehr ist, gibt es keine Intersection
- *  -> es muss die intersektion umgestellt werden, um das Distortion Mesh zu intersecten.
- * Es muss geprüft werdne, ob bei dne Mausverschiebungen die texturecoordinaten verschoben, oder das Distortion Mesh verschoben wird.
-
-
-
-
+ 
 
 */
