Coin Logo Coin3D is Free Software,
published under the BSD 3-clause license.
https://bitbucket.org/Coin3D/
http://www.kongsberg.com/kogt/
SoWinConstrainedViewer.h
1 //
2 
3 /**************************************************************************\
4  * Copyright (c) Kongsberg Oil & Gas Technologies AS
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are
9  * met:
10  *
11  * Redistributions of source code must retain the above copyright notice,
12  * this list of conditions and the following disclaimer.
13  *
14  * Redistributions in binary form must reproduce the above copyright
15  * notice, this list of conditions and the following disclaimer in the
16  * documentation and/or other materials provided with the distribution.
17  *
18  * Neither the name of the copyright holder nor the names of its
19  * contributors may be used to endorse or promote products derived from
20  * this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26  * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 \**************************************************************************/
34 
35 #ifndef SOWIN_CONSTRAINEDVIEWER_H
36 #define SOWIN_CONSTRAINEDVIEWER_H
37 
38 #include <Inventor/Win/viewers/SoWinFullViewer.h>
39 
40 // ************************************************************************
41 
42 class SOWIN_DLL_API SoWinConstrainedViewer : public SoWinFullViewer {
43  SOWIN_OBJECT_ABSTRACT_HEADER(SoWinConstrainedViewer, SoWinFullViewer);
44 
45 public:
46  void setUpDirection(const SbVec3f & dir);
47  const SbVec3f & getUpDirection(void) const;
48 
49  virtual void setCamera(SoCamera * newcam);
50  virtual void saveHomePosition(void);
51  virtual void resetToHomePosition(void);
52 
53 protected:
54  SoWinConstrainedViewer(HWND parent,
55  const char * const name,
56  SbBool embed,
58  SoWinViewer::Type type,
59  SbBool build);
60 
62 
63  virtual void tiltCamera(float delta);
64  virtual void bottomWheelMotion(float value);
65  virtual void leftWheelMotion(float value);
66 
67  virtual void changeCameraValues(SoCamera * camera);
68  void findUpDirection(SbVec2s mouselocation);
69  void checkForCameraUpConstrain(void);
70 
71 private:
72  class SoWinConstrainedViewerP * pimpl;
73 };
74 
75 // ************************************************************************
76 
77 #endif // ! SOWIN_CONSTRAINEDVIEWER_H
virtual void resetToHomePosition(void)
Definition: SoWinViewer.cpp:1936
virtual void setCamera(SoCamera *camera)
Definition: SoWinViewer.cpp:1704
virtual void changeCameraValues(SoCamera *camera)
Definition: SoWinViewer.cpp:3622
virtual void saveHomePosition(void)
Definition: SoWinViewer.cpp:1900
The SoWinFullViewer class adds some user interface components to the viewer canvas.
Definition: SoWinFullViewer.h:44
virtual void bottomWheelMotion(float)
Definition: SoWinFullViewer.cpp:566
The SoWinConstrainedViewer class is the superclass for viewers with constrains on the viewpoint...
Definition: SoWinConstrainedViewer.h:42
BuildFlag
Definition: SoWinFullViewer.h:48
Type
Definition: SoWinViewer.h:94
virtual void leftWheelMotion(float)
Definition: SoWinFullViewer.cpp:499