1
#ifndef COIN_SOGUIVIEWPOINTWRAPPER_H
2
#define COIN_SOGUIVIEWPOINTWRAPPER_H
4
/**************************************************************************\
6
* This file is part of the Coin 3D visualization library.
7
* Copyright (C) 1998-2005 by Systems in Motion. All rights reserved.
9
* This library is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU General Public License
11
* ("GPL") version 2 as published by the Free Software Foundation.
12
* See the file LICENSE.GPL at the root directory of this source
13
* distribution for additional information about the GNU GPL.
15
* For using Coin with software that can not be combined with the GNU
16
* GPL, and for taking advantage of the additional benefits of our
17
* support services, please contact Systems in Motion about acquiring
18
* a Coin Professional Edition License.
20
* See <URL:http://www.coin3d.org/> for more information.
22
* Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY.
23
* <URL:http://www.sim.no/>.
25
\**************************************************************************/
28
#error this is a private header file
29
#endif /* !SOQT_INTERNAL */
31
#include <Inventor/nodes/SoPerspectiveCamera.h>
32
#include <Inventor/nodes/SoSubNode.h>
33
#include <Inventor/actions/SoSearchAction.h>
34
#include <Inventor/SoLists.h>
41
class SoGetMatrixAction;
43
class SoGuiViewpointWrapper : public SoPerspectiveCamera {
44
typedef SoPerspectiveCamera inherited;
45
SO_NODE_HEADER(SoGuiViewpointWrapper);
47
static void initClass(void);
48
SoGuiViewpointWrapper(void);
50
void setSceneGraph(SoNode * root);
52
static SbBool hasViewpoints(SoNode * root);
55
~SoGuiViewpointWrapper();
58
void setViewpoint(SoPath * path);
60
static void fieldsensor_cb(void * data, SoSensor * sensor);
61
static void pathsensor_cb(void * data, SoSensor * sensor);
62
static void set_bind_cb(void * data, SoSensor * sensor);
64
void updateCamera(void);
65
void updateViewpoint(void);
67
void attachFieldSensors(void);
68
void detachFieldSensors(void);
70
SoFullPath * pathtoviewpoint;
71
SoPathSensor * pathsensor;
72
SoFieldSensor * positionsensor;
73
SoFieldSensor * orientationsensor;
74
SoFieldSensor * heightanglesensor;
75
SoGetMatrixAction * gmaction;
77
void truncateLists(void);
80
SbPList set_bind_sensorlist;
84
void attachSetBindSensors(void);
85
void detachSetBindSensors(void);
87
void sendBindEvents(SoNode * node, const SbBool onoff);
88
void bindTopOfStack(void);
92
#endif // COIN_SOGUIVIEWPOINTWRAPPER_H