Index: experimental/distortionNG/DistortionSet.cpp
===================================================================
--- experimental/distortionNG/DistortionSet.cpp	(revision 344)
+++ experimental/distortionNG/DistortionSet.cpp	(revision 344)
@@ -0,0 +1,52 @@
+/* -*-c++-*- osgVisual - Copyright (C) 2009-2012 Torben Dannhauer
+ *
+ * This library is based on OpenSceneGraph, open source and may be redistributed and/or modified under 
+ * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
+ * (at your option) any later version.  The full license is in LICENSE file
+ * included with this distribution, and on the openscenegraph.org website.
+ *
+ * osgVisual requires for some proprietary modules a license from the correspondig manufacturer.
+ * You have to aquire licenses for all used proprietary modules.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * OpenSceneGraph Public License for more details.
+*/
+
+#include "DistortionSet.h"
+#include <osgDB/ObjectWrapper>
+#include <osgDB/InputStream>
+#include <osgDB/OutputStream>
+
+using namespace osgViewer;
+
+DistortionSet::DistortionSet()
+{
+}
+
+DistortionSet::~DistortionSet()
+{
+}
+
+
+REGISTER_OBJECT_WRAPPER( osgViewer_DistortionSet,                  // The unique wrapper name
+                         new osgViewer::DistortionSet,             // The proto
+                         osgViewer::DistortionSet,                 // The class typename
+                         "osg::Object osgViewer::DistortionSet" )  // The inheritance relations
+{
+    // Serializers for different members
+	ADD_INT_SERIALIZER( DistortionMeshRows, 1 );	//int _distortionMeshRows;
+	ADD_INT_SERIALIZER( DistortionMeshColumns, 1 );	//int _distortionMeshColumns;
+
+	// Missing serializer macro for PrimitiveMeshType
+	//osg::PrimitiveSet::Mode _MeshType
+	
+	ADD_IMAGE_SERIALIZER( IntensityMap, osg::Image, NULL );  // _image	//osg::ref_ptr<osg::Image> _intensityMap;
+
+	ADD_UINT_SERIALIZER( TexUnitScene, 0 );	//unsigned int _texUnitScene;
+	ADD_UINT_SERIALIZER( TexUnitIntensityMap, 1 );	//unsigned int _texUnitIntensityMap;
+
+	ADD_MATRIX_SERIALIZER( ViewOffset, osg::Matrix() );	//osg::Matrix _viewOffset;
+	ADD_MATRIX_SERIALIZER( ProjectionOffset, osg::Matrix() );	//osg::Matrix _projectionOffset;
+}
Index: experimental/distortionNG/DistortionSet.h
===================================================================
--- experimental/distortionNG/DistortionSet.h	(revision 344)
+++ experimental/distortionNG/DistortionSet.h	(revision 344)
@@ -0,0 +1,84 @@
+#ifndef OSGVIEWER_DistortionSet
+#define OSGVIEWER_DistortionSet 1
+
+/* -*-c++-*- osgVisual - Copyright (C) 2009-2012 Torben Dannhauer
+ *
+ * This library is based on OpenSceneGraph, open source and may be redistributed and/or modified under 
+ * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
+ * (at your option) any later version.  The full license is in LICENSE file
+ * included with this distribution, and on the openscenegraph.org website.
+ *
+ * osgVisual requires for some proprietary modules a license from the correspondig manufacturer.
+ * You have to aquire licenses for all used proprietary modules.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * OpenSceneGraph Public License for more details.
+*/
+
+#include <osg/Object>
+#include <osg/Image>
+#include <osg/Matrixd>
+#include <osg/PrimitiveSet>
+
+namespace osgViewer {
+
+class DistortionSet : public osg::Object
+{
+public:
+	META_Object(osgViewer,DistortionSet);	// Required for serializer
+
+	DistortionSet(const osgViewer::DistortionSet& ds, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):	// Required for serializer
+		_distortionMeshRows(ds._distortionMeshRows),
+		_distortionMeshColumns(ds._distortionMeshColumns),
+		//osg::PrimitiveSet::Mode _MeshType
+		_intensityMap(ds._intensityMap),
+		_texUnitScene(ds._texUnitScene),
+		_texUnitIntensityMap(ds._texUnitIntensityMap),
+		_viewOffset(ds._viewOffset),
+		_projectionOffset(ds._projectionOffset){}
+
+	DistortionSet();
+	virtual ~DistortionSet();
+
+	void setDistortionMeshRows(int distortionMeshRows)		{ _distortionMeshRows = distortionMeshRows; }
+	int getDistortionMeshRows() const	{ return(_distortionMeshRows); }
+
+	void setDistortionMeshColumns(int distortionMeshColumns)		{ _distortionMeshColumns = distortionMeshColumns; }
+	int getDistortionMeshColumns() const	{ return(_distortionMeshColumns); }
+
+	void setIntensityMap(osg::Image* intensityMap)		{ _intensityMap = intensityMap; }
+	const osg::Image* getIntensityMap() const	{ return(_intensityMap); }
+
+	void setTexUnitScene(unsigned int texUnitScene)		{ _texUnitScene = texUnitScene; }
+	unsigned int getTexUnitScene() const	{ return(_texUnitScene); }
+
+	void setTexUnitIntensityMap(unsigned int texUnitIntensityMap)	{ _texUnitIntensityMap = texUnitIntensityMap; }
+	unsigned int getTexUnitIntensityMap() const	{ return(_texUnitIntensityMap); }
+
+	void setViewOffset(const osg::Matrixd& viewOffset)	{ _viewOffset = viewOffset; }
+	const osg::Matrixd& getViewOffset() const	{ return(_viewOffset); }
+
+	void setProjectionOffset(const osg::Matrixd& projectionOffset)		{ _projectionOffset = projectionOffset; }
+	const osg::Matrixd& getProjectionOffset() const { return(_projectionOffset); }
+
+private:
+	int _distortionMeshRows;
+	int _distortionMeshColumns;
+	//osg::PrimitiveSet::Mode _MeshType
+	
+	osg::ref_ptr<osg::Image> _intensityMap;
+	unsigned int _texUnitScene;
+	unsigned int _texUnitIntensityMap;
+
+	osg::Matrixd _viewOffset;
+	osg::Matrixd _projectionOffset;
+
+
+};
+
+}
+
+
+#endif
Index: experimental/distortionNG/distortionNG.vcproj
===================================================================
--- experimental/distortionNG/distortionNG.vcproj	(revision 343)
+++ experimental/distortionNG/distortionNG.vcproj	(revision 344)
@@ -95,4 +95,79 @@
 		</Configuration>
 		<Configuration
+			Name="Debug|x64"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="&quot;$(OSG_ROOT)\include&quot;"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="OpenThreadsd.lib osgd.lib osgDBd.lib osgUtild.lib osgGAd.lib osgViewerd.lib osgTextd.lib osgTerraind.lib opengl32.lib D:\OpenSceneGraph\3rdParty_x86_x64\x64\lib\zlibD.lib"
+				LinkIncremental="2"
+				AdditionalLibraryDirectories="&quot;$(OSG_ROOT)\lib\&quot;"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
 			Name="Release|Win32"
 			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
@@ -172,79 +247,4 @@
 		</Configuration>
 		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
-			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="3"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="&quot;$(OSG_ROOT)\include&quot;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
-				MinimalRebuild="false"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="OpenThreadsd.lib osgd.lib osgDBd.lib osgUtild.lib osgGAd.lib osgViewerd.lib osgTextd.lib osgTerraind.lib opengl32.lib D:\OpenSceneGraph\3rdParty_x86_x64\x64\lib\zlibD.lib"
-				LinkIncremental="2"
-				AdditionalLibraryDirectories="&quot;$(OSG_ROOT)\lib\&quot;"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				TargetMachine="17"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
 			Name="Release|x64"
 			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
@@ -338,4 +338,8 @@
 			</File>
 			<File
+				RelativePath=".\DistortionSet.cpp"
+				>
+			</File>
+			<File
 				RelativePath=".\extViewer.cpp"
 				>
@@ -356,4 +360,8 @@
 			</File>
 			<File
+				RelativePath=".\DistortionSet.h"
+				>
+			</File>
+			<File
 				RelativePath=".\extViewer.h"
 				>
