fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / Action / Base / OSGRenderPartitionBase.h
blob686bcbb046d4e7b60aba33da1dc43546fd637338
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 _OSGRENDERPARTITIONBASE_H_
40 #define _OSGRENDERPARTITIONBASE_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 //---------------------------------------------------------------------------
46 // Includes
47 //---------------------------------------------------------------------------
49 #include "OSGSystemDef.h"
50 #include "OSGBaseTypes.h"
51 #include "OSGDrawTask.h"
53 OSG_BEGIN_NAMESPACE
55 //---------------------------------------------------------------------------
56 // Forward References
57 //---------------------------------------------------------------------------
59 class TreeBuilderBase;
60 class OcclusionCullingTreeBuilder;
62 //---------------------------------------------------------------------------
63 // Types
64 //---------------------------------------------------------------------------
66 //---------------------------------------------------------------------------
67 // Class
68 //---------------------------------------------------------------------------
70 /*! \brief RenderPartition is the core class for keeping track of the actions
71 necessary to draw a scene.
73 \ingroup GrpSystemActionBase
74 \ingroup GrpLibOSGSystem
77 class OSG_SYSTEM_DLLMAPPING RenderPartitionBase : public DrawTask
79 public:
81 typedef DrawTask Inherited;
83 //-----------------------------------------------------------------------
84 // constants
85 //-----------------------------------------------------------------------
87 //-----------------------------------------------------------------------
88 // enums
89 //-----------------------------------------------------------------------
91 enum CopyOnPush
93 CopyNothing = 0x0000,
95 CopyStateOverride = 0x0001,
97 CopyViewing = 0x0002,
98 CopyProjection = 0x0004,
99 CopyVisibility = 0x0008,
101 CopyTarget = 0x0010,
102 CopyWindow = 0x0020,
104 CopyViewportSize = 0x0040,
105 CopyFrustum = 0x0080,
107 CopyNearFar = 0x0100,
109 CopyVPCamera = 0x0200,
111 CopyMatrix = 0x0400,
113 CopyAll = 0xFFFF
116 enum Mode
118 StateSorting = 0x0001,
119 TransformSorting = 0x0002,
120 SimpleCallback = 0x0003
123 enum SetupMode
125 EmptySetup = 0x0000,
126 ProjectionSetup = 0x0001,
127 ViewportSetup = 0x0002,
128 BackgroundSetup = 0x0004,
129 FullSetup = 0x0007
132 enum SetupBit
134 PassiveBit = 0x00010000
137 static const UInt32 Setup = Inherited::LastType + 1;
138 static const UInt32 Execute = Inherited::LastType + 2;
139 static const UInt32 Full = Inherited::LastType + 3;
141 //-----------------------------------------------------------------------
142 // types
143 //-----------------------------------------------------------------------
145 //-----------------------------------------------------------------------
146 // class functions
147 //-----------------------------------------------------------------------
149 //-----------------------------------------------------------------------
150 // class functions
151 //-----------------------------------------------------------------------
153 //-----------------------------------------------------------------------
154 // instance functions
155 //-----------------------------------------------------------------------
157 /*------------------------- your_category -------------------------------*/
159 void setTaskType(UInt32 uiTaskType);
161 /*------------------------- assignment ----------------------------------*/
163 bool getCorrectNegScale(void ) const;
164 void setCorrectNegScale(bool bVal);
166 bool getZWriteTrans (void ) const;
167 void setZWriteTrans (bool bVal);
169 /*------------------------- comparison ----------------------------------*/
171 /*------------------------- comparison ----------------------------------*/
173 protected:
175 //-----------------------------------------------------------------------
176 // enums
177 //-----------------------------------------------------------------------
179 //-----------------------------------------------------------------------
180 // types
181 //-----------------------------------------------------------------------
183 //-----------------------------------------------------------------------
184 // class variables
185 //-----------------------------------------------------------------------
187 //-----------------------------------------------------------------------
188 // class functions
189 //-----------------------------------------------------------------------
191 //-----------------------------------------------------------------------
192 // instance variables
193 //-----------------------------------------------------------------------
195 // What to do
196 bool _bSortTrans;
197 bool _bZWriteTrans;
198 bool _bCorrectNegScale;
199 UInt8 _ubState;
201 // Stat
202 UInt32 _uiNumMatrixChanges;
204 //-----------------------------------------------------------------------
205 // instance functions
206 //-----------------------------------------------------------------------
208 RenderPartitionBase(void);
210 virtual ~RenderPartitionBase(void);
212 /*-------------------------- comparison ---------------------------------*/
214 /*-------------------------- comparison ---------------------------------*/
216 private:
218 //-----------------------------------------------------------------------
219 // enums
220 //-----------------------------------------------------------------------
222 //-----------------------------------------------------------------------
223 // types
224 //-----------------------------------------------------------------------
226 //-----------------------------------------------------------------------
227 // friend classes
228 //-----------------------------------------------------------------------
230 friend class TreeBuilderBase;
231 friend class OcclusionCullingTreeBuilder;
233 //-----------------------------------------------------------------------
234 // friend functions
235 //-----------------------------------------------------------------------
237 //-----------------------------------------------------------------------
238 // class variables
239 //-----------------------------------------------------------------------
241 //-----------------------------------------------------------------------
242 // class functions
243 //-----------------------------------------------------------------------
245 //-----------------------------------------------------------------------
246 // instance variables
247 //-----------------------------------------------------------------------
249 //-----------------------------------------------------------------------
250 // instance functions
251 //-----------------------------------------------------------------------
253 /*!\brief prohibit default function (move to 'public' if needed) */
254 RenderPartitionBase(const RenderPartitionBase &source);
255 void operator =(const RenderPartitionBase &source);
258 //---------------------------------------------------------------------------
259 // Exported Types
260 //---------------------------------------------------------------------------
262 OSG_END_NAMESPACE
264 #include "OSGRenderPartitionBase.inl"
266 #endif /* _OSGRENDERPARTITIONBASE_H_ */