Changeset 374
- Timestamp:
- Jun 2, 2012, 11:53:38 PM (12 years ago)
- Location:
- experimental/distortionNG
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/distortionNG/DistortionSet.cpp
r361 r374 48 48 } 49 49 50 void DistortionSet::setDistortionMesh(osg::Geometry*) 51 { 52 // todo: denormalisieren und mesh dann an seine passenden Platz vom Switch packen. 53 } 54 55 const osg::Geometry* DistortionSet::getDistortionMesh() const 56 { 57 // Todo: Normalisieren und dann zurückgeben 58 return NULL; 59 } 60 50 61 REGISTER_OBJECT_WRAPPER( osgViewer_DistortionSet, // The unique wrapper name 51 62 new osgViewer::DistortionSet, // The proto … … 56 67 ADD_INT_SERIALIZER( DistortionMeshRows, 1 ); //int _distortionMeshRows; 57 68 ADD_INT_SERIALIZER( DistortionMeshColumns, 1 ); //int _distortionMeshColumns; 69 ADD_OBJECT_SERIALIZER( DistortionMesh, osg::Geometry, NULL ); // Normalisiertes Mesh 58 70 59 71 ADD_GLENUM_SERIALIZER( MeshType, GLenum, GL_QUAD_STRIP ); //osg::PrimitiveSet::Mode _MeshType -
experimental/distortionNG/DistortionSet.h
r361 r374 24 24 #include <osg/Switch> 25 25 #include <osg/Shader> 26 #include <osg/Geometry> 26 27 27 28 namespace osgViewer { … … 75 76 int getDistortionMeshColumns() const { return _distortionMeshColumns; } 76 77 78 void setDistortionMesh(osg::Geometry*); 79 const osg::Geometry* getDistortionMesh() const; 80 77 81 void setMeshType(GLenum meshType) { _meshType = meshType; } 78 82 inline GLenum getMeshType() const { return _meshType; } … … 110 114 osg::Matrixd _projectionOffset; 111 115 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. 112 118 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.116 119 osg::observer_ptr<osg::Camera> _camera; // is used to pass the distortion cam from osgViewers setupDistortion() method to the manipulator. 117 120 osg::ref_ptr<osg::Switch> _distortionInternals; // definition: child #0 = mesh, #1 = highlighter, #2 HUD -
experimental/distortionNG/extViewer.h
r360 r374 42 42 43 43 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 */ 44 51 void setUpIntensityMapBlending(std::string intensityMap); 45 52 -
experimental/distortionNG/main.cpp
r372 r374 184 184 * - slaveCam viewOffset (wird mit der vom master multipliziert und auf die slave cam angewendet, verwendet für translation und rotation offset) 185 185 * 186 * need to add setter/getter as well as the serializer macros.186 * [] Todo: get set methode für das Mesh implementieren. 187 187 * 188 188 * 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.