SoXt  1.4.1
Coin3D GUI toolkit binding
Loading...
Searching...
No Matches
SoXtConstrainedViewer.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 SOXT_CONSTRAINEDVIEWER_H
36#define SOXT_CONSTRAINEDVIEWER_H
37
38#include <Inventor/Xt/viewers/SoXtFullViewer.h>
39
40// ************************************************************************
41
42class SOXT_DLL_API SoXtConstrainedViewer : public SoXtFullViewer {
43 SOXT_OBJECT_ABSTRACT_HEADER(SoXtConstrainedViewer, SoXtFullViewer);
44
45public:
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
53protected:
54 SoXtConstrainedViewer(Widget parent,
55 const char * const name,
56 SbBool embed,
58 SoXtViewer::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
71private:
72 class SoXtConstrainedViewerP * pimpl;
73};
74
75// ************************************************************************
76
77#endif // ! SOXT_CONSTRAINEDVIEWER_H
The SoXtConstrainedViewer class is the superclass for viewers with constrains on the viewpoint.
Definition SoXtConstrainedViewer.h:42
The SoXtFullViewer class adds some user interface components to the viewer canvas.
Definition SoXtFullViewer.h:44
BuildFlag
Definition SoXtFullViewer.h:48
virtual void bottomWheelMotion(float)
Definition SoXtFullViewer.cpp:566
virtual void leftWheelMotion(float)
Definition SoXtFullViewer.cpp:499
virtual void changeCameraValues(SoCamera *camera)
Definition SoXtViewer.cpp:3628
Type
Definition SoXtViewer.h:94
virtual void setCamera(SoCamera *camera)
Definition SoXtViewer.cpp:1706
virtual void saveHomePosition(void)
Definition SoXtViewer.cpp:1902
virtual void resetToHomePosition(void)
Definition SoXtViewer.cpp:1938