Changeset 358
- Timestamp:
- Apr 22, 2012, 9:12:22 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/distortionNG/DistortionManipulator.cpp
r357 r358 19 19 #include "DistortionManipulator.h" 20 20 21 #include<osgViewer/Viewer> 22 #include<osg/Point> 21 #include <osgViewer/Viewer> 22 #include <osg/Point> 23 #include <osg/PolygonMode> 23 24 24 25 using namespace osg; … … 183 184 { 184 185 activeVisualizationMode = INTENSITY_MAP; 185 showDistortionMesh( true);186 showIntensityMap( false);186 showDistortionMesh(false); 187 showIntensityMap(true); 187 188 break; 188 189 } … … 191 192 activeVisualizationMode = NONE; 192 193 showDistortionMesh(false); 193 showIntensityMap( true);194 showIntensityMap(false); 194 195 break; 195 196 } … … 197 198 { 198 199 activeVisualizationMode = DISTORTION_MESH; 199 showDistortionMesh( false);200 showDistortionMesh(true); 200 201 showIntensityMap(false); 201 202 break; … … 269 270 void DistortionManipulator::showDistortionMesh(bool show) 270 271 { 271 OSG_ALWAYS<<"ToDo: showDistortionMesh(bool) is now "<<show<<std::endl; 272 273 // Todo: Stateset muss das von der MeshGeode sein. 274 275 /* osg::PolygonMode* polyModeObj = dynamic_cast<osg::PolygonMode*>(_stateset->getAttribute(osg::StateAttribute::POLYGONMODE)); 272 osg::StateSet* stateset = _distortionSet->getDistortionInternals()->getChild(DistortionSet::MESH)->getOrCreateStateSet(); 273 274 // Append a PolygonMode stateset if required 275 osg::PolygonMode* polyModeObj = dynamic_cast<osg::PolygonMode*>(stateset->getAttribute(osg::StateAttribute::POLYGONMODE)); 276 276 if (!polyModeObj) 277 277 { 278 278 polyModeObj = new osg::PolygonMode; 279 _stateset->setAttribute(polyModeObj);279 stateset->setAttribute(polyModeObj); 280 280 } 281 281 282 // Set Polygonmode 282 283 if(show) 283 284 polyModeObj->setMode(osg::PolygonMode::FRONT_AND_BACK,osg::PolygonMode::LINE); 284 285 else 285 polyModeObj->setMode(osg::PolygonMode::FRONT_AND_BACK,osg::PolygonMode::FILL); */286 polyModeObj->setMode(osg::PolygonMode::FRONT_AND_BACK,osg::PolygonMode::FILL); 286 287 } 287 288
Note: See TracChangeset
for help on using the changeset viewer.