AGX Dynamics  2.35.0.1
agxOSG/GuiEventAdapter.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 #ifndef AGXOSG_GUIEVENTADAPTER_H
17 #define AGXOSG_GUIEVENTADAPTER_H
18 
19 #include <agx/PushDisableWarnings.h> // Disabling warnings. Include agx/PopDisableWarnings.h below!
20 #include <agxOSG/export.h>
21 #include <agxSDK/GuiEventAdapter.h>
22 #include <osgGA/GUIEventHandler>
23 #include <agx/PopDisableWarnings.h> // End of disabled warnings.
24 
26 
27 
28 namespace osgGA
29 {
30 
31  class GuiEventAdapter;
32  class GUIActionAdapter;
33 }
35 
36 namespace agxOSG
37 {
39  class AGXOSG_EXPORT GuiEventAdapter : public agxSDK::GuiEventAdapter, public osgGA::GUIEventHandler
40  {
41 
42  public:
43 
45  virtual ~GuiEventAdapter();
46 
47  protected:
48 
49  virtual bool handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& );
50  using osgGA::GUIEventHandler::handle;
51  bool handleMouse( osgGA::GUIEventAdapter::EventType eventType, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& );
52  bool handleKeyboard( osgGA::GUIEventAdapter::EventType eventType, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& );
53  bool handleMouseMove( osgGA::GUIEventAdapter::EventType eventType, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& );
54  bool handleUpdate( osgGA::GUIEventAdapter::EventType eventType, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& );
55 
56  };
57 }
58 
59 #endif
60 
#define AGXOSG_EXPORT
Class for inserting mouse and keyboard event from OSG into agxSDK::Simulation.
bool handleUpdate(osgGA::GUIEventAdapter::EventType eventType, const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &)
bool handleKeyboard(osgGA::GUIEventAdapter::EventType eventType, const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &)
GuiEventAdapter(agxSDK::Simulation *simulation)
bool handleMouseMove(osgGA::GUIEventAdapter::EventType eventType, const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &)
virtual bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &)
bool handleMouse(osgGA::GUIEventAdapter::EventType eventType, const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &)
Base class for inserting mouse and keyboard event into agxSDK::Simulation.
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:127
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
EventType
Definition: Events.h:38
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.