changed: gcc8 base update
[opensg.git] / Source / System / NodeCores / Groups / DynamicStateGenerators / OSGCubeMapGenerator.h
blobc0ea0089d1ba9d789dae074c853ccdc8d35e50c7
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2006 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 _OSGCUBEMAPGENERATOR_H_
40 #define _OSGCUBEMAPGENERATOR_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGCubeMapGeneratorBase.h"
46 #include "OSGCubeMapGeneratorStageData.h"
48 OSG_BEGIN_NAMESPACE
50 class RenderActionBase;
52 /*! \brief CubeMapGenerator class. See \ref
53 PageGroupCubeMapGenerator for a description.
54 \ingroup GrpGroupDynamicStateGeneratorsObj
55 \ingroup GrpLibOSGGroup
56 \includebasedoc
59 class OSG_GROUP_DLLMAPPING CubeMapGenerator : public CubeMapGeneratorBase
61 protected:
63 /*========================== PUBLIC =================================*/
65 public:
67 typedef CubeMapGeneratorBase Inherited;
68 typedef CubeMapGenerator Self;
70 enum SetupMode
72 NoSetup = 0x0000,
73 SetupTexture = 0x0001,
74 SetupTexEnv = 0x0002,
75 SetupTexGen = 0x0004,
77 OverrideTex = 0x0010,
78 AutoTexture = 0x0011,
80 SetupAll = 0x0017
83 enum OriginMode
85 UseStoredValue = 0x0001,
86 UseBeacon = 0x0002,
87 UseCurrentVolumeCenter = 0x0003,
88 UseParentsVolumeCenter = 0x0004
91 /*---------------------------------------------------------------------*/
92 /*! \name Output */
93 /*! \{ */
95 CubeMapGeneratorStageData *initData(RenderAction *pAction);
97 /*! \} */
98 /*---------------------------------------------------------------------*/
99 /*! \name Sync */
100 /*! \{ */
102 void setSize (UInt16 uiWidth,
103 UInt16 uiHeight);
105 UInt16 getWidth (void);
106 UInt16 getHeight(void);
108 /*! \} */
109 /*---------------------------------------------------------------------*/
110 /*! \name Sync */
111 /*! \{ */
113 virtual void changed(ConstFieldMaskArg whichField,
114 UInt32 origin,
115 BitVector details );
117 /*! \} */
118 /*---------------------------------------------------------------------*/
119 /*! \name Output */
120 /*! \{ */
122 virtual void dump( UInt32 uiIndent = 0,
123 const BitVector bvFlags = 0) const;
125 /*! \} */
126 /*========================= PROTECTED ===============================*/
128 protected:
130 // Variables should all be in CubeMapGeneratorBase.
132 /*---------------------------------------------------------------------*/
133 /*! \name Constructors */
134 /*! \{ */
136 CubeMapGenerator(void);
137 CubeMapGenerator(const CubeMapGenerator &source);
139 /*! \} */
140 /*---------------------------------------------------------------------*/
141 /*! \name Destructors */
142 /*! \{ */
144 virtual ~CubeMapGenerator(void);
146 /*! \} */
147 /*---------------------------------------------------------------------*/
148 /*! \name Draw */
149 /*! \{ */
151 Action::ResultE renderEnter(Action *action);
152 Action::ResultE renderLeave(Action *action);
154 /*! \} */
155 /*---------------------------------------------------------------------*/
156 /*! \name Init */
157 /*! \{ */
159 CubeMapGeneratorStageDataTransitPtr setupStageData(RenderAction *pAction);
161 /*! \} */
162 /*---------------------------------------------------------------------*/
163 /*! \name Init */
164 /*! \{ */
166 static void initMethod(InitPhase ePhase);
168 /*! \} */
169 /*========================== PRIVATE ================================*/
171 private:
173 friend class FieldContainer;
174 friend class CubeMapGeneratorBase;
176 // prohibit default functions (move to 'public' if you need one)
177 void operator =(const CubeMapGenerator &source);
180 typedef CubeMapGenerator *CubeMapGeneratorP;
182 OSG_END_NAMESPACE
184 #include "OSGCubeMapGeneratorBase.inl"
185 #include "OSGCubeMapGenerator.inl"
187 #endif /* _OSGCUBEMAPGENERATOR_H_ */