fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / Cluster / Window / Base / OSGImageComposer.h
blob501b44b448d6bfd18d47097ebbb05c8114b0c2d1
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2002 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 _OSGIMAGECOMPOSER_H_
40 #define _OSGIMAGECOMPOSER_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
46 #include "OSGImageComposerBase.h"
47 #include "OSGWindow.h"
48 #include "OSGClusterWindow.h"
49 #include "OSGViewport.h"
51 OSG_BEGIN_NAMESPACE
53 /*! \ingroup GrpClusterWindowComposer
54 \ingroup GrpLibOSGCluster
55 \includebasedoc
58 class OSG_CLUSTER_DLLMAPPING ImageComposer : public ImageComposerBase
60 private:
62 /*========================== PUBLIC =================================*/
64 public:
66 typedef ImageComposerBase Inherited;
68 /*---------------------------------------------------------------------*/
69 /*! \name Sync */
70 /*! \{ */
72 virtual void changed(ConstFieldMaskArg whichField,
73 UInt32 origin,
74 BitVector detail);
76 /*! \} */
77 /*---------------------------------------------------------------------*/
78 /*! \name Output */
79 /*! \{ */
81 virtual void dump( UInt32 uiIndent = 0,
82 const BitVector bvFlags = 0) const;
84 /*! \} */
85 /*---------------------------------------------------------------------*/
86 /*! \name setup */
87 /*! \{ */
89 void setup(bool bIsClient,
90 UInt32 uiClusterId,
91 Window *pLocalWindow,
92 ClusterWindow *pClusterWindow);
94 /*! \} */
95 /*---------------------------------------------------------------------*/
96 /*! \name composition */
97 /*! \{ */
99 virtual void open (void );
100 virtual void startFrame (void );
101 virtual void startViewport (Viewport *port);
102 virtual void composeViewport(Viewport *port);
103 virtual void composeWindow (void );
104 virtual void close (void );
106 /*! \} */
107 /*---------------------------------------------------------------------*/
108 /*! \name features */
109 /*! \{ */
111 virtual bool getClientRendering(void);
112 virtual UInt32 getUsableServers (void);
114 /*! \} */
115 /*========================= PROTECTED ===============================*/
117 protected:
119 /*---------------------------------------------------------------------*/
120 /*! \name protected variables */
121 /*! \{ */
123 bool _isClient;
124 UInt32 _clusterId;
125 UInt32 _clusterSize;
126 UInt32 _serverCount;
127 Window *_localWindow;
128 ClusterWindow *_clusterWindow;
130 /*! \} */
131 /*---------------------------------------------------------------------*/
132 /*! \name get */
133 /*! \{ */
135 bool isClient (void);
136 UInt32 clusterId (void);
137 UInt32 clusterSize (void);
138 UInt32 serverCount (void);
139 Window *localWindow (void);
140 ClusterWindow *clusterWindow(void);
142 /*! \} */
143 /*---------------------------------------------------------------------*/
144 /*! \name helpers */
145 /*! \{ */
147 bool getScreenAlignedBBox(Node *root,
148 Viewport *vp,
149 UInt32 &l,
150 UInt32 &b,
151 UInt32 &r,
152 UInt32 &t,
153 UInt32 &front,
154 UInt32 &back);
156 /*! \} */
157 /*---------------------------------------------------------------------*/
158 /*! \name Constructors */
159 /*! \{ */
161 ImageComposer(void);
162 ImageComposer(const ImageComposer &source);
164 /*! \} */
165 /*---------------------------------------------------------------------*/
166 /*! \name Destructors */
167 /*! \{ */
169 virtual ~ImageComposer(void);
171 /*! \} */
172 /*---------------------------------------------------------------------*/
173 /*! \name Init */
174 /*! \{ */
176 static void initMethod(InitPhase ePhase);
177 static void exitMethod(InitPhase ePhase);
179 /*! \} */
180 /*========================== PRIVATE ================================*/
182 private:
184 friend class FieldContainer;
185 friend class ImageComposerBase;
187 // prohibit default functions (move to 'public' if you need one)
188 void operator =(const ImageComposer &source);
191 typedef ImageComposer *ImageComposerP;
193 OSG_END_NAMESPACE
195 #include "OSGImageComposerBase.inl"
196 #include "OSGImageComposer.inl"
198 #endif /* _OSGIMAGECOMPOSER_H_ */