OpenSceneGraph/include/osgGA/StateSetManipulator
Robert Osfield 03ee77a315 Updates, from Neil Salter, to comments etc to osgGA which add better
explanations of how each of the classes operates.
2002-08-28 14:27:18 +00:00

56 lines
1.4 KiB
Plaintext

//C++ header - Open Scene Graph - Copyright (C) 1998-2002 Robert Osfield
//Distributed under the terms of the GNU Library General Public License (LGPL)
//as published by the Free Software Foundation.
#ifndef OSGGA_GEOSTATE_MANIPULATOR
#define OSGGA_GEOSTATE_MANIPULATOR 1
#include <osgGA/Export>
#include <osgGA/GUIEventAdapter>
#include <osgGA/GUIActionAdapter>
#include <osgGA/GUIEventHandler>
#include <osg/StateSet>
namespace osgGA{
/**
Experimental class, not been looked at for a while, but which will
be returned to at some point :-\
*/
class OSGGA_EXPORT StateSetManipulator : public GUIEventHandler
{
public:
StateSetManipulator();
virtual ~StateSetManipulator();
/** attach a geostate to the manipulator to be used for specifying view.*/
virtual void setStateSet(osg::StateSet*);
/** get the attached a geostate.*/
virtual osg::StateSet * getStateSet();
/** get the attached a geostate.*/
virtual const osg::StateSet * getStateSet() const;
/** Handle events, return true if handled, false otherwise.*/
virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& us);
/** Handle visitations */
virtual void accept(GUIEventHandlerVisitor&);
protected:
// Reference pointer to a geostate
osg::ref_ptr<osg::StateSet> _drawState;
bool _backface;
bool _lighting;
bool _texture;
};
}
#endif