Removed osgGA::GUIEventHandlerVisitor and osgGA::SetSceneVistor classes/headers as

this classes weren't being actively used the distribution, effectively being noops.
This commit is contained in:
Robert Osfield
2006-10-06 09:54:45 +00:00
parent 2f5b7c2e6a
commit f95a913daa
26 changed files with 79 additions and 448 deletions

View File

@@ -12,9 +12,7 @@ CXXFILES = \
EventQueue.cpp\
GUIEventAdapter.cpp\
GUIEventHandler.cpp\
GUIEventHandlerVisitor.cpp\
KeySwitchMatrixManipulator.cpp\
SetSceneViewVisitor.cpp\
StateSetManipulator.cpp\
SimpleViewer.cpp\
TerrainManipulator.cpp\

View File

@@ -49,52 +49,3 @@ void GUIEventHandler::event(osg::NodeVisitor* nv, osg::Drawable* drawable)
}
}
void CompositeGUIEventHandler::getUsage(osg::ApplicationUsage& usage) const
{
for (ChildList::const_iterator itr=_children.begin();
itr!=_children.end();
++itr)
{
(*itr)->getUsage(usage);
}
}
bool CompositeGUIEventHandler::handle(const GUIEventAdapter& ea,GUIActionAdapter& aa, osg::Object* object, osg::NodeVisitor* nv)
{
bool result=false;
for (ChildList::iterator itr=_children.begin();
itr!=_children.end();
++itr)
{
result |= (*itr)->handle(ea, aa, object, nv);
}
return result;
}
bool CompositeGUIEventHandler::addChild(GUIEventHandler *child)
{
if (child && !containsNode(child))
{
// note ref_ptr<> automatically handles incrementing child's reference count.
_children.push_back(child);
return true;
}
else return false;
}
bool CompositeGUIEventHandler::removeChild(GUIEventHandler *child)
{
ChildList::iterator itr = findChild(child);
if (itr!=_children.end())
{
// note ref_ptr<> automatically handles decrementing child's reference count.
_children.erase(itr);
return true;
}
else return false;
}

View File

@@ -1,9 +0,0 @@
#include <osgGA/GUIEventHandlerVisitor>
#include <osgGA/GUIEventHandler>
void osgGA::GUIEventHandlerVisitor::visit(osgGA::CompositeGUIEventHandler& cgeh)
{
for(unsigned int i=0; i<cgeh.getNumChildren(); i++){
cgeh.getChild(i)->accept(*this);
}
}

View File

@@ -1,16 +0,0 @@
#include <osgGA/SetSceneViewVisitor>
#include <osgGA/StateSetManipulator>
#include <osgGA/MatrixManipulator>
void osgGA::SetSceneViewVisitor::visit(osgGA::MatrixManipulator& cm)
{
cm.setNode(_sceneView->getSceneData());
cm.setByInverseMatrix(_sceneView->getViewMatrix());
cm.init(*getGUIEventAdapter(),*getGUIActionAdapter());
cm.home(*getGUIEventAdapter(),*getGUIActionAdapter());
}
void osgGA::SetSceneViewVisitor::visit(osgGA::StateSetManipulator& ssm)
{
ssm.setStateSet(_sceneView->getGlobalStateSet());
}

View File

@@ -113,10 +113,6 @@ void StateSetManipulator::getUsage(osg::ApplicationUsage& usage) const
usage.addKeyboardMouseBinding("w","Toggle polygon fill mode between fill, line (wire frame) and points");
}
void StateSetManipulator::accept(GUIEventHandlerVisitor& gehv)
{
gehv.visit(*this);
}
void StateSetManipulator::setBackfaceEnabled(bool newbackface)
{

View File

@@ -1258,10 +1258,12 @@ bool ViewerEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActio
}
#ifdef COMPILE_COMPOSITE_EVENTHANDLER
void ViewerEventHandler::accept(osgGA::GUIEventHandlerVisitor& gehv)
{
gehv.visit(*this);
}
#endif
void ViewerEventHandler::getUsage(osg::ApplicationUsage& usage) const
{

View File

@@ -217,7 +217,6 @@ BEGIN_OBJECT_REFLECTOR(osg::Drawable::DrawCallback)
I_Method0(const char *, className);
I_Method2(void, drawImplementation, IN, osg::State &, x, IN, const osg::Drawable *, x);
I_Method2(void, drawImplementation, IN, osg::RenderInfo &, renderInfo, IN, const osg::Drawable *, drawable);
I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, x, 0);
END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osg::Drawable::EventCallback)

View File

@@ -15,7 +15,6 @@
#include <osg/NodeCallback>
#include <osg/NodeVisitor>
#include <osg/Object>
#include <osg/State>
// Must undefine IN and OUT macros defined in Windows headers
#ifdef IN
@@ -40,7 +39,6 @@ BEGIN_OBJECT_REFLECTOR(osg::NodeCallback)
I_Method0(const osg::NodeCallback *, getNestedCallback);
I_Method1(void, addNestedCallback, IN, osg::NodeCallback *, nc);
I_Method1(void, removeNestedCallback, IN, osg::NodeCallback *, nc);
I_MethodWithDefaults1(void, releaseGLObjects, IN, osg::State *, x, 0);
I_Property(osg::NodeCallback *, NestedCallback);
I_PublicMemberProperty(osg::ref_ptr< osg::NodeCallback >, _nestedCallback);
END_REFLECTOR

View File

@@ -10,11 +10,10 @@ CXXFILES =\
GUIActionAdapter.cpp\
GUIEventAdapter.cpp\
GUIEventHandler.cpp\
GUIEventHandlerVisitor.cpp\
GraphicsWindow.cpp\
KeySwitchMatrixManipulator.cpp\
MatrixManipulator.cpp\
NodeTrackerManipulator.cpp\
SetSceneViewVisitor.cpp\
SimpleViewer.cpp\
StateSetManipulator.cpp\
TerrainManipulator.cpp\

View File

@@ -19,7 +19,6 @@
#include <osgGA/GUIActionAdapter>
#include <osgGA/GUIEventAdapter>
#include <osgGA/GUIEventHandler>
#include <osgGA/GUIEventHandlerVisitor>
// Must undefine IN and OUT macros defined in Windows headers
#ifdef IN
@@ -29,28 +28,6 @@
#undef OUT
#endif
TYPE_NAME_ALIAS(std::vector< osg::ref_ptr< osgGA::GUIEventHandler > >, osgGA::CompositeGUIEventHandler::ChildList);
BEGIN_OBJECT_REFLECTOR(osgGA::CompositeGUIEventHandler)
I_BaseType(osgGA::GUIEventHandler);
I_Constructor0();
I_Method0(const char *, className);
I_Method0(const osgGA::CompositeGUIEventHandler *, getComposite);
I_Method0(osgGA::CompositeGUIEventHandler *, getComposite);
I_Method4(bool, handle, IN, const osgGA::GUIEventAdapter &, ea, IN, osgGA::GUIActionAdapter &, aa, IN, osg::Object *, object, IN, osg::NodeVisitor *, nv);
I_Method1(void, accept, IN, osgGA::GUIEventHandlerVisitor &, v);
I_Method1(void, getUsage, IN, osg::ApplicationUsage &, usage);
I_Method1(bool, addChild, IN, osgGA::GUIEventHandler *, geh);
I_Method1(bool, removeChild, IN, osgGA::GUIEventHandler *, geh);
I_Method0(unsigned int, getNumChildren);
I_Method1(osgGA::GUIEventHandler *, getChild, IN, unsigned int, i);
I_Method1(const osgGA::GUIEventHandler *, getChild, IN, unsigned int, i);
I_Method1(bool, containsNode, IN, const osgGA::GUIEventHandler *, node);
I_Method1(osgGA::CompositeGUIEventHandler::ChildList::iterator, findChild, IN, const osgGA::GUIEventHandler *, node);
I_ArrayProperty_GA(osgGA::GUIEventHandler *, Child, Children, unsigned int, bool);
I_ReadOnlyProperty(osgGA::CompositeGUIEventHandler *, Composite);
END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osgGA::GUIEventHandler)
I_BaseType(osg::NodeCallback);
I_BaseType(osg::Drawable::EventCallback);
@@ -62,25 +39,13 @@ BEGIN_OBJECT_REFLECTOR(osgGA::GUIEventHandler)
I_Method0(const char *, libraryName);
I_Method0(const char *, className);
I_Method2(void, event, IN, osg::NodeVisitor *, nv, IN, osg::Drawable *, drawable);
I_Method0(const osgGA::CompositeGUIEventHandler *, getComposite);
I_Method0(osgGA::CompositeGUIEventHandler *, getComposite);
I_Method4(bool, handle, IN, const osgGA::GUIEventAdapter &, ea, IN, osgGA::GUIActionAdapter &, aa, IN, osg::Object *, x, IN, osg::NodeVisitor *, x);
I_Method2(bool, handle, IN, const osgGA::GUIEventAdapter &, x, IN, osgGA::GUIActionAdapter &, x);
I_Method1(void, accept, IN, osgGA::GUIEventHandlerVisitor &, x);
I_Method1(void, getUsage, IN, osg::ApplicationUsage &, x);
I_ReadOnlyProperty(osgGA::CompositeGUIEventHandler *, Composite);
END_REFLECTOR
BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osgGA::GUIEventHandler >)
BEGIN_VALUE_REFLECTOR(osgGA::GUIEventHandlerVisitor)
I_Constructor0();
I_Constructor1(IN, osgGA::GUIEventHandler *, ptr);
I_Constructor1(IN, const osg::ref_ptr< osgGA::GUIEventHandler > &, rp);
I_Method0(osgGA::GUIEventHandler *, get);
I_Method0(bool, valid);
I_Method0(osgGA::GUIEventHandler *, release);
I_Method1(void, swap, IN, osg::ref_ptr< osgGA::GUIEventHandler > &, rp);
I_ReadOnlyProperty(osgGA::GUIEventHandler *, );
I_Method1(void, visit, IN, osgGA::GUIEventHandler &, x);
END_REFLECTOR
STD_VECTOR_REFLECTOR(std::vector< osg::ref_ptr< osgGA::GUIEventHandler > >);

View File

@@ -1,38 +0,0 @@
// ***************************************************************************
//
// Generated automatically by genwrapper.
// Please DO NOT EDIT this file!
//
// ***************************************************************************
#include <osgIntrospection/ReflectionMacros>
#include <osgIntrospection/TypedMethodInfo>
#include <osgIntrospection/StaticMethodInfo>
#include <osgIntrospection/Attributes>
#include <osgGA/GUIActionAdapter>
#include <osgGA/GUIEventAdapter>
#include <osgGA/GUIEventHandler>
#include <osgGA/GUIEventHandlerVisitor>
#include <osgGA/MatrixManipulator>
#include <osgGA/StateSetManipulator>
// Must undefine IN and OUT macros defined in Windows headers
#ifdef IN
#undef IN
#endif
#ifdef OUT
#undef OUT
#endif
BEGIN_OBJECT_REFLECTOR(osgGA::GUIEventHandlerVisitor)
I_Method1(void, visit, IN, osgGA::GUIEventHandler &, x);
I_Method1(void, visit, IN, osgGA::CompositeGUIEventHandler &, x);
I_Method1(void, visit, IN, osgGA::MatrixManipulator &, x);
I_Method1(void, visit, IN, osgGA::StateSetManipulator &, x);
I_Method0(const osgGA::GUIEventAdapter *, getGUIEventAdapter);
I_Method0(osgGA::GUIActionAdapter *, getGUIActionAdapter);
I_ReadOnlyProperty(osgGA::GUIActionAdapter *, GUIActionAdapter);
I_ReadOnlyProperty(const osgGA::GUIEventAdapter *, GUIEventAdapter);
END_REFLECTOR

View File

@@ -0,0 +1,44 @@
// ***************************************************************************
//
// Generated automatically by genwrapper.
// Please DO NOT EDIT this file!
//
// ***************************************************************************
#include <osgIntrospection/ReflectionMacros>
#include <osgIntrospection/TypedMethodInfo>
#include <osgIntrospection/StaticMethodInfo>
#include <osgIntrospection/Attributes>
#include <osg/GraphicsContext>
#include <osgGA/EventQueue>
#include <osgGA/GraphicsWindow>
// Must undefine IN and OUT macros defined in Windows headers
#ifdef IN
#undef IN
#endif
#ifdef OUT
#undef OUT
#endif
BEGIN_OBJECT_REFLECTOR(osgGA::GraphicsWindow)
I_BaseType(osg::GraphicsContext);
I_BaseType(osgGA::GUIActionAdapter);
I_Constructor0();
I_Method1(void, setEventQueue, IN, osgGA::EventQueue *, eventQueue);
I_Method0(osgGA::EventQueue *, getEventQueue);
I_Method0(const osgGA::EventQueue *, getEventQueue);
I_Method0(bool, realizeImplementation);
I_Method0(bool, isRealizedImplementation);
I_Method0(void, closeImplementation);
I_Method0(void, makeCurrentImplementation);
I_Method1(void, makeContextCurrentImplementation, IN, osg::GraphicsContext *, x);
I_Method1(void, bindPBufferToTextureImplementation, IN, GLenum, x);
I_Method0(void, swapBuffersImplementation);
I_Method0(void, requestRedraw);
I_MethodWithDefaults1(void, requestContinuousUpdate, IN, bool, x, true);
I_Method2(void, requestWarpPointer, IN, float, x, IN, float, x);
I_Property(osgGA::EventQueue *, EventQueue);
END_REFLECTOR

View File

@@ -16,7 +16,6 @@
#include <osg/Vec3d>
#include <osgGA/GUIActionAdapter>
#include <osgGA/GUIEventAdapter>
#include <osgGA/GUIEventHandlerVisitor>
#include <osgGA/MatrixManipulator>
#include <osgUtil/SceneView>
@@ -60,7 +59,6 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgGA::MatrixManipulator)
I_Method1(void, home, IN, double, x);
I_Method2(void, init, IN, const osgGA::GUIEventAdapter &, x, IN, osgGA::GUIActionAdapter &, x);
I_Method2(bool, handle, IN, const osgGA::GUIEventAdapter &, ea, IN, osgGA::GUIActionAdapter &, us);
I_Method1(void, accept, IN, osgGA::GUIEventHandlerVisitor &, v);
I_Property(bool, AutoComputeHomePosition);
I_WriteOnlyProperty(const osg::Matrixd &, ByInverseMatrix);
I_WriteOnlyProperty(const osg::Matrixd &, ByMatrix);

View File

@@ -1,34 +0,0 @@
// ***************************************************************************
//
// Generated automatically by genwrapper.
// Please DO NOT EDIT this file!
//
// ***************************************************************************
#include <osgIntrospection/ReflectionMacros>
#include <osgIntrospection/TypedMethodInfo>
#include <osgIntrospection/StaticMethodInfo>
#include <osgIntrospection/Attributes>
#include <osgGA/GUIActionAdapter>
#include <osgGA/GUIEventAdapter>
#include <osgGA/MatrixManipulator>
#include <osgGA/SetSceneViewVisitor>
#include <osgGA/StateSetManipulator>
#include <osgUtil/SceneView>
// Must undefine IN and OUT macros defined in Windows headers
#ifdef IN
#undef IN
#endif
#ifdef OUT
#undef OUT
#endif
BEGIN_OBJECT_REFLECTOR(osgGA::SetSceneViewVisitor)
I_BaseType(osgGA::GUIEventHandlerVisitor);
I_Constructor3(IN, osgGA::GUIEventAdapter *, in, IN, osgGA::GUIActionAdapter *, out, IN, osgUtil::SceneView *, sv);
I_Method1(void, visit, IN, osgGA::MatrixManipulator &, cm);
I_Method1(void, visit, IN, osgGA::StateSetManipulator &, cm);
END_REFLECTOR

View File

@@ -13,7 +13,6 @@
#include <osg/CameraNode>
#include <osg/Node>
#include <osgDB/DatabasePager>
#include <osgGA/EventQueue>
#include <osgGA/GUIEventHandler>
#include <osgGA/MatrixManipulator>
#include <osgGA/SimpleViewer>
@@ -30,8 +29,7 @@
TYPE_NAME_ALIAS(std::list< osg::ref_ptr< osgGA::GUIEventHandler > >, osgGA::SimpleViewer::EventHandlers);
BEGIN_OBJECT_REFLECTOR(osgGA::SimpleViewer)
I_BaseType(osgGA::GUIActionAdapter);
I_BaseType(osg::Referenced);
I_VirtualBaseType(osgGA::GraphicsWindow);
I_Constructor0();
I_Method1(void, setSceneData, IN, osg::Node *, node);
I_Method0(osg::Node *, getSceneData);
@@ -44,8 +42,6 @@ BEGIN_OBJECT_REFLECTOR(osgGA::SimpleViewer)
I_Method1(void, addEventHandler, IN, osgGA::GUIEventHandler *, eventHandler);
I_Method0(osgGA::SimpleViewer::EventHandlers &, getEventHandlers);
I_Method0(const osgGA::SimpleViewer::EventHandlers &, getEventHandlers);
I_Method0(osgGA::EventQueue *, getEventQueue);
I_Method0(const osgGA::EventQueue *, getEventQueue);
I_Method1(void, setDatabasePager, IN, osgDB::DatabasePager *, dp);
I_Method0(osgDB::DatabasePager *, getDatabasePager);
I_Method0(const osgDB::DatabasePager *, getDatabasePager);
@@ -57,9 +53,6 @@ BEGIN_OBJECT_REFLECTOR(osgGA::SimpleViewer)
I_Method0(void, frameDrawTraversal);
I_Method0(void, releaseAllGLObjects);
I_Method0(void, cleanup);
I_Method0(void, requestRedraw);
I_MethodWithDefaults1(void, requestContinuousUpdate, IN, bool, x, true);
I_Method2(void, requestWarpPointer, IN, float, x, IN, float, x);
I_Method0(osgUtil::SceneView *, getSceneView);
I_Method0(const osgUtil::SceneView *, getSceneView);
I_Method0(void, init);
@@ -67,10 +60,20 @@ BEGIN_OBJECT_REFLECTOR(osgGA::SimpleViewer)
I_Property(osgGA::MatrixManipulator *, CameraManipulator);
I_Property(osgDB::DatabasePager *, DatabasePager);
I_ReadOnlyProperty(osgGA::SimpleViewer::EventHandlers &, EventHandlers);
I_ReadOnlyProperty(osgGA::EventQueue *, EventQueue);
I_Property(osg::Node *, SceneData);
I_ReadOnlyProperty(osgUtil::SceneView *, SceneView);
END_REFLECTOR
BEGIN_VALUE_REFLECTOR(osg::ref_ptr< osgGA::GUIEventHandler >)
I_Constructor0();
I_Constructor1(IN, osgGA::GUIEventHandler *, ptr);
I_Constructor1(IN, const osg::ref_ptr< osgGA::GUIEventHandler > &, rp);
I_Method0(osgGA::GUIEventHandler *, get);
I_Method0(bool, valid);
I_Method0(osgGA::GUIEventHandler *, release);
I_Method1(void, swap, IN, osg::ref_ptr< osgGA::GUIEventHandler > &, rp);
I_ReadOnlyProperty(osgGA::GUIEventHandler *, );
END_REFLECTOR
STD_LIST_REFLECTOR(std::list< osg::ref_ptr< osgGA::GUIEventHandler > >);

View File

@@ -15,7 +15,6 @@
#include <osg/StateSet>
#include <osgGA/GUIActionAdapter>
#include <osgGA/GUIEventAdapter>
#include <osgGA/GUIEventHandlerVisitor>
#include <osgGA/StateSetManipulator>
// Must undefine IN and OUT macros defined in Windows headers
@@ -34,7 +33,6 @@ BEGIN_OBJECT_REFLECTOR(osgGA::StateSetManipulator)
I_Method0(osg::StateSet *, getStateSet);
I_Method0(const osg::StateSet *, getStateSet);
I_Method2(bool, handle, IN, const osgGA::GUIEventAdapter &, ea, IN, osgGA::GUIActionAdapter &, us);
I_Method1(void, accept, IN, osgGA::GUIEventHandlerVisitor &, x);
I_Method1(void, getUsage, IN, osg::ApplicationUsage &, usage);
I_Method1(void, setMaximumNumOfTextureUnits, IN, unsigned int, i);
I_Method0(unsigned int, getMaximumNumOfTextureUnits);

View File

@@ -14,7 +14,6 @@
#include <osg/State>
#include <osgGA/GUIActionAdapter>
#include <osgGA/GUIEventAdapter>
#include <osgGA/GUIEventHandlerVisitor>
#include <osgProducer/OsgCameraGroup>
#include <osgProducer/ViewerEventHandler>
@@ -37,7 +36,6 @@ BEGIN_OBJECT_REFLECTOR(osgProducer::ViewerEventHandler)
I_BaseType(osgGA::GUIEventHandler);
I_Constructor1(IN, osgProducer::OsgCameraGroup *, cg);
I_Method2(bool, handle, IN, const osgGA::GUIEventAdapter &, ea, IN, osgGA::GUIActionAdapter &, aa);
I_Method1(void, accept, IN, osgGA::GUIEventHandlerVisitor &, gehv);
I_Method1(void, getUsage, IN, osg::ApplicationUsage &, usage);
I_Method0(osgProducer::OsgCameraGroup *, getOsgCameraGroup);
I_Method0(const osgProducer::OsgCameraGroup *, getOsgCameraGroup);