Restructed the osgPresentation and present3D directories back to the structure that was present in OSG-3.2

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14759 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2015-03-04 18:36:44 +00:00
parent 26d1679248
commit 8c8b8f3305
37 changed files with 127 additions and 130 deletions

View File

@@ -1,20 +1,20 @@
SET(TARGET_SRC
deprecated/Cluster.cpp
deprecated/ExportHTML.cpp
deprecated/PointsEventHandler.cpp
deprecated/present3D.cpp
deprecated/ReadShowFile.cpp
deprecated/ShowEventHandler.cpp
deprecated/SpellChecker.cpp
Cluster.cpp
ExportHTML.cpp
PointsEventHandler.cpp
present3D.cpp
ReadShowFile.cpp
ShowEventHandler.cpp
SpellChecker.cpp
)
SET(TARGET_H
deprecated/Cluster.h
deprecated/ExportHTML.h
deprecated/PointsEventHandler.h
deprecated/ReadShowFile.h
deprecated/ShowEventHandler.h
deprecated/SpellChecker.h
Cluster.h
ExportHTML.h
PointsEventHandler.h
ReadShowFile.h
ShowEventHandler.h
SpellChecker.h
)
IF (SDL_FOUND)

View File

@@ -1,12 +1,12 @@
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
*
* This software is open source and may be redistributed and/or modified under
* This software is open source and may be redistributed and/or modified under
* the terms of the GNU General Public License (GPL) version 2.0.
* The full license is in LICENSE.txt file included with this distribution,.
*
*
* This software 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* include LICENSE.txt for more details.
*/
@@ -46,16 +46,16 @@ public:
void setSnapImageOnNextFrame(bool flag) { _snapImageOnNextFrame = flag; }
bool getSnapImageOnNextFrame() const { return _snapImageOnNextFrame; }
virtual void operator () (const osg::Camera& camera) const
{
if (!_snapImageOnNextFrame) return;
int x = static_cast<int>(camera.getViewport()->x());
int y = static_cast<int>(camera.getViewport()->y());
unsigned int width = static_cast<unsigned int>(camera.getViewport()->width());
unsigned int height = static_cast<unsigned int>(camera.getViewport()->height());
osg::ref_ptr<osg::Image> image = new osg::Image;
image->readPixels(x,y,width,height,
GL_RGB,GL_UNSIGNED_BYTE);
@@ -64,16 +64,16 @@ public:
{
osg::notify(osg::NOTICE) << "Saved screen image to `"<<_filename<<"`"<< std::endl;
}
_snapImageOnNextFrame = false;
}
protected:
std::string _filename;
mutable bool _snapImageOnNextFrame;
};
std::string ExportHTML::createFileName(const std::string& basename, unsigned int page, const std::string& ext)
@@ -102,7 +102,7 @@ bool ExportHTML::write(osgPresentation::SlideEventHandler* seh, osgViewer::Viewe
image_basename = osgDB::getNameLessExtension(filename);
image_ext = ".jpg";
}
std::cout<<"Writing slides to "<<image_basename<<"_[slidenumber]"<<image_ext<<std::endl;
osg::ref_ptr<SnapImageDrawCallback> sidc = new SnapImageDrawCallback;
@@ -169,7 +169,7 @@ bool ExportHTML::write(osgPresentation::SlideEventHandler* seh, osgViewer::Viewe
}
fout<<"</tr>"<<std::endl;
fout<<"</table>"<<std::endl;
fout<<"<img src=\""<<osgDB::getSimpleFileName(os.str())<<"\">"<<std::endl;
fout<<"<img src=\""<<osgDB::getSimpleFileName(os.str())<<"\">"<<std::endl;
fout<<"</html>"<<std::endl;
}
else

View File

@@ -13,7 +13,7 @@
#ifndef EXPORTHTML_H
#define EXPORTHTML_H 1
#include <osgPresentation/deprecated/SlideEventHandler>
#include <osgPresentation/SlideEventHandler>
#include <osgViewer/Viewer>
class ExportHTML

View File

@@ -13,7 +13,7 @@
#include "ReadShowFile.h"
#include "ShowEventHandler.h"
#include <osgPresentation/deprecated/SlideEventHandler>
#include <osgPresentation/SlideEventHandler>
#include <osg/ImageStream>
#include <osg/Shape>

View File

@@ -38,7 +38,7 @@
#include <osgGA/StateSetManipulator>
#include <osgGA/MultiTouchTrackballManipulator>
#include <osgPresentation/deprecated/SlideEventHandler>
#include <osgPresentation/SlideEventHandler>
#include <osgPresentation/Cursor>
#include "ReadShowFile.h"
@@ -149,15 +149,15 @@ public:
if (_forwardMouseEvents)
_device->sendEvent(ea);
break;
default:
_device->sendEvent(ea);
break;
}
return false;
}
bool handle(osgGA::Event* event, osg::Object* object, osg::NodeVisitor* nv)
{
if (event->asGUIEventAdapter())
@@ -203,7 +203,7 @@ public:
std::cout << "SCROLL: ";
break;
break;
default:
std::cout << ea.getEventType() << " ";
break;
@@ -211,8 +211,8 @@ public:
std::cout << ea.getX() << "/" << ea.getY() << " " << ea.isMultiTouchEvent() << std::endl;
return false;
}
bool handle(osgGA::Event* event, osg::Object* object, osg::NodeVisitor* nv)
{
if (event->asGUIEventAdapter())
@@ -414,7 +414,7 @@ int main( int argc, char **argv )
viewer.readConfiguration(configurationFile);
doSetViewer = false;
}
bool forwardMouseEvents = false;
if (arguments.read("--forwardMouseEvents"))
forwardMouseEvents = true;
@@ -498,7 +498,7 @@ int main( int argc, char **argv )
viewer.setCameraManipulator( keyswitchManipulator.get() );
}
//viewer.getEventHandlers().push_front(new DumpEventHandler());
// add the state manipulator
@@ -752,7 +752,7 @@ int main( int argc, char **argv )
osg::ref_ptr<osgDB::ReaderWriter::Options> cacheAllOption = new osgDB::ReaderWriter::Options;
if(suppress_env_tags)
cacheAllOption->setPluginStringData("suppressEnvTags", "true");
cacheAllOption->setObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_ALL);
osgDB::Registry::instance()->setOptions(cacheAllOption.get());