1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
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 /*****************************************************************************\
40 *****************************************************************************
42 ** This file is automatically generated. **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
47 ** Do not change this file, changes should be done in the derived **
48 ** class CgFXTechnique
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGCGFXTECHNIQUEBASE_H_
55 #define _OSGCGFXTECHNIQUEBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGContribCgFXDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGPrimeMaterial.h" // Parent
68 #include "OSGStateFields.h" // RenderPassStates type
70 #include "OSGCgFXTechniqueFields.h"
77 //! \brief CgFXTechnique Base Class.
79 class OSG_CONTRIBCGFX_DLLMAPPING CgFXTechniqueBase
: public PrimeMaterial
83 typedef PrimeMaterial Inherited
;
84 typedef PrimeMaterial ParentContainer
;
86 typedef Inherited::TypeObject TypeObject
;
87 typedef TypeObject::InitPhase InitPhase
;
89 OSG_GEN_INTERNALPTR(CgFXTechnique
);
91 /*========================== PUBLIC =================================*/
97 RenderPassStatesFieldId
= Inherited::NextFieldId
,
98 NextFieldId
= RenderPassStatesFieldId
+ 1
101 static const OSG::BitVector RenderPassStatesFieldMask
=
102 (TypeTraits
<BitVector
>::One
<< RenderPassStatesFieldId
);
103 static const OSG::BitVector NextFieldMask
=
104 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
106 typedef MFUnrecStatePtr MFRenderPassStatesType
;
108 /*---------------------------------------------------------------------*/
109 /*! \name Class Get */
112 static FieldContainerType
&getClassType (void);
113 static UInt32
getClassTypeId (void);
114 static UInt16
getClassGroupId(void);
117 /*---------------------------------------------------------------------*/
118 /*! \name FieldContainer Get */
121 virtual FieldContainerType
&getType (void);
122 virtual const FieldContainerType
&getType (void) const;
124 virtual UInt32
getContainerSize(void) const;
127 /*---------------------------------------------------------------------*/
128 /*! \name Binary Access */
131 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
132 virtual void copyToBin (BinaryDataHandler
&pMem
,
133 ConstFieldMaskArg whichField
);
134 virtual void copyFromBin(BinaryDataHandler
&pMem
,
135 ConstFieldMaskArg whichField
);
139 /*---------------------------------------------------------------------*/
140 /*! \name Construction */
143 static CgFXTechniqueTransitPtr
create (void);
144 static CgFXTechnique
*createEmpty (void);
146 static CgFXTechniqueTransitPtr
createLocal (
147 BitVector bFlags
= FCLocal::All
);
149 static CgFXTechnique
*createEmptyLocal(
150 BitVector bFlags
= FCLocal::All
);
152 static CgFXTechniqueTransitPtr
createDependent (BitVector bFlags
);
155 /*---------------------------------------------------------------------*/
159 virtual FieldContainerTransitPtr
shallowCopy (void) const;
160 virtual FieldContainerTransitPtr
shallowCopyLocal(
161 BitVector bFlags
= FCLocal::All
) const;
162 virtual FieldContainerTransitPtr
shallowCopyDependent(
163 BitVector bFlags
) const;
166 /*========================= PROTECTED ===============================*/
170 static TypeObject _type
;
172 static void classDescInserter(TypeObject
&oType
);
173 static const Char8
*getClassname (void );
175 /*---------------------------------------------------------------------*/
179 MFUnrecStatePtr _mfRenderPassStates
;
182 /*---------------------------------------------------------------------*/
183 /*! \name Constructors */
186 CgFXTechniqueBase(void);
187 CgFXTechniqueBase(const CgFXTechniqueBase
&source
);
190 /*---------------------------------------------------------------------*/
191 /*! \name Destructors */
194 virtual ~CgFXTechniqueBase(void);
197 /*---------------------------------------------------------------------*/
198 /*! \name onCreate */
201 void onCreate(const CgFXTechnique
*source
= NULL
);
204 /*---------------------------------------------------------------------*/
205 /*! \name Generic Field Access */
208 GetFieldHandlePtr
getHandleRenderPassStates (void) const;
209 EditFieldHandlePtr
editHandleRenderPassStates(void);
212 /*---------------------------------------------------------------------*/
213 /*! \name Field Get */
216 const MFUnrecStatePtr
*getMFRenderPassStates (void) const;
219 State
* getRenderPassStates(const UInt32 index
) const;
222 /*---------------------------------------------------------------------*/
223 /*! \name Field Set */
228 /*---------------------------------------------------------------------*/
229 /*! \name Ptr MField Set */
232 void addPassState (State
* const value
);
233 void assignRenderPassStates (const MFUnrecStatePtr
&value
);
234 void clearPassStates (void );
235 void insertPassState (UInt32 uiIndex
,
236 State
* const value
);
237 void replacePassState (UInt32 uiIndex
,
238 State
* const value
);
239 void replacePassStateByObj (State
* const pOldElem
,
240 State
* const pNewElem
);
241 void subPassState (UInt32 uiIndex
);
242 void subPassStateByObj(State
* const value
);
245 /*---------------------------------------------------------------------*/
249 #ifdef OSG_MT_CPTR_ASPECT
250 virtual void execSyncV( FieldContainer
&oFrom
,
251 ConstFieldMaskArg whichField
,
252 AspectOffsetStore
&oOffsets
,
253 ConstFieldMaskArg syncMode
,
254 const UInt32 uiSyncInfo
);
256 void execSync ( CgFXTechniqueBase
*pFrom
,
257 ConstFieldMaskArg whichField
,
258 AspectOffsetStore
&oOffsets
,
259 ConstFieldMaskArg syncMode
,
260 const UInt32 uiSyncInfo
);
264 /*---------------------------------------------------------------------*/
269 /*---------------------------------------------------------------------*/
270 /*! \name Aspect Create */
273 #ifdef OSG_MT_CPTR_ASPECT
274 virtual FieldContainer
*createAspectCopy(
275 const FieldContainer
*pRefAspect
) const;
279 /*---------------------------------------------------------------------*/
283 /*---------------------------------------------------------------------*/
287 virtual void resolveLinks(void);
290 /*========================== PRIVATE ================================*/
293 /*---------------------------------------------------------------------*/
295 // prohibit default functions (move to 'public' if you need one)
296 void operator =(const CgFXTechniqueBase
&source
);
299 typedef CgFXTechniqueBase
*CgFXTechniqueBaseP
;
303 #endif /* _OSGCGFXTECHNIQUEBASE_H_ */