Coin Logo Coin3D is Free Software,
published under the BSD 3-clause license.
https://bitbucket.org/Coin3D/
http://www.kongsberg.com/kogt/
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SmPanEventHandler.h
Go to the documentation of this file.
1 
2 #ifndef SMALLCHANGE_PAN_EVENTHANDLER_H
3 #define SMALLCHANGE_PAN_EVENTHANDLER_H
4 
5 /**************************************************************************\
6  * Copyright (c) Kongsberg Oil & Gas Technologies AS
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions are
11  * met:
12  *
13  * Redistributions of source code must retain the above copyright notice,
14  * this list of conditions and the following disclaimer.
15  *
16  * Redistributions in binary form must reproduce the above copyright
17  * notice, this list of conditions and the following disclaimer in the
18  * documentation and/or other materials provided with the distribution.
19  *
20  * Neither the name of the copyright holder nor the names of its
21  * contributors may be used to endorse or promote products derived from
22  * this software without specific prior written permission.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28  * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 \**************************************************************************/
36 
37 #include <Inventor/fields/SoSFFloat.h>
38 
40 #include <SmallChange/basic.h>
41 
42 class SmPanEventHandlerP;
44 
45 class SMALLCHANGE_DLL_API SmPanEventHandler : public SmEventHandler {
46  typedef SmEventHandler inherited;
47 
49 
50 public:
51  SmPanEventHandler(void);
52  virtual void handleEvent(SoHandleEventAction * action);
53  static void initClass(void);
54 
56 
57 protected:
58  virtual ~SmPanEventHandler();
59 
60  void pan(const SbVec2f & currpos,
61  const SbVec2f & prevpos);
62 
63  void spin(const SbVec2f & currpos,
64  const SbVec2f & prevpos);
65 
66  void zoom(const SbVec2f & currpos,
67  const SbVec2f & prevpos);
68 
69  void zoom(const float delta);
70 
71 private:
72  SmPanEventHandlerP * pimpl;
73 };
74 
75 #endif // !SMALLCHANGE_PAN_EVENTHANDLER_H
The SmEventHandler class...FIXME: doc.
Definition: SmEventHandler.h:50
SoSFFloat zoomSpeed
Definition: SmPanEventHandler.h:55
Google Earth type navigation modeFIXME: doc.
Definition: SmPanEventHandler.h:45
#define SO_NODE_HEADER(classname)
virtual void handleEvent(SoHandleEventAction *action)
static void initClass(void)
Definition: SmEventHandler.cpp:65