Ignore:
Timestamp:
Apr 17, 2012, 10:55:16 PM (12 years ago)
Author:
Torben Dannhauer
Message:

first draft of the complete distortion framework.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • experimental/distortionNG/main.cpp

    r341 r342  
    4242    extViewer viewer(arguments);
    4343
    44         osg::Image* intMap = osgDB::readImageFile("intensitymap2.png");
     44        osg::Image* intMap = osgDB::readImageFile("intensitymap.png");
    4545        if (!intMap)
    4646        {
     
    143143The intersection works and the selector highlighter is set and displayed correctly.
    144144Next steps:
    145  * 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.
    146145 * Hide the highlighter and disable the intersection/drag tracking on diabled edit mode.
    147146 * catch up dragging values and translate them in the correct coordinate frame.
     
    152151 
    153152
     153 *
     154 * Layout vom Distortion System
     155 *
     156 * Das distortion systme unterstüzt verzerrungen ,die pro kanal auhc nur eine camera verwenden.
     157 * Verzerrungen, die das Bild je Kanal aus mehreren Cams zusammensetzen um Views>=180° zu erreichen werden nicht unterstützt da hierfür das Camera Setup nötig wäre, welches nicht im distortion-Container gespeichert wird (Sonderfall, zu speziell für das Dist-Framework)
     158 *
     159 *
     160 * modul                                                                Funktionen / Description
     161 *
     162 * plugin .dist                                                 load / Save distContainers                                      loads and saves via serializers the distortion container from/to file.
     163 *
     164 *
     165 * Distortion Container                                 Beinhaltet die folgenden Distortion Details:
     166 *                                                                              - Blendmap (osgImage)
     167 *                                                                              - Mesh Dimensions (rows, columns)
     168 *                                                                              - Mesh Type (osg::PrimitiveSet::QUAD_STRIP, ...)
     169 *                                                                              - textureUnit for Scene RTT (z.B.: 0)
     170 *                                                                              - textureUnit for blendmap (z.B.: 1)
     171 *                                                                              - screenNum
     172 *                                                                              - slaveCam projectionOffset (wird mit der vom master multipliziert und auf die slave cam angewendet, meist identity)
     173 *                                                                              - slaveCam viewOffset   (wird mit der vom master multipliziert und auf die slave cam angewendet, verwendet für translation und rotation offset)
     174 *                                                                             
     175 *                                                                              need to add setter/getter as well as the serializer macros.
     176 *
     177 *
     178 * osgViewer                                                    load and apply distortion (apply via setupDistortion(...)
     179 *                                                                              setUpIntensityMapBlending(string filepath, int rrtTexUnit=1, int scenTexUnit=0): simple function providing a file path, and optionally the texUnits to use. Wil invoke the more detailed funtion for setup.
     180 *                                                                              setUpIntensityMapBlending(osg::StateSet* stateset, osg::Image* intensityMap, unsigned int screenNum, int rttSceneTextureUnit, int intensityMapTextureUnit)
     181 *
     182 *
     183 * distortionManipulator                                abgeleitet von osgGA::GUIEventHandler
     184 *                                                                              Grundfunktionen:
     185 *                                                                              - Key for Show/Hide Distortion Mesh
     186 *                                                                              - Key for Save distortion Handler  - via plugin
     187 *                                                                              - Key for toggle distortion setup:
     188 *                                                                                              DISABLED distortion modifications are forbidden (ggfs beim verlassen von DISABLED ggf. auf singleThreaded wechseln und beim aktivieren von DISABLED wieder auf das alte threadingmodel. Alternativ  die data variance des meshes beeinflussen)
     189 *                                                                                              MANUAL distortion modification via mouse Selection and drag'n'drop
     190 *                                                                                              DELEGATED via calling a foreign class or calling a subclassed function
     191 *                                                                              - Key to control if mouse drags affects mesh coordinates or texture coordinates. Default: Mesh coordinates.
     192 *                                                                              - Key to reset Distortion.
     193 *                                                                             
     194 *                                                                              Die Funktion  handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa ):
     195 *                                                                                      DISABLED: ignorieren
     196 *                                                                                      MANUAL : auf mouse selection und drags horchen und auf Distortion Anwenden. bei keys die obigen funktionen realisieren
     197 *                                                                                      DELEGATED : beim typ FRAME die Distortion zur Veränderung stellen indem der Pointer an die bearbeitende Funktion übergeben wird:
     198 *                                                                                                                              subsclassed function aufrufen bzw foreignClass->delegateDistortionSetup(distContainer& container)
     199 *                                                                                     
     200 *                                                                              Vertex Highlighter für die Manuelle Verzerrung soll nur eingeblendet werden wenn der Betriebsmodus MANUAL ist.
     201 *
     202 *                                                                             
     203 * blending Manipulator                                 abgeleitet von osgGA::GUIEventHandler
     204 *                                                                              Grundfunktionen:
     205 *
     206 *                                                                              - To Do
     207 *                                                                             
     208 *
     209 *
     210 *
    154211*/
Note: See TracChangeset for help on using the changeset viewer.