changed: gcc8 base update
[opensg.git] / Source / System / State / OpenGL / OSGFogChunkBase.h
blob040bb6691b4d72d480d3f18b920a3a25eff730d7
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
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 /*****************************************************************************\
40 *****************************************************************************
41 ** **
42 ** This file is automatically generated. **
43 ** **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
46 ** **
47 ** Do not change this file, changes should be done in the derived **
48 ** class FogChunk
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGFOGCHUNKBASE_H_
55 #define _OSGFOGCHUNKBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGStateDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGStateChunk.h" // Parent
68 #include "OSGBaseFields.h" // Mode type
69 #include "OSGSysFields.h" // Start type
71 #include "OSGFogChunkFields.h"
73 OSG_BEGIN_NAMESPACE
76 class FogChunk;
78 //! \brief FogChunk Base Class.
80 class OSG_STATE_DLLMAPPING FogChunkBase : public StateChunk
82 public:
84 typedef StateChunk Inherited;
85 typedef StateChunk ParentContainer;
87 typedef Inherited::TypeObject TypeObject;
88 typedef TypeObject::InitPhase InitPhase;
90 OSG_GEN_INTERNALPTR(FogChunk);
92 /*========================== PUBLIC =================================*/
94 public:
96 enum
98 ModeFieldId = Inherited::NextFieldId,
99 ColorFieldId = ModeFieldId + 1,
100 StartFieldId = ColorFieldId + 1,
101 EndFieldId = StartFieldId + 1,
102 DensityFieldId = EndFieldId + 1,
103 NextFieldId = DensityFieldId + 1
106 static const OSG::BitVector ModeFieldMask =
107 (TypeTraits<BitVector>::One << ModeFieldId);
108 static const OSG::BitVector ColorFieldMask =
109 (TypeTraits<BitVector>::One << ColorFieldId);
110 static const OSG::BitVector StartFieldMask =
111 (TypeTraits<BitVector>::One << StartFieldId);
112 static const OSG::BitVector EndFieldMask =
113 (TypeTraits<BitVector>::One << EndFieldId);
114 static const OSG::BitVector DensityFieldMask =
115 (TypeTraits<BitVector>::One << DensityFieldId);
116 static const OSG::BitVector NextFieldMask =
117 (TypeTraits<BitVector>::One << NextFieldId);
119 typedef SFGLenum SFModeType;
120 typedef SFColor4f SFColorType;
121 typedef SFReal32 SFStartType;
122 typedef SFReal32 SFEndType;
123 typedef SFReal32 SFDensityType;
125 /*---------------------------------------------------------------------*/
126 /*! \name Class Get */
127 /*! \{ */
129 static FieldContainerType &getClassType (void);
130 static UInt32 getClassTypeId (void);
131 static UInt16 getClassGroupId(void);
133 /*! \} */
134 /*---------------------------------------------------------------------*/
135 /*! \name FieldContainer Get */
136 /*! \{ */
138 virtual FieldContainerType &getType (void);
139 virtual const FieldContainerType &getType (void) const;
141 virtual UInt32 getContainerSize(void) const;
143 /*! \} */
144 /*---------------------------------------------------------------------*/
145 /*! \name Field Get */
146 /*! \{ */
149 SFGLenum *editSFMode (void);
150 const SFGLenum *getSFMode (void) const;
152 SFColor4f *editSFColor (void);
153 const SFColor4f *getSFColor (void) const;
155 SFReal32 *editSFStart (void);
156 const SFReal32 *getSFStart (void) const;
158 SFReal32 *editSFEnd (void);
159 const SFReal32 *getSFEnd (void) const;
161 SFReal32 *editSFDensity (void);
162 const SFReal32 *getSFDensity (void) const;
165 GLenum &editMode (void);
166 const GLenum &getMode (void) const;
168 Color4f &editColor (void);
169 const Color4f &getColor (void) const;
171 Real32 &editStart (void);
172 Real32 getStart (void) const;
174 Real32 &editEnd (void);
175 Real32 getEnd (void) const;
177 Real32 &editDensity (void);
178 Real32 getDensity (void) const;
180 /*! \} */
181 /*---------------------------------------------------------------------*/
182 /*! \name Field Set */
183 /*! \{ */
185 void setMode (const GLenum &value);
186 void setColor (const Color4f &value);
187 void setStart (const Real32 value);
188 void setEnd (const Real32 value);
189 void setDensity (const Real32 value);
191 /*! \} */
192 /*---------------------------------------------------------------------*/
193 /*! \name Ptr MField Set */
194 /*! \{ */
196 /*! \} */
197 /*---------------------------------------------------------------------*/
198 /*! \name Binary Access */
199 /*! \{ */
201 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
202 virtual void copyToBin (BinaryDataHandler &pMem,
203 ConstFieldMaskArg whichField);
204 virtual void copyFromBin(BinaryDataHandler &pMem,
205 ConstFieldMaskArg whichField);
208 /*! \} */
209 /*---------------------------------------------------------------------*/
210 /*! \name Construction */
211 /*! \{ */
213 static FogChunkTransitPtr create (void);
214 static FogChunk *createEmpty (void);
216 static FogChunkTransitPtr createLocal (
217 BitVector bFlags = FCLocal::All);
219 static FogChunk *createEmptyLocal(
220 BitVector bFlags = FCLocal::All);
222 static FogChunkTransitPtr createDependent (BitVector bFlags);
224 /*! \} */
225 /*---------------------------------------------------------------------*/
226 /*! \name Copy */
227 /*! \{ */
229 virtual FieldContainerTransitPtr shallowCopy (void) const;
230 virtual FieldContainerTransitPtr shallowCopyLocal(
231 BitVector bFlags = FCLocal::All) const;
232 virtual FieldContainerTransitPtr shallowCopyDependent(
233 BitVector bFlags) const;
235 /*! \} */
236 /*========================= PROTECTED ===============================*/
238 protected:
240 static TypeObject _type;
242 static void classDescInserter(TypeObject &oType);
243 static const Char8 *getClassname (void );
245 /*---------------------------------------------------------------------*/
246 /*! \name Fields */
247 /*! \{ */
249 SFGLenum _sfMode;
250 SFColor4f _sfColor;
251 SFReal32 _sfStart;
252 SFReal32 _sfEnd;
253 SFReal32 _sfDensity;
255 /*! \} */
256 /*---------------------------------------------------------------------*/
257 /*! \name Constructors */
258 /*! \{ */
260 FogChunkBase(void);
261 FogChunkBase(const FogChunkBase &source);
263 /*! \} */
264 /*---------------------------------------------------------------------*/
265 /*! \name Destructors */
266 /*! \{ */
268 virtual ~FogChunkBase(void);
270 /*! \} */
271 /*---------------------------------------------------------------------*/
272 /*! \name onCreate */
273 /*! \{ */
276 /*! \} */
277 /*---------------------------------------------------------------------*/
278 /*! \name Generic Field Access */
279 /*! \{ */
281 GetFieldHandlePtr getHandleMode (void) const;
282 EditFieldHandlePtr editHandleMode (void);
283 GetFieldHandlePtr getHandleColor (void) const;
284 EditFieldHandlePtr editHandleColor (void);
285 GetFieldHandlePtr getHandleStart (void) const;
286 EditFieldHandlePtr editHandleStart (void);
287 GetFieldHandlePtr getHandleEnd (void) const;
288 EditFieldHandlePtr editHandleEnd (void);
289 GetFieldHandlePtr getHandleDensity (void) const;
290 EditFieldHandlePtr editHandleDensity (void);
292 /*! \} */
293 /*---------------------------------------------------------------------*/
294 /*! \name Sync */
295 /*! \{ */
297 #ifdef OSG_MT_CPTR_ASPECT
298 virtual void execSyncV( FieldContainer &oFrom,
299 ConstFieldMaskArg whichField,
300 AspectOffsetStore &oOffsets,
301 ConstFieldMaskArg syncMode ,
302 const UInt32 uiSyncInfo);
304 void execSync ( FogChunkBase *pFrom,
305 ConstFieldMaskArg whichField,
306 AspectOffsetStore &oOffsets,
307 ConstFieldMaskArg syncMode ,
308 const UInt32 uiSyncInfo);
309 #endif
311 /*! \} */
312 /*---------------------------------------------------------------------*/
313 /*! \name Edit */
314 /*! \{ */
316 /*! \} */
317 /*---------------------------------------------------------------------*/
318 /*! \name Aspect Create */
319 /*! \{ */
321 #ifdef OSG_MT_CPTR_ASPECT
322 virtual FieldContainer *createAspectCopy(
323 const FieldContainer *pRefAspect) const;
324 #endif
326 /*! \} */
327 /*---------------------------------------------------------------------*/
328 /*! \name Edit */
329 /*! \{ */
330 /*! \} */
331 /*---------------------------------------------------------------------*/
332 /*! \name Sync */
333 /*! \{ */
335 virtual void resolveLinks(void);
337 /*! \} */
338 /*========================== PRIVATE ================================*/
340 private:
341 /*---------------------------------------------------------------------*/
343 // prohibit default functions (move to 'public' if you need one)
344 void operator =(const FogChunkBase &source);
347 typedef FogChunkBase *FogChunkBaseP;
349 OSG_END_NAMESPACE
351 #endif /* _OSGFOGCHUNKBASE_H_ */