NutsnBolts  0.1.0
An extension library for Coin
Loading...
Searching...
No Matches
NbSceneManager.h
1#ifndef NB_SCENEMANAGER_H
2#define NB_SCENEMANAGER_H
3
4/**************************************************************************\
5 * Copyright (c) Kongsberg Oil & Gas Technologies AS
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are
10 * met:
11 *
12 * Redistributions of source code must retain the above copyright notice,
13 * this list of conditions and the following disclaimer.
14 *
15 * Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 *
19 * Neither the name of the copyright holder nor the names of its
20 * contributors may be used to endorse or promote products derived from
21 * this software without specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34\**************************************************************************/
35
36#include <Inventor/SoSceneManager.h>
37#include <NutsnBolts/NutsnBolts.h>
38
39class SoCamera;
42class NbSceneManagerP;
43
44class NB_DLL_API NbSceneManager : public SoSceneManager {
46
47public:
48 NbSceneManager(void);
49 virtual ~NbSceneManager(void);
50
51 virtual void render(const SbBool clearwindow = TRUE,
52 const SbBool clearzbuffer = TRUE);
53 virtual void render(SoGLRenderAction * action,
54 const SbBool initmatrices = TRUE,
55 const SbBool clearwindow = TRUE,
56 const SbBool clearzbuffer = TRUE);
57
58 virtual void setCamera(SoCamera * camera);
59 SoCamera * getCamera(void) const;
60
62 AS_IS,
63 WIREFRAME,
64 POINTS,
65 WIREFRAME_OVERLAY,
66 HIDDEN_LINE,
67 BOUNDING_BOX
68 };
69
70 virtual void setRenderMode(RenderMode mode);
71 RenderMode getRenderMode(void) const;
72
74 MONO,
75 RED_CYAN,
76 RED_BLUE,
77 QUAD_BUFFER,
78 INTERLEAVED_ROWS,
79 INTERLEAVED_COLUMNS
80 };
81
82 virtual void setStereoMode(StereoMode mode);
83 StereoMode getStereoMode(void) const;
84
85 virtual void setStereoOffset(float offset);
86 float getStereoOffset(void) const;
87
88 virtual void setTexturesEnabled(const SbBool onoff);
89 SbBool isTexturesEnabled(void) const;
90
91 virtual void setWireframeOverlayColor(const SbColor & color);
92 const SbColor & getWireframeOverlayColor(void) const;
93
94 virtual SbBool processEvent(const SoEvent * const event);
95
97 NO_NAVIGATION,
98 JUST_NAVIGATION,
99 MIXED_NAVIGATION
100 };
101
102 virtual void setNavigationState(NavigationState state);
103 virtual NavigationState getNavigationState(void) const;
104
105 virtual void setNavigationSystem(NbNavigationSystem * system);
106 virtual NbNavigationSystem * getNavigationSystem(void) const;
107
108 virtual void setSceneGraph(SoNode * const root);
109 virtual SoNode * getSceneGraph(void) const;
110
111 virtual void activate(void);
112 virtual void deactivate(void);
113
115 NO_AUTO_CLIPPING,
116 FIXED_NEAR_PLANE,
117 VARIABLE_NEAR_PLANE
118 };
119
120 virtual void setAutoClipping(AutoClippingStrategy strategy);
121 virtual AutoClippingStrategy getAutoClipping(void) const;
122
123 virtual void setNearPlaneValue(float value);
124 virtual float getNearPlaneValue(void) const;
125
126private:
127 NbSceneManagerP * pimpl;
128
129}; // NbSceneManager
130
131#endif // !NB_SCENEMANAGER_H
Abstract base class for implementing a navigation submode.
Definition NbNavigationMode.h:59
Class for managing user-based viewer navigation.
Definition NbNavigationSystem.h:92
Extends the SoSceneManager class with more high-level viewer related functionality.
Definition NbSceneManager.h:44
RenderMode
Definition NbSceneManager.h:61
NavigationState
Definition NbSceneManager.h:96
StereoMode
Definition NbSceneManager.h:73
AutoClippingStrategy
Definition NbSceneManager.h:114