1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
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. *
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. *
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. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGRENDERPARTITIONBASE_H_
40 #define _OSGRENDERPARTITIONBASE_H_
45 //---------------------------------------------------------------------------
47 //---------------------------------------------------------------------------
49 #include "OSGSystemDef.h"
50 #include "OSGBaseTypes.h"
51 #include "OSGDrawTask.h"
55 //---------------------------------------------------------------------------
57 //---------------------------------------------------------------------------
59 class TreeBuilderBase
;
60 class OcclusionCullingTreeBuilder
;
62 //---------------------------------------------------------------------------
64 //---------------------------------------------------------------------------
66 //---------------------------------------------------------------------------
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
81 typedef DrawTask Inherited
;
83 //-----------------------------------------------------------------------
85 //-----------------------------------------------------------------------
87 //-----------------------------------------------------------------------
89 //-----------------------------------------------------------------------
95 CopyStateOverride
= 0x0001,
98 CopyProjection
= 0x0004,
99 CopyVisibility
= 0x0008,
104 CopyViewportSize
= 0x0040,
105 CopyFrustum
= 0x0080,
107 CopyNearFar
= 0x0100,
109 CopyVPCamera
= 0x0200,
118 StateSorting
= 0x0001,
119 TransformSorting
= 0x0002,
120 SimpleCallback
= 0x0003
126 ProjectionSetup
= 0x0001,
127 ViewportSetup
= 0x0002,
128 BackgroundSetup
= 0x0004,
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 //-----------------------------------------------------------------------
143 //-----------------------------------------------------------------------
145 //-----------------------------------------------------------------------
147 //-----------------------------------------------------------------------
149 //-----------------------------------------------------------------------
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 ----------------------------------*/
175 //-----------------------------------------------------------------------
177 //-----------------------------------------------------------------------
179 //-----------------------------------------------------------------------
181 //-----------------------------------------------------------------------
183 //-----------------------------------------------------------------------
185 //-----------------------------------------------------------------------
187 //-----------------------------------------------------------------------
189 //-----------------------------------------------------------------------
191 //-----------------------------------------------------------------------
192 // instance variables
193 //-----------------------------------------------------------------------
198 bool _bCorrectNegScale
;
202 UInt32 _uiNumMatrixChanges
;
204 //-----------------------------------------------------------------------
205 // instance functions
206 //-----------------------------------------------------------------------
208 RenderPartitionBase(void);
210 virtual ~RenderPartitionBase(void);
212 /*-------------------------- comparison ---------------------------------*/
214 /*-------------------------- comparison ---------------------------------*/
218 //-----------------------------------------------------------------------
220 //-----------------------------------------------------------------------
222 //-----------------------------------------------------------------------
224 //-----------------------------------------------------------------------
226 //-----------------------------------------------------------------------
228 //-----------------------------------------------------------------------
230 friend class TreeBuilderBase
;
231 friend class OcclusionCullingTreeBuilder
;
233 //-----------------------------------------------------------------------
235 //-----------------------------------------------------------------------
237 //-----------------------------------------------------------------------
239 //-----------------------------------------------------------------------
241 //-----------------------------------------------------------------------
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 //---------------------------------------------------------------------------
260 //---------------------------------------------------------------------------
264 #include "OSGRenderPartitionBase.inl"
266 #endif /* _OSGRENDERPARTITIONBASE_H_ */