SmallChange  1.0.0
A collection of extensions to Coin3D
Loading...
Searching...
No Matches
SmPanEventHandler.h
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
39#include <SmallChange/eventhandlers/SmEventHandler.h>
40#include <SmallChange/basic.h>
41
42class SmPanEventHandlerP;
43class SbSphereSheetProjector;
44
45class SMALLCHANGE_DLL_API SmPanEventHandler : public SmEventHandler {
47
48 SO_NODE_HEADER(SmPanEventHandler);
49
50public:
52 virtual void handleEvent(SoHandleEventAction * action);
53 static void initClass(void);
54
55 SoSFFloat zoomSpeed;
56
57protected:
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
71private:
72 SmPanEventHandlerP * pimpl;
73};
74
75#endif // !SMALLCHANGE_PAN_EVENTHANDLER_H
The SmEventHandler class...
Definition SmEventHandler.h:50
Google Earth type navigation mode.
Definition SmPanEventHandler.h:45