changed: gcc8 base update
[opensg.git] / Source / System / State / OpenGL / OSGTexGenChunkBase.h
blob4c2a0d612c6a5bb9b9c311313631a12e4af612df
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 TexGenChunk
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGTEXGENCHUNKBASE_H_
55 #define _OSGTEXGENCHUNKBASE_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" // GenFuncS type
69 #include "OSGVecFields.h" // GenFuncSPlane type
70 #include "OSGNodeFields.h" // SBeacon type
71 #include "OSGMathFields.h" // EyeModelViewMatrix type
72 #include "OSGSysFields.h" // EyeModelViewMode type
74 #include "OSGTexGenChunkFields.h"
76 OSG_BEGIN_NAMESPACE
79 class TexGenChunk;
81 //! \brief TexGenChunk Base Class.
83 class OSG_STATE_DLLMAPPING TexGenChunkBase : public StateChunk
85 public:
87 typedef StateChunk Inherited;
88 typedef StateChunk ParentContainer;
90 typedef Inherited::TypeObject TypeObject;
91 typedef TypeObject::InitPhase InitPhase;
93 OSG_GEN_INTERNALPTR(TexGenChunk);
95 /*========================== PUBLIC =================================*/
97 public:
99 enum
101 GenFuncSFieldId = Inherited::NextFieldId,
102 GenFuncTFieldId = GenFuncSFieldId + 1,
103 GenFuncRFieldId = GenFuncTFieldId + 1,
104 GenFuncQFieldId = GenFuncRFieldId + 1,
105 GenFuncSPlaneFieldId = GenFuncQFieldId + 1,
106 GenFuncTPlaneFieldId = GenFuncSPlaneFieldId + 1,
107 GenFuncRPlaneFieldId = GenFuncTPlaneFieldId + 1,
108 GenFuncQPlaneFieldId = GenFuncRPlaneFieldId + 1,
109 SBeaconFieldId = GenFuncQPlaneFieldId + 1,
110 TBeaconFieldId = SBeaconFieldId + 1,
111 RBeaconFieldId = TBeaconFieldId + 1,
112 QBeaconFieldId = RBeaconFieldId + 1,
113 EyeModelViewMatrixFieldId = QBeaconFieldId + 1,
114 EyeModelViewModeFieldId = EyeModelViewMatrixFieldId + 1,
115 NextFieldId = EyeModelViewModeFieldId + 1
118 static const OSG::BitVector GenFuncSFieldMask =
119 (TypeTraits<BitVector>::One << GenFuncSFieldId);
120 static const OSG::BitVector GenFuncTFieldMask =
121 (TypeTraits<BitVector>::One << GenFuncTFieldId);
122 static const OSG::BitVector GenFuncRFieldMask =
123 (TypeTraits<BitVector>::One << GenFuncRFieldId);
124 static const OSG::BitVector GenFuncQFieldMask =
125 (TypeTraits<BitVector>::One << GenFuncQFieldId);
126 static const OSG::BitVector GenFuncSPlaneFieldMask =
127 (TypeTraits<BitVector>::One << GenFuncSPlaneFieldId);
128 static const OSG::BitVector GenFuncTPlaneFieldMask =
129 (TypeTraits<BitVector>::One << GenFuncTPlaneFieldId);
130 static const OSG::BitVector GenFuncRPlaneFieldMask =
131 (TypeTraits<BitVector>::One << GenFuncRPlaneFieldId);
132 static const OSG::BitVector GenFuncQPlaneFieldMask =
133 (TypeTraits<BitVector>::One << GenFuncQPlaneFieldId);
134 static const OSG::BitVector SBeaconFieldMask =
135 (TypeTraits<BitVector>::One << SBeaconFieldId);
136 static const OSG::BitVector TBeaconFieldMask =
137 (TypeTraits<BitVector>::One << TBeaconFieldId);
138 static const OSG::BitVector RBeaconFieldMask =
139 (TypeTraits<BitVector>::One << RBeaconFieldId);
140 static const OSG::BitVector QBeaconFieldMask =
141 (TypeTraits<BitVector>::One << QBeaconFieldId);
142 static const OSG::BitVector EyeModelViewMatrixFieldMask =
143 (TypeTraits<BitVector>::One << EyeModelViewMatrixFieldId);
144 static const OSG::BitVector EyeModelViewModeFieldMask =
145 (TypeTraits<BitVector>::One << EyeModelViewModeFieldId);
146 static const OSG::BitVector NextFieldMask =
147 (TypeTraits<BitVector>::One << NextFieldId);
149 typedef SFGLenum SFGenFuncSType;
150 typedef SFGLenum SFGenFuncTType;
151 typedef SFGLenum SFGenFuncRType;
152 typedef SFGLenum SFGenFuncQType;
153 typedef SFVec4f SFGenFuncSPlaneType;
154 typedef SFVec4f SFGenFuncTPlaneType;
155 typedef SFVec4f SFGenFuncRPlaneType;
156 typedef SFVec4f SFGenFuncQPlaneType;
157 typedef SFWeakNodePtr SFSBeaconType;
158 typedef SFWeakNodePtr SFTBeaconType;
159 typedef SFWeakNodePtr SFRBeaconType;
160 typedef SFWeakNodePtr SFQBeaconType;
161 typedef SFMatrix SFEyeModelViewMatrixType;
162 typedef SFUInt32 SFEyeModelViewModeType;
164 /*---------------------------------------------------------------------*/
165 /*! \name Class Get */
166 /*! \{ */
168 static FieldContainerType &getClassType (void);
169 static UInt32 getClassTypeId (void);
170 static UInt16 getClassGroupId(void);
172 /*! \} */
173 /*---------------------------------------------------------------------*/
174 /*! \name FieldContainer Get */
175 /*! \{ */
177 virtual FieldContainerType &getType (void);
178 virtual const FieldContainerType &getType (void) const;
180 virtual UInt32 getContainerSize(void) const;
182 /*! \} */
183 /*---------------------------------------------------------------------*/
184 /*! \name Field Get */
185 /*! \{ */
188 SFGLenum *editSFGenFuncS (void);
189 const SFGLenum *getSFGenFuncS (void) const;
191 SFGLenum *editSFGenFuncT (void);
192 const SFGLenum *getSFGenFuncT (void) const;
194 SFGLenum *editSFGenFuncR (void);
195 const SFGLenum *getSFGenFuncR (void) const;
197 SFGLenum *editSFGenFuncQ (void);
198 const SFGLenum *getSFGenFuncQ (void) const;
200 SFVec4f *editSFGenFuncSPlane (void);
201 const SFVec4f *getSFGenFuncSPlane (void) const;
203 SFVec4f *editSFGenFuncTPlane (void);
204 const SFVec4f *getSFGenFuncTPlane (void) const;
206 SFVec4f *editSFGenFuncRPlane (void);
207 const SFVec4f *getSFGenFuncRPlane (void) const;
209 SFVec4f *editSFGenFuncQPlane (void);
210 const SFVec4f *getSFGenFuncQPlane (void) const;
211 const SFWeakNodePtr *getSFSBeacon (void) const;
212 SFWeakNodePtr *editSFSBeacon (void);
213 const SFWeakNodePtr *getSFTBeacon (void) const;
214 SFWeakNodePtr *editSFTBeacon (void);
215 const SFWeakNodePtr *getSFRBeacon (void) const;
216 SFWeakNodePtr *editSFRBeacon (void);
217 const SFWeakNodePtr *getSFQBeacon (void) const;
218 SFWeakNodePtr *editSFQBeacon (void);
220 SFMatrix *editSFEyeModelViewMatrix(void);
221 const SFMatrix *getSFEyeModelViewMatrix (void) const;
223 SFUInt32 *editSFEyeModelViewMode(void);
224 const SFUInt32 *getSFEyeModelViewMode (void) const;
227 GLenum &editGenFuncS (void);
228 const GLenum &getGenFuncS (void) const;
230 GLenum &editGenFuncT (void);
231 const GLenum &getGenFuncT (void) const;
233 GLenum &editGenFuncR (void);
234 const GLenum &getGenFuncR (void) const;
236 GLenum &editGenFuncQ (void);
237 const GLenum &getGenFuncQ (void) const;
239 Vec4f &editGenFuncSPlane (void);
240 const Vec4f &getGenFuncSPlane (void) const;
242 Vec4f &editGenFuncTPlane (void);
243 const Vec4f &getGenFuncTPlane (void) const;
245 Vec4f &editGenFuncRPlane (void);
246 const Vec4f &getGenFuncRPlane (void) const;
248 Vec4f &editGenFuncQPlane (void);
249 const Vec4f &getGenFuncQPlane (void) const;
251 Node * getSBeacon (void) const;
253 Node * getTBeacon (void) const;
255 Node * getRBeacon (void) const;
257 Node * getQBeacon (void) const;
259 Matrix &editEyeModelViewMatrix(void);
260 const Matrix &getEyeModelViewMatrix (void) const;
262 UInt32 &editEyeModelViewMode(void);
263 UInt32 getEyeModelViewMode (void) const;
265 /*! \} */
266 /*---------------------------------------------------------------------*/
267 /*! \name Field Set */
268 /*! \{ */
270 void setGenFuncS (const GLenum &value);
271 void setGenFuncT (const GLenum &value);
272 void setGenFuncR (const GLenum &value);
273 void setGenFuncQ (const GLenum &value);
274 void setGenFuncSPlane (const Vec4f &value);
275 void setGenFuncTPlane (const Vec4f &value);
276 void setGenFuncRPlane (const Vec4f &value);
277 void setGenFuncQPlane (const Vec4f &value);
278 void setSBeacon (Node * const value);
279 void setTBeacon (Node * const value);
280 void setRBeacon (Node * const value);
281 void setQBeacon (Node * const value);
282 void setEyeModelViewMatrix(const Matrix &value);
283 void setEyeModelViewMode(const UInt32 value);
285 /*! \} */
286 /*---------------------------------------------------------------------*/
287 /*! \name Ptr Field Set */
288 /*! \{ */
290 /*! \} */
291 /*---------------------------------------------------------------------*/
292 /*! \name Ptr MField Set */
293 /*! \{ */
295 /*! \} */
296 /*---------------------------------------------------------------------*/
297 /*! \name Binary Access */
298 /*! \{ */
300 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
301 virtual void copyToBin (BinaryDataHandler &pMem,
302 ConstFieldMaskArg whichField);
303 virtual void copyFromBin(BinaryDataHandler &pMem,
304 ConstFieldMaskArg whichField);
307 /*! \} */
308 /*---------------------------------------------------------------------*/
309 /*! \name Construction */
310 /*! \{ */
312 static TexGenChunkTransitPtr create (void);
313 static TexGenChunk *createEmpty (void);
315 static TexGenChunkTransitPtr createLocal (
316 BitVector bFlags = FCLocal::All);
318 static TexGenChunk *createEmptyLocal(
319 BitVector bFlags = FCLocal::All);
321 static TexGenChunkTransitPtr createDependent (BitVector bFlags);
323 /*! \} */
324 /*---------------------------------------------------------------------*/
325 /*! \name Copy */
326 /*! \{ */
328 virtual FieldContainerTransitPtr shallowCopy (void) const;
329 virtual FieldContainerTransitPtr shallowCopyLocal(
330 BitVector bFlags = FCLocal::All) const;
331 virtual FieldContainerTransitPtr shallowCopyDependent(
332 BitVector bFlags) const;
334 /*! \} */
335 /*========================= PROTECTED ===============================*/
337 protected:
339 static TypeObject _type;
341 static void classDescInserter(TypeObject &oType);
342 static const Char8 *getClassname (void );
344 /*---------------------------------------------------------------------*/
345 /*! \name Fields */
346 /*! \{ */
348 SFGLenum _sfGenFuncS;
349 SFGLenum _sfGenFuncT;
350 SFGLenum _sfGenFuncR;
351 SFGLenum _sfGenFuncQ;
352 SFVec4f _sfGenFuncSPlane;
353 SFVec4f _sfGenFuncTPlane;
354 SFVec4f _sfGenFuncRPlane;
355 SFVec4f _sfGenFuncQPlane;
356 SFWeakNodePtr _sfSBeacon;
357 SFWeakNodePtr _sfTBeacon;
358 SFWeakNodePtr _sfRBeacon;
359 SFWeakNodePtr _sfQBeacon;
360 SFMatrix _sfEyeModelViewMatrix;
361 SFUInt32 _sfEyeModelViewMode;
363 /*! \} */
364 /*---------------------------------------------------------------------*/
365 /*! \name Constructors */
366 /*! \{ */
368 TexGenChunkBase(void);
369 TexGenChunkBase(const TexGenChunkBase &source);
371 /*! \} */
372 /*---------------------------------------------------------------------*/
373 /*! \name Destructors */
374 /*! \{ */
376 virtual ~TexGenChunkBase(void);
378 /*! \} */
379 /*---------------------------------------------------------------------*/
380 /*! \name onCreate */
381 /*! \{ */
383 void onCreate(const TexGenChunk *source = NULL);
385 /*! \} */
386 /*---------------------------------------------------------------------*/
387 /*! \name Generic Field Access */
388 /*! \{ */
390 GetFieldHandlePtr getHandleGenFuncS (void) const;
391 EditFieldHandlePtr editHandleGenFuncS (void);
392 GetFieldHandlePtr getHandleGenFuncT (void) const;
393 EditFieldHandlePtr editHandleGenFuncT (void);
394 GetFieldHandlePtr getHandleGenFuncR (void) const;
395 EditFieldHandlePtr editHandleGenFuncR (void);
396 GetFieldHandlePtr getHandleGenFuncQ (void) const;
397 EditFieldHandlePtr editHandleGenFuncQ (void);
398 GetFieldHandlePtr getHandleGenFuncSPlane (void) const;
399 EditFieldHandlePtr editHandleGenFuncSPlane (void);
400 GetFieldHandlePtr getHandleGenFuncTPlane (void) const;
401 EditFieldHandlePtr editHandleGenFuncTPlane (void);
402 GetFieldHandlePtr getHandleGenFuncRPlane (void) const;
403 EditFieldHandlePtr editHandleGenFuncRPlane (void);
404 GetFieldHandlePtr getHandleGenFuncQPlane (void) const;
405 EditFieldHandlePtr editHandleGenFuncQPlane (void);
406 GetFieldHandlePtr getHandleSBeacon (void) const;
407 EditFieldHandlePtr editHandleSBeacon (void);
408 GetFieldHandlePtr getHandleTBeacon (void) const;
409 EditFieldHandlePtr editHandleTBeacon (void);
410 GetFieldHandlePtr getHandleRBeacon (void) const;
411 EditFieldHandlePtr editHandleRBeacon (void);
412 GetFieldHandlePtr getHandleQBeacon (void) const;
413 EditFieldHandlePtr editHandleQBeacon (void);
414 GetFieldHandlePtr getHandleEyeModelViewMatrix (void) const;
415 EditFieldHandlePtr editHandleEyeModelViewMatrix(void);
416 GetFieldHandlePtr getHandleEyeModelViewMode (void) const;
417 EditFieldHandlePtr editHandleEyeModelViewMode(void);
419 /*! \} */
420 /*---------------------------------------------------------------------*/
421 /*! \name Sync */
422 /*! \{ */
424 #ifdef OSG_MT_CPTR_ASPECT
425 virtual void execSyncV( FieldContainer &oFrom,
426 ConstFieldMaskArg whichField,
427 AspectOffsetStore &oOffsets,
428 ConstFieldMaskArg syncMode ,
429 const UInt32 uiSyncInfo);
431 void execSync ( TexGenChunkBase *pFrom,
432 ConstFieldMaskArg whichField,
433 AspectOffsetStore &oOffsets,
434 ConstFieldMaskArg syncMode ,
435 const UInt32 uiSyncInfo);
436 #endif
438 /*! \} */
439 /*---------------------------------------------------------------------*/
440 /*! \name Edit */
441 /*! \{ */
443 /*! \} */
444 /*---------------------------------------------------------------------*/
445 /*! \name Aspect Create */
446 /*! \{ */
448 #ifdef OSG_MT_CPTR_ASPECT
449 virtual FieldContainer *createAspectCopy(
450 const FieldContainer *pRefAspect) const;
451 #endif
453 /*! \} */
454 /*---------------------------------------------------------------------*/
455 /*! \name Edit */
456 /*! \{ */
457 /*! \} */
458 /*---------------------------------------------------------------------*/
459 /*! \name Sync */
460 /*! \{ */
462 virtual void resolveLinks(void);
464 /*! \} */
465 /*========================== PRIVATE ================================*/
467 private:
468 /*---------------------------------------------------------------------*/
470 // prohibit default functions (move to 'public' if you need one)
471 void operator =(const TexGenChunkBase &source);
474 typedef TexGenChunkBase *TexGenChunkBaseP;
476 OSG_END_NAMESPACE
478 #endif /* _OSGTEXGENCHUNKBASE_H_ */