openscenegraph
PickEventHandler
Go to the documentation of this file.
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2018 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version. The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * OpenSceneGraph Public License for more details.
12*/
13
14#ifndef PICKEVENTHANDLER
15#define PICKEVENTHANDLER 1
16
17#include <osg/StateSet>
18#include <osg/Point>
19
20#include <osgGA/GUIEventHandler>
21
23
24namespace osgPresentation
25{
26
28{
29 public:
30
32 PickEventHandler(const std::string& str, osgPresentation::Operation operation, const JumpData& jumpData=JumpData());
34
35 void setOperation(osgPresentation::Operation operation) { _operation = operation; }
36 osgPresentation::Operation getOperation() const { return _operation; }
37
38 void setCommand(const std::string& str) { _command = str; }
39 const std::string& getCommand() const { return _command; }
40
41 void setKeyPosition(const osgPresentation::KeyPosition& keyPos) { _keyPos = keyPos; }
42 const osgPresentation::KeyPosition& getKeyPosition() const { return _keyPos; }
43
44 void setJumpData(const JumpData& jumpData) { _jumpData = jumpData; }
45 const JumpData& getJumpData() const { return _jumpData; }
46
48
49 virtual void getUsage(osg::ApplicationUsage& usage) const;
50
52
53 std::string _command;
56
58 std::set<osg::Drawable*> _drawablesOnPush;
59
60};
61
62}
63
64#endif
Definition GUIActionAdapter:62
Definition GUIEventAdapter:82
Definition GUIEventHandler:50
Definition PickEventHandler:28
const std::string & getCommand() const
Definition PickEventHandler:39
void setCommand(const std::string &str)
Definition PickEventHandler:38
void setOperation(osgPresentation::Operation operation)
Definition PickEventHandler:35
std::string _command
Definition PickEventHandler:53
PickEventHandler(osgPresentation::Operation operation, const JumpData &jumpData=JumpData())
std::set< osg::Drawable * > _drawablesOnPush
Definition PickEventHandler:58
const osgPresentation::KeyPosition & getKeyPosition() const
Definition PickEventHandler:42
osgPresentation::Operation getOperation() const
Definition PickEventHandler:36
PickEventHandler(const osgPresentation::KeyPosition &keyPos, const JumpData &jumpData=JumpData())
PickEventHandler(const std::string &str, osgPresentation::Operation operation, const JumpData &jumpData=JumpData())
osgPresentation::Operation _operation
Definition PickEventHandler:55
JumpData _jumpData
Definition PickEventHandler:57
osgPresentation::KeyPosition _keyPos
Definition PickEventHandler:54
const JumpData & getJumpData() const
Definition PickEventHandler:45
virtual void getUsage(osg::ApplicationUsage &usage) const
virtual bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa, osg::Object *object, osg::NodeVisitor *nv)
void setJumpData(const JumpData &jumpData)
Definition PickEventHandler:44
void setKeyPosition(const osgPresentation::KeyPosition &keyPos)
Definition PickEventHandler:41
Definition ApplicationUsage:26
Definition NodeVisitor:82
Definition Object:61
Definition AnimationMaterial:26
Operation
Operations related to click to run/load/key events.
Definition SlideEventHandler:36
#define OSGPRESENTATION_EXPORT
Definition osgPresentation/Export:38
Definition SlideEventHandler:46
Definition SlideEventHandler:161