changed: gcc8 base update
[opensg.git] / Source / Contrib / ComplexSceneManager / OSGCSMViewport.h
blob960b324ce1dc6a3206bcfb31c60e92f91d15cf85
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2006 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
18 * *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGCSMVIEWPORT_H_
40 #define _OSGCSMVIEWPORT_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGCSMViewportBase.h"
46 #include "OSGViewport.h"
48 OSG_BEGIN_NAMESPACE
50 class CSMWindow;
52 /*! \brief CSMViewport class. See \ref
53 PageContribCSMCSMViewport for a description.
56 class OSG_CONTRIBCSM_DLLMAPPING CSMViewport : public CSMViewportBase
58 protected:
60 /*========================== PUBLIC =================================*/
62 public:
64 typedef CSMViewportBase Inherited;
65 typedef CSMViewport Self;
67 typedef std::vector<ViewportUnrecPtr> ViewportStore;
68 typedef ViewportStore::iterator ViewportStoreIt;
69 typedef ViewportStore::const_iterator ViewportStoreConstIt;
71 /*---------------------------------------------------------------------*/
72 /*! \name Sync */
73 /*! \{ */
75 virtual void changed(ConstFieldMaskArg whichField,
76 UInt32 origin,
77 BitVector details );
79 /*! \} */
80 /*---------------------------------------------------------------------*/
81 /*! \name Output */
82 /*! \{ */
84 bool init(CSMWindow *pCSMWin);
86 /*! \} */
87 /*---------------------------------------------------------------------*/
88 /*! \name Output */
89 /*! \{ */
91 ViewportStoreConstIt beginViewports(void ) const;
92 ViewportStoreConstIt endViewports (void ) const;
93 Viewport *getViewport (UInt32 uiIndex) const;
95 /*! \} */
96 /*---------------------------------------------------------------------*/
97 /*! \name Output */
98 /*! \{ */
100 bool needsStereoVisual(void);
101 bool pointInside (Real32 x, Real32 y) const;
103 /*! \} */
104 /*---------------------------------------------------------------------*/
105 /*! \name Output */
106 /*! \{ */
108 Vec2f translateWindowViewportAbs(Real32 rX,
109 Real32 rY) const;
111 /*! \} */
112 /*---------------------------------------------------------------------*/
113 /*! \name Output */
114 /*! \{ */
116 virtual void dump( UInt32 uiIndent = 0,
117 const BitVector bvFlags = 0) const;
119 /*! \} */
120 /*========================= PROTECTED ===============================*/
122 protected:
124 ViewportStore _vViewports;
126 /*---------------------------------------------------------------------*/
127 /*! \name Constructors */
128 /*! \{ */
130 CSMViewport(void);
131 CSMViewport(const CSMViewport &source);
133 /*! \} */
134 /*---------------------------------------------------------------------*/
135 /*! \name Destructors */
136 /*! \{ */
138 virtual ~CSMViewport(void);
140 /*! \} */
141 /*---------------------------------------------------------------------*/
142 /*! \name Init */
143 /*! \{ */
145 virtual void resolveLinks(void);
147 /*! \} */
148 /*---------------------------------------------------------------------*/
149 /*! \name Init */
150 /*! \{ */
152 static void initMethod(InitPhase ePhase);
154 /*! \} */
155 /*========================== PRIVATE ================================*/
157 private:
159 friend class FieldContainer;
160 friend class CSMViewportBase;
162 // prohibit default functions (move to 'public' if you need one)
163 void operator =(const CSMViewport &source);
166 typedef CSMViewport *CSMViewportP;
168 OSG_END_NAMESPACE
170 #include "OSGCSMViewportBase.inl"
171 #include "OSGCSMViewport.inl"
173 #endif /* _OSGCSMVIEWPORT_H_ */