Moved old osgPresentation source files to osgPresentation/deprecated subdirectory.

This commit is contained in:
Robert Osfield
2013-08-18 18:10:39 +00:00
parent 28ce02915a
commit 4e3715d4bb
24 changed files with 250 additions and 250 deletions

View File

@@ -9,28 +9,28 @@ SET(LIB_NAME osgPresentation)
SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME})
SET(TARGET_H
${HEADER_PATH}/Export
${HEADER_PATH}/AnimationMaterial
${HEADER_PATH}/CompileSlideCallback
${HEADER_PATH}/Cursor
${HEADER_PATH}/PickEventHandler
${HEADER_PATH}/PropertyManager
${HEADER_PATH}/KeyEventHandler
${HEADER_PATH}/SlideEventHandler
${HEADER_PATH}/SlideShowConstructor
${HEADER_PATH}/Timeout
${HEADER_PATH}/deprecated/AnimationMaterial
${HEADER_PATH}/deprecated/CompileSlideCallback
${HEADER_PATH}/deprecated/PickEventHandler
${HEADER_PATH}/deprecated/PropertyManager
${HEADER_PATH}/deprecated/KeyEventHandler
${HEADER_PATH}/deprecated/SlideEventHandler
${HEADER_PATH}/deprecated/SlideShowConstructor
${HEADER_PATH}/deprecated/Timeout
)
# FIXME: For OS X, need flag for Framework or dylib
SET(TARGET_SRC
AnimationMaterial.cpp
CompileSlideCallback.cpp
Cursor.cpp
PickEventHandler.cpp
PropertyManager.cpp
KeyEventHandler.cpp
SlideEventHandler.cpp
SlideShowConstructor.cpp
Timeout.cpp
deprecated/AnimationMaterial.cpp
deprecated/CompileSlideCallback.cpp
deprecated/PickEventHandler.cpp
deprecated/PropertyManager.cpp
deprecated/KeyEventHandler.cpp
deprecated/SlideEventHandler.cpp
deprecated/SlideShowConstructor.cpp
deprecated/Timeout.cpp
${OPENSCENEGRAPH_VERSIONINFO_RC}
)

View File

@@ -10,7 +10,7 @@
* include LICENSE.txt for more details.
*/
#include <osgPresentation/AnimationMaterial>
#include <osgPresentation/deprecated/AnimationMaterial>
#include <osg/MatrixTransform>
#include <osg/PositionAttitudeTransform>

View File

@@ -10,7 +10,7 @@
* include LICENSE.txt for more details.
*/
#include <osgPresentation/CompileSlideCallback>
#include <osgPresentation/deprecated/CompileSlideCallback>
#include <osgUtil/GLObjectsVisitor>

View File

@@ -10,8 +10,8 @@
* include LICENSE.txt for more details.
*/
#include <osgPresentation/KeyEventHandler>
#include <osgPresentation/SlideEventHandler>
#include <osgPresentation/deprecated/KeyEventHandler>
#include <osgPresentation/deprecated/SlideEventHandler>
#include <osgViewer/Viewer>
#include <osg/Notify>

View File

@@ -10,8 +10,8 @@
* include LICENSE.txt for more details.
*/
#include <osgPresentation/PickEventHandler>
#include <osgPresentation/SlideEventHandler>
#include <osgPresentation/deprecated/PickEventHandler>
#include <osgPresentation/deprecated/SlideEventHandler>
#include <osgViewer/Viewer>
#include <osg/Notify>
@@ -77,17 +77,17 @@ bool PickEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionA
osg::ref_ptr<osgGA::GUIEventAdapter> cloned_ea = osg::clone(&ea);
const osg::BoundingBox bb(hitr->drawable->getBound());
const osg::Vec3& p(hitr->localIntersectionPoint);
float transformed_x = (p.x() - bb.xMin()) / (bb.xMax() - bb.xMin());
float transformed_y = (p.z() - bb.zMin()) / (bb.zMax() - bb.zMin());
cloned_ea->setX(ea.getXmin() + transformed_x * (ea.getXmax() - ea.getXmin()));
cloned_ea->setY(ea.getYmin() + transformed_y * (ea.getYmax() - ea.getYmin()));
cloned_ea->setMouseYOrientation(osgGA::GUIEventAdapter::Y_INCREASING_UPWARDS);
// std::cout << transformed_x << "/" << transformed_x << " -> " << cloned_ea->getX() << "/" <<cloned_ea->getY() << std::endl;
// dispatch cloned event to devices
osgViewer::View::Devices& devices = viewer->getDevices();
for(osgViewer::View::Devices::iterator i = devices.begin(); i != devices.end(); ++i)
@@ -98,7 +98,7 @@ bool PickEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionA
}
}
}
else
else
{
if (ea.getEventType()==osgGA::GUIEventAdapter::PUSH)
{

View File

@@ -10,7 +10,7 @@
* include LICENSE.txt for more details.
*/
#include <osgPresentation/PropertyManager>
#include <osgPresentation/deprecated/PropertyManager>
#include <osg/io_utils>
using namespace osgPresentation;

View File

@@ -10,8 +10,9 @@
* include LICENSE.txt for more details.
*/
#include <osgPresentation/SlideEventHandler>
#include <osgPresentation/SlideShowConstructor>
#include <osgPresentation/deprecated/SlideEventHandler>
#include <osgPresentation/deprecated/SlideShowConstructor>
#include <osgPresentation/deprecated/AnimationMaterial>
#include <osg/AnimationPath>
#include <osg/Transform>
@@ -27,7 +28,6 @@
#include <osgGA/AnimationPathManipulator>
#include <osgPresentation/AnimationMaterial>
#include <iostream>

View File

@@ -10,7 +10,11 @@
* include LICENSE.txt for more details.
*/
#include <osgPresentation/SlideShowConstructor>
#include <osgPresentation/deprecated/SlideShowConstructor>
#include <osgPresentation/deprecated/AnimationMaterial>
#include <osgPresentation/deprecated/PickEventHandler>
#include <osgPresentation/deprecated/KeyEventHandler>
#include <osg/Geometry>
#include <osg/PolygonOffset>
@@ -51,10 +55,6 @@
#include <sstream>
#include <algorithm>
#include <osgPresentation/AnimationMaterial>
#include <osgPresentation/PickEventHandler>
#include <osgPresentation/KeyEventHandler>
#include <osgManipulator/TabBoxDragger>
#include <osgManipulator/TabBoxTrackballDragger>
#include <osgManipulator/TrackballDragger>

View File

@@ -11,7 +11,7 @@
* OpenSceneGraph Public License for more details.
*/
#include <osgPresentation/Timeout>
#include <osgPresentation/deprecated/Timeout>
#include <osgUtil/CullVisitor>
#include <osgGA/EventVisitor>
@@ -28,7 +28,7 @@ public:
LEAVE,
RESET
};
OperationVisitor(Operation op) : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN), _operation(op), _sleepTime(0.0) {}
void apply(osg::Node& node)
@@ -83,7 +83,7 @@ public:
double sleepTime() const { return _sleepTime; }
Operation _operation;
double _sleepTime;
double _sleepTime;
};
@@ -104,7 +104,7 @@ bool HUDSettings::getModelViewMatrix(osg::Matrix& matrix, osg::NodeVisitor* nv)
matrix.makeLookAt(osg::Vec3d(0.0,0.0,0.0),osg::Vec3d(0.0,_slideDistance,0.0),osg::Vec3d(0.0,0.0,1.0));
if (nv)
{
{
if (nv->getTraversalMask()==_leftMask)
{
matrix.postMultTranslate(osg::Vec3(_eyeOffset,0.0,0.0));
@@ -114,7 +114,7 @@ bool HUDSettings::getModelViewMatrix(osg::Matrix& matrix, osg::NodeVisitor* nv)
matrix.postMultTranslate(osg::Vec3(-_eyeOffset,0.0,0.0));
}
}
return true;
}
@@ -288,13 +288,13 @@ void Timeout::traverse(osg::NodeVisitor& nv)
}
}
}
if (needToRecordEventTime)
{
_timeOfLastEvent = nv.getFrameStamp()->getReferenceTime();
}
double timeSinceLastEvent = nv.getFrameStamp() ? nv.getFrameStamp()->getReferenceTime()-_timeOfLastEvent : 0.0;
if (timeSinceLastEvent>_idleDurationBeforeTimeoutDisplay)
@@ -369,9 +369,9 @@ void Timeout::traverse(osg::NodeVisitor& nv)
OSG_NOTICE<<"Doing timeout broadcast key event"<<_actionBroadcastKeyPos._key<<std::endl;
broadcastEvent(viewer, _actionBroadcastKeyPos);
}
}
}
else if (nv.getVisitorType()==osg::NodeVisitor::UPDATE_VISITOR)
{
@@ -381,7 +381,7 @@ void Timeout::traverse(osg::NodeVisitor& nv)
{
if (strcmp(nv.className(),"FindOperatorsVisitor")==0)
{
OSG_NOTICE<<"Timout::traverse() "<<nv.className()<<", ignoring traversal"<<std::endl;
OSG_NOTICE<<"Timout::traverse() "<<nv.className()<<", ignoring traversal"<<std::endl;
}
else
{
@@ -390,5 +390,5 @@ void Timeout::traverse(osg::NodeVisitor& nv)
}
}