Changeset 374


Ignore:
Timestamp:
Jun 2, 2012, 11:53:38 PM (12 years ago)
Author:
Torben Dannhauer
Message:
 
Location:
experimental/distortionNG
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • experimental/distortionNG/DistortionSet.cpp

    r361 r374  
    4848}
    4949
     50void DistortionSet::setDistortionMesh(osg::Geometry*)
     51{
     52        // todo: denormalisieren und mesh dann an seine passenden Platz vom Switch packen.
     53}
     54
     55const osg::Geometry* DistortionSet::getDistortionMesh() const
     56{
     57        // Todo: Normalisieren und dann zurückgeben
     58        return NULL;
     59}
     60
    5061REGISTER_OBJECT_WRAPPER( osgViewer_DistortionSet,                  // The unique wrapper name
    5162                         new osgViewer::DistortionSet,             // The proto
     
    5667        ADD_INT_SERIALIZER( DistortionMeshRows, 1 );    //int _distortionMeshRows;
    5768        ADD_INT_SERIALIZER( DistortionMeshColumns, 1 ); //int _distortionMeshColumns;
     69        ADD_OBJECT_SERIALIZER( DistortionMesh, osg::Geometry, NULL );   // Normalisiertes Mesh
    5870
    5971    ADD_GLENUM_SERIALIZER( MeshType, GLenum, GL_QUAD_STRIP );  //osg::PrimitiveSet::Mode _MeshType
  • experimental/distortionNG/DistortionSet.h

    r361 r374  
    2424#include <osg/Switch>
    2525#include <osg/Shader>
     26#include <osg/Geometry>
    2627
    2728namespace osgViewer {
     
    7576        int getDistortionMeshColumns() const    { return _distortionMeshColumns; }
    7677
     78        void setDistortionMesh(osg::Geometry*);
     79        const osg::Geometry* getDistortionMesh() const;
     80
    7781        void setMeshType(GLenum meshType) { _meshType = meshType; }
    7882    inline GLenum getMeshType() const { return _meshType; }
     
    110114        osg::Matrixd _projectionOffset;
    111115
     116        // Interconnect-Pointer to allow access between distortion elements (osgViewer) and the distortion manipulator.
     117        // These variable are therefor not saved/restored by the serializer but populated on runtime.
    112118        bool _showIntesityMapMapOnly;   // Intensity Blending is done by a frag shader. To control it on runtime, the uniform must be bound to a central variable.
    113 
    114         // Interconnect-Pointer to allow acces between distortion elements (osgViewer) and the distortion manipulator.
    115         // These variable are therefor not saved/restored by the serializer but populated on runtime.
    116119        osg::observer_ptr<osg::Camera> _camera; // is used to pass the distortion cam from osgViewers setupDistortion() method to the manipulator.
    117120        osg::ref_ptr<osg::Switch> _distortionInternals; // definition: child #0 = mesh, #1 = highlighter, #2 HUD
  • experimental/distortionNG/extViewer.h

    r360 r374  
    4242
    4343                void setUpIntensityMapBlending(osgViewer::DistortionSet* distSet, unsigned int screenNum=0);
     44
     45                /**
     46                 * \brief This functions loads the specified blendmap and configures the viewer for blending.
     47                 * !This function does not perform any distortion it just configures the viewer for simple viewing with an intensity map.
     48                 *
     49                 * @param intensityMap  : Filename of the intensitymap to use for blending
     50                 */
    4451                void setUpIntensityMapBlending(std::string intensityMap);
    4552
  • experimental/distortionNG/main.cpp

    r372 r374  
    184184 *                                                                              - slaveCam viewOffset   (wird mit der vom master multipliziert und auf die slave cam angewendet, verwendet für translation und rotation offset)
    185185 *                                                                             
    186  *                                                                              need to add setter/getter as well as the serializer macros.
     186 *                                                      []                      Todo: get set methode für das Mesh implementieren.
    187187 *                                                                             
    188188 *                                                                              Besitz: Da osgViewer distSets ohne Manipulationsmöglichkeit konsumieren können soll, muss der Container vom Viewer verwaltet werden. der manipulator greift darauf zu, das plugin kann container entgegen nehmen oder zurückgeben, hat aber keinen direkten kontakt zur container instanz von osgViewer
Note: See TracChangeset for help on using the changeset viewer.