1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2006 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 _OSGCUBEMAPGENERATOR_H_
40 #define _OSGCUBEMAPGENERATOR_H_
45 #include "OSGCubeMapGeneratorBase.h"
46 #include "OSGCubeMapGeneratorStageData.h"
50 class RenderActionBase
;
52 /*! \brief CubeMapGenerator class. See \ref
53 PageGroupCubeMapGenerator for a description.
54 \ingroup GrpGroupDynamicStateGeneratorsObj
55 \ingroup GrpLibOSGGroup
59 class OSG_GROUP_DLLMAPPING CubeMapGenerator
: public CubeMapGeneratorBase
63 /*========================== PUBLIC =================================*/
67 typedef CubeMapGeneratorBase Inherited
;
68 typedef CubeMapGenerator Self
;
73 SetupTexture
= 0x0001,
85 UseStoredValue
= 0x0001,
87 UseCurrentVolumeCenter
= 0x0003,
88 UseParentsVolumeCenter
= 0x0004
91 /*---------------------------------------------------------------------*/
95 CubeMapGeneratorStageData
*initData(RenderAction
*pAction
);
98 /*---------------------------------------------------------------------*/
102 void setSize (UInt16 uiWidth
,
105 UInt16
getWidth (void);
106 UInt16
getHeight(void);
109 /*---------------------------------------------------------------------*/
113 virtual void changed(ConstFieldMaskArg whichField
,
118 /*---------------------------------------------------------------------*/
122 virtual void dump( UInt32 uiIndent
= 0,
123 const BitVector bvFlags
= 0) const;
126 /*========================= PROTECTED ===============================*/
130 // Variables should all be in CubeMapGeneratorBase.
132 /*---------------------------------------------------------------------*/
133 /*! \name Constructors */
136 CubeMapGenerator(void);
137 CubeMapGenerator(const CubeMapGenerator
&source
);
140 /*---------------------------------------------------------------------*/
141 /*! \name Destructors */
144 virtual ~CubeMapGenerator(void);
147 /*---------------------------------------------------------------------*/
151 Action::ResultE
renderEnter(Action
*action
);
152 Action::ResultE
renderLeave(Action
*action
);
155 /*---------------------------------------------------------------------*/
159 CubeMapGeneratorStageDataTransitPtr
setupStageData(RenderAction
*pAction
);
162 /*---------------------------------------------------------------------*/
166 static void initMethod(InitPhase ePhase
);
169 /*========================== 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
;
184 #include "OSGCubeMapGeneratorBase.inl"
185 #include "OSGCubeMapGenerator.inl"
187 #endif /* _OSGCUBEMAPGENERATOR_H_ */