changed: gcc8 base update
[opensg.git] / Source / System / Window / Background / OSGPolygonBackgroundBase.h
blob2fd84e38a37718d3761d965258e7f632c5eecde6
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 PolygonBackground
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGPOLYGONBACKGROUNDBASE_H_
55 #define _OSGPOLYGONBACKGROUNDBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGWindowDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGTileableBackground.h" // Parent
68 #include "OSGPrimeMaterialFields.h" // Material type
69 #include "OSGVecFields.h" // TexCoords type
70 #include "OSGSysFields.h" // NormalizedX type
72 #include "OSGPolygonBackgroundFields.h"
74 OSG_BEGIN_NAMESPACE
77 class PolygonBackground;
79 //! \brief PolygonBackground Base Class.
81 class OSG_WINDOW_DLLMAPPING PolygonBackgroundBase : public TileableBackground
83 public:
85 typedef TileableBackground Inherited;
86 typedef TileableBackground ParentContainer;
88 typedef Inherited::TypeObject TypeObject;
89 typedef TypeObject::InitPhase InitPhase;
91 OSG_GEN_INTERNALPTR(PolygonBackground);
93 /*========================== PUBLIC =================================*/
95 public:
97 enum
99 MaterialFieldId = Inherited::NextFieldId,
100 TexCoordsFieldId = MaterialFieldId + 1,
101 PositionsFieldId = TexCoordsFieldId + 1,
102 NormalizedXFieldId = PositionsFieldId + 1,
103 NormalizedYFieldId = NormalizedXFieldId + 1,
104 AspectHeightFieldId = NormalizedYFieldId + 1,
105 AspectWidthFieldId = AspectHeightFieldId + 1,
106 ScaleFieldId = AspectWidthFieldId + 1,
107 CleanupFieldId = ScaleFieldId + 1,
108 NextFieldId = CleanupFieldId + 1
111 static const OSG::BitVector MaterialFieldMask =
112 (TypeTraits<BitVector>::One << MaterialFieldId);
113 static const OSG::BitVector TexCoordsFieldMask =
114 (TypeTraits<BitVector>::One << TexCoordsFieldId);
115 static const OSG::BitVector PositionsFieldMask =
116 (TypeTraits<BitVector>::One << PositionsFieldId);
117 static const OSG::BitVector NormalizedXFieldMask =
118 (TypeTraits<BitVector>::One << NormalizedXFieldId);
119 static const OSG::BitVector NormalizedYFieldMask =
120 (TypeTraits<BitVector>::One << NormalizedYFieldId);
121 static const OSG::BitVector AspectHeightFieldMask =
122 (TypeTraits<BitVector>::One << AspectHeightFieldId);
123 static const OSG::BitVector AspectWidthFieldMask =
124 (TypeTraits<BitVector>::One << AspectWidthFieldId);
125 static const OSG::BitVector ScaleFieldMask =
126 (TypeTraits<BitVector>::One << ScaleFieldId);
127 static const OSG::BitVector CleanupFieldMask =
128 (TypeTraits<BitVector>::One << CleanupFieldId);
129 static const OSG::BitVector NextFieldMask =
130 (TypeTraits<BitVector>::One << NextFieldId);
132 typedef SFUnrecPrimeMaterialPtr SFMaterialType;
133 typedef MFVec3f MFTexCoordsType;
134 typedef MFPnt2f MFPositionsType;
135 typedef SFBool SFNormalizedXType;
136 typedef SFBool SFNormalizedYType;
137 typedef SFUInt16 SFAspectHeightType;
138 typedef SFUInt16 SFAspectWidthType;
139 typedef SFReal32 SFScaleType;
140 typedef SFBool SFCleanupType;
142 /*---------------------------------------------------------------------*/
143 /*! \name Class Get */
144 /*! \{ */
146 static FieldContainerType &getClassType (void);
147 static UInt32 getClassTypeId (void);
148 static UInt16 getClassGroupId(void);
150 /*! \} */
151 /*---------------------------------------------------------------------*/
152 /*! \name FieldContainer Get */
153 /*! \{ */
155 virtual FieldContainerType &getType (void);
156 virtual const FieldContainerType &getType (void) const;
158 virtual UInt32 getContainerSize(void) const;
160 /*! \} */
161 /*---------------------------------------------------------------------*/
162 /*! \name Field Get */
163 /*! \{ */
165 const SFUnrecPrimeMaterialPtr *getSFMaterial (void) const;
166 SFUnrecPrimeMaterialPtr *editSFMaterial (void);
168 MFVec3f *editMFTexCoords (void);
169 const MFVec3f *getMFTexCoords (void) const;
171 MFPnt2f *editMFPositions (void);
172 const MFPnt2f *getMFPositions (void) const;
174 SFBool *editSFNormalizedX (void);
175 const SFBool *getSFNormalizedX (void) const;
177 SFBool *editSFNormalizedY (void);
178 const SFBool *getSFNormalizedY (void) const;
180 SFUInt16 *editSFAspectHeight (void);
181 const SFUInt16 *getSFAspectHeight (void) const;
183 SFUInt16 *editSFAspectWidth (void);
184 const SFUInt16 *getSFAspectWidth (void) const;
186 SFReal32 *editSFScale (void);
187 const SFReal32 *getSFScale (void) const;
189 SFBool *editSFCleanup (void);
190 const SFBool *getSFCleanup (void) const;
193 PrimeMaterial * getMaterial (void) const;
195 MFVec3f ::reference editTexCoords (const UInt32 index);
196 const Vec3f &getTexCoords (const UInt32 index) const;
198 MFPnt2f ::reference editPositions (const UInt32 index);
199 const Pnt2f &getPositions (const UInt32 index) const;
201 bool &editNormalizedX (void);
202 bool getNormalizedX (void) const;
204 bool &editNormalizedY (void);
205 bool getNormalizedY (void) const;
207 UInt16 &editAspectHeight (void);
208 UInt16 getAspectHeight (void) const;
210 UInt16 &editAspectWidth (void);
211 UInt16 getAspectWidth (void) const;
213 Real32 &editScale (void);
214 Real32 getScale (void) const;
216 bool &editCleanup (void);
217 bool getCleanup (void) const;
219 /*! \} */
220 /*---------------------------------------------------------------------*/
221 /*! \name Field Set */
222 /*! \{ */
224 void setMaterial (PrimeMaterial * const value);
225 void setNormalizedX (const bool value);
226 void setNormalizedY (const bool value);
227 void setAspectHeight (const UInt16 value);
228 void setAspectWidth (const UInt16 value);
229 void setScale (const Real32 value);
230 void setCleanup (const bool value);
232 /*! \} */
233 /*---------------------------------------------------------------------*/
234 /*! \name Ptr Field Set */
235 /*! \{ */
237 /*! \} */
238 /*---------------------------------------------------------------------*/
239 /*! \name Ptr MField Set */
240 /*! \{ */
242 /*! \} */
243 /*---------------------------------------------------------------------*/
244 /*! \name Binary Access */
245 /*! \{ */
247 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
248 virtual void copyToBin (BinaryDataHandler &pMem,
249 ConstFieldMaskArg whichField);
250 virtual void copyFromBin(BinaryDataHandler &pMem,
251 ConstFieldMaskArg whichField);
254 /*! \} */
255 /*---------------------------------------------------------------------*/
256 /*! \name Construction */
257 /*! \{ */
259 static PolygonBackgroundTransitPtr create (void);
260 static PolygonBackground *createEmpty (void);
262 static PolygonBackgroundTransitPtr createLocal (
263 BitVector bFlags = FCLocal::All);
265 static PolygonBackground *createEmptyLocal(
266 BitVector bFlags = FCLocal::All);
268 static PolygonBackgroundTransitPtr createDependent (BitVector bFlags);
270 /*! \} */
271 /*---------------------------------------------------------------------*/
272 /*! \name Copy */
273 /*! \{ */
275 virtual FieldContainerTransitPtr shallowCopy (void) const;
276 virtual FieldContainerTransitPtr shallowCopyLocal(
277 BitVector bFlags = FCLocal::All) const;
278 virtual FieldContainerTransitPtr shallowCopyDependent(
279 BitVector bFlags) const;
281 /*! \} */
282 /*========================= PROTECTED ===============================*/
284 protected:
286 static TypeObject _type;
288 static void classDescInserter(TypeObject &oType);
289 static const Char8 *getClassname (void );
291 /*---------------------------------------------------------------------*/
292 /*! \name Fields */
293 /*! \{ */
295 SFUnrecPrimeMaterialPtr _sfMaterial;
296 MFVec3f _mfTexCoords;
297 MFPnt2f _mfPositions;
298 SFBool _sfNormalizedX;
299 SFBool _sfNormalizedY;
300 SFUInt16 _sfAspectHeight;
301 SFUInt16 _sfAspectWidth;
302 SFReal32 _sfScale;
303 SFBool _sfCleanup;
305 /*! \} */
306 /*---------------------------------------------------------------------*/
307 /*! \name Constructors */
308 /*! \{ */
310 PolygonBackgroundBase(void);
311 PolygonBackgroundBase(const PolygonBackgroundBase &source);
313 /*! \} */
314 /*---------------------------------------------------------------------*/
315 /*! \name Destructors */
316 /*! \{ */
318 virtual ~PolygonBackgroundBase(void);
320 /*! \} */
321 /*---------------------------------------------------------------------*/
322 /*! \name onCreate */
323 /*! \{ */
325 void onCreate(const PolygonBackground *source = NULL);
327 /*! \} */
328 /*---------------------------------------------------------------------*/
329 /*! \name Generic Field Access */
330 /*! \{ */
332 GetFieldHandlePtr getHandleMaterial (void) const;
333 EditFieldHandlePtr editHandleMaterial (void);
334 GetFieldHandlePtr getHandleTexCoords (void) const;
335 EditFieldHandlePtr editHandleTexCoords (void);
336 GetFieldHandlePtr getHandlePositions (void) const;
337 EditFieldHandlePtr editHandlePositions (void);
338 GetFieldHandlePtr getHandleNormalizedX (void) const;
339 EditFieldHandlePtr editHandleNormalizedX (void);
340 GetFieldHandlePtr getHandleNormalizedY (void) const;
341 EditFieldHandlePtr editHandleNormalizedY (void);
342 GetFieldHandlePtr getHandleAspectHeight (void) const;
343 EditFieldHandlePtr editHandleAspectHeight (void);
344 GetFieldHandlePtr getHandleAspectWidth (void) const;
345 EditFieldHandlePtr editHandleAspectWidth (void);
346 GetFieldHandlePtr getHandleScale (void) const;
347 EditFieldHandlePtr editHandleScale (void);
348 GetFieldHandlePtr getHandleCleanup (void) const;
349 EditFieldHandlePtr editHandleCleanup (void);
351 /*! \} */
352 /*---------------------------------------------------------------------*/
353 /*! \name Sync */
354 /*! \{ */
356 #ifdef OSG_MT_CPTR_ASPECT
357 virtual void execSyncV( FieldContainer &oFrom,
358 ConstFieldMaskArg whichField,
359 AspectOffsetStore &oOffsets,
360 ConstFieldMaskArg syncMode ,
361 const UInt32 uiSyncInfo);
363 void execSync ( PolygonBackgroundBase *pFrom,
364 ConstFieldMaskArg whichField,
365 AspectOffsetStore &oOffsets,
366 ConstFieldMaskArg syncMode ,
367 const UInt32 uiSyncInfo);
368 #endif
370 /*! \} */
371 /*---------------------------------------------------------------------*/
372 /*! \name Edit */
373 /*! \{ */
375 /*! \} */
376 /*---------------------------------------------------------------------*/
377 /*! \name Aspect Create */
378 /*! \{ */
380 #ifdef OSG_MT_CPTR_ASPECT
381 virtual FieldContainer *createAspectCopy(
382 const FieldContainer *pRefAspect) const;
383 #endif
385 /*! \} */
386 /*---------------------------------------------------------------------*/
387 /*! \name Edit */
388 /*! \{ */
389 /*! \} */
390 /*---------------------------------------------------------------------*/
391 /*! \name Sync */
392 /*! \{ */
394 virtual void resolveLinks(void);
396 /*! \} */
397 /*========================== PRIVATE ================================*/
399 private:
400 /*---------------------------------------------------------------------*/
402 // prohibit default functions (move to 'public' if you need one)
403 void operator =(const PolygonBackgroundBase &source);
406 typedef PolygonBackgroundBase *PolygonBackgroundBaseP;
408 OSG_END_NAMESPACE
410 #endif /* _OSGPOLYGONBACKGROUNDBASE_H_ */