fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / Contrib / Techniques / OSGClusterShadingStageDataBase.inl
blob42e8ffc7e2e988064b0ae9bb967c0c94c9df6aaf
1 /*---------------------------------------------------------------------------*\
2  *                                OpenSG                                     *
3  *                                                                           *
4  *                                                                           *
5  *               Copyright (C) 2000-2013 by the OpenSG Forum                 *
6  *                                                                           *
7  * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net  *
8  *                                                                           *
9 \*---------------------------------------------------------------------------*/
10 /*---------------------------------------------------------------------------*\
11  *                                License                                    *
12  *                                                                           *
13  * This library is free software; you can redistribute it and/or modify it   *
14  * under the terms of the GNU Library General Public License as published    *
15  * by the Free Software Foundation, version 2.                               *
16  *                                                                           *
17  * This library is distributed in the hope that it will be useful, but       *
18  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
20  * Library General Public License for more details.                          *
21  *                                                                           *
22  * You should have received a copy of the GNU Library General Public         *
23  * License along with this library; if not, write to the Free Software       *
24  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
25  *                                                                           *
26 \*---------------------------------------------------------------------------*/
27 /*---------------------------------------------------------------------------*\
28  *                                Changes                                    *
29  *                                                                           *
30  *                                                                           *
31  *                                                                           *
32  *                                                                           *
33  *                                                                           *
34  *                                                                           *
35 \*---------------------------------------------------------------------------*/
37 /*****************************************************************************\
38  *****************************************************************************
39  **                                                                         **
40  **                  This file is automatically generated.                  **
41  **                                                                         **
42  **          Any changes made to this file WILL be lost when it is          **
43  **           regenerated, which can become necessary at any time.          **
44  **                                                                         **
45  **     Do not change this file, changes should be done in the derived      **
46  **     class ClusterShadingStageData!
47  **                                                                         **
48  *****************************************************************************
49 \*****************************************************************************/
51 OSG_BEGIN_NAMESPACE
55 //! access the type of the class
56 inline
57 OSG::FieldContainerType &ClusterShadingStageDataBase::getClassType(void)
59     return _type;
62 //! access the numerical type of the class
63 inline
64 OSG::UInt32 ClusterShadingStageDataBase::getClassTypeId(void)
66     return _type.getId();
69 inline
70 OSG::UInt16 ClusterShadingStageDataBase::getClassGroupId(void)
72     return _type.getGroupId();
75 /*------------------------------ get -----------------------------------*/
77 //! Get the value of the ClusterShadingStageData::_sfLeft field.
79 inline
80 Int32 &ClusterShadingStageDataBase::editLeft(void)
82     editSField(LeftFieldMask);
84     return _sfLeft.getValue();
87 //! Get the value of the ClusterShadingStageData::_sfLeft field.
88 inline
89       Int32  ClusterShadingStageDataBase::getLeft(void) const
91     return _sfLeft.getValue();
94 //! Set the value of the ClusterShadingStageData::_sfLeft field.
95 inline
96 void ClusterShadingStageDataBase::setLeft(const Int32 value)
98     editSField(LeftFieldMask);
100     _sfLeft.setValue(value);
102 //! Get the value of the ClusterShadingStageData::_sfBottom field.
104 inline
105 Int32 &ClusterShadingStageDataBase::editBottom(void)
107     editSField(BottomFieldMask);
109     return _sfBottom.getValue();
112 //! Get the value of the ClusterShadingStageData::_sfBottom field.
113 inline
114       Int32  ClusterShadingStageDataBase::getBottom(void) const
116     return _sfBottom.getValue();
119 //! Set the value of the ClusterShadingStageData::_sfBottom field.
120 inline
121 void ClusterShadingStageDataBase::setBottom(const Int32 value)
123     editSField(BottomFieldMask);
125     _sfBottom.setValue(value);
127 //! Get the value of the ClusterShadingStageData::_sfWidth field.
129 inline
130 Int32 &ClusterShadingStageDataBase::editWidth(void)
132     editSField(WidthFieldMask);
134     return _sfWidth.getValue();
137 //! Get the value of the ClusterShadingStageData::_sfWidth field.
138 inline
139       Int32  ClusterShadingStageDataBase::getWidth(void) const
141     return _sfWidth.getValue();
144 //! Set the value of the ClusterShadingStageData::_sfWidth field.
145 inline
146 void ClusterShadingStageDataBase::setWidth(const Int32 value)
148     editSField(WidthFieldMask);
150     _sfWidth.setValue(value);
152 //! Get the value of the ClusterShadingStageData::_sfHeight field.
154 inline
155 Int32 &ClusterShadingStageDataBase::editHeight(void)
157     editSField(HeightFieldMask);
159     return _sfHeight.getValue();
162 //! Get the value of the ClusterShadingStageData::_sfHeight field.
163 inline
164       Int32  ClusterShadingStageDataBase::getHeight(void) const
166     return _sfHeight.getValue();
169 //! Set the value of the ClusterShadingStageData::_sfHeight field.
170 inline
171 void ClusterShadingStageDataBase::setHeight(const Int32 value)
173     editSField(HeightFieldMask);
175     _sfHeight.setValue(value);
177 //! Get the value of the ClusterShadingStageData::_sfIsOrthographicCamera field.
179 inline
180 bool &ClusterShadingStageDataBase::editIsOrthographicCamera(void)
182     editSField(IsOrthographicCameraFieldMask);
184     return _sfIsOrthographicCamera.getValue();
187 //! Get the value of the ClusterShadingStageData::_sfIsOrthographicCamera field.
188 inline
189       bool  ClusterShadingStageDataBase::getIsOrthographicCamera(void) const
191     return _sfIsOrthographicCamera.getValue();
194 //! Set the value of the ClusterShadingStageData::_sfIsOrthographicCamera field.
195 inline
196 void ClusterShadingStageDataBase::setIsOrthographicCamera(const bool value)
198     editSField(IsOrthographicCameraFieldMask);
200     _sfIsOrthographicCamera.setValue(value);
203 //! Get the value of the \a index element the ClusterShadingStageData::_mfFrustumPlanesNormals field.
204 inline
205 const Matrix &ClusterShadingStageDataBase::getFrustumPlanesNormals(const UInt32 index) const
207     return _mfFrustumPlanesNormals[index];
210 inline
211 MFMatrix           ::reference ClusterShadingStageDataBase::editFrustumPlanesNormals(const UInt32 index)
213     editMField(FrustumPlanesNormalsFieldMask, _mfFrustumPlanesNormals);
215     return _mfFrustumPlanesNormals[index];
218 //! Get the value of the \a index element the ClusterShadingStageData::_mfFrustumPlanesDistances field.
219 inline
220 const Vec4f &ClusterShadingStageDataBase::getFrustumPlanesDistances(const UInt32 index) const
222     return _mfFrustumPlanesDistances[index];
225 inline
226 MFVec4f            ::reference ClusterShadingStageDataBase::editFrustumPlanesDistances(const UInt32 index)
228     editMField(FrustumPlanesDistancesFieldMask, _mfFrustumPlanesDistances);
230     return _mfFrustumPlanesDistances[index];
234 #ifdef OSG_MT_CPTR_ASPECT
235 inline
236 void ClusterShadingStageDataBase::execSync (      ClusterShadingStageDataBase *pFrom,
237                                         ConstFieldMaskArg  whichField,
238                                         AspectOffsetStore &oOffsets,
239                                         ConstFieldMaskArg  syncMode,
240                                   const UInt32             uiSyncInfo)
242     Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo);
244     if(FieldBits::NoField != (FrustDispDatUBOChunkFieldMask & whichField))
245         _sfFrustDispDatUBOChunk.syncWith(pFrom->_sfFrustDispDatUBOChunk);
247     if(FieldBits::NoField != (CullDispDatUBOChunkFieldMask & whichField))
248         _sfCullDispDatUBOChunk.syncWith(pFrom->_sfCullDispDatUBOChunk);
250     if(FieldBits::NoField != (CullClusterDatUBOChunkFieldMask & whichField))
251         _sfCullClusterDatUBOChunk.syncWith(pFrom->_sfCullClusterDatUBOChunk);
253     if(FieldBits::NoField != (CullLightIndexCounterSSBOChunkFieldMask & whichField))
254         _sfCullLightIndexCounterSSBOChunk.syncWith(pFrom->_sfCullLightIndexCounterSSBOChunk);
256     if(FieldBits::NoField != (FrustumsSSBOChunkFieldMask & whichField))
257         _sfFrustumsSSBOChunk.syncWith(pFrom->_sfFrustumsSSBOChunk);
259     if(FieldBits::NoField != (AffectedLightIndexListSSBOChunkFieldMask & whichField))
260         _sfAffectedLightIndexListSSBOChunk.syncWith(pFrom->_sfAffectedLightIndexListSSBOChunk);
262     if(FieldBits::NoField != (LightIndexListSSBOChunkFieldMask & whichField))
263         _sfLightIndexListSSBOChunk.syncWith(pFrom->_sfLightIndexListSSBOChunk);
265     if(FieldBits::NoField != (FrustChunkMatFieldMask & whichField))
266         _sfFrustChunkMat.syncWith(pFrom->_sfFrustChunkMat);
268     if(FieldBits::NoField != (CullChunkMatFieldMask & whichField))
269         _sfCullChunkMat.syncWith(pFrom->_sfCullChunkMat);
271     if(FieldBits::NoField != (LightGridImageFieldMask & whichField))
272         _sfLightGridImage.syncWith(pFrom->_sfLightGridImage);
274     if(FieldBits::NoField != (LightGridTexObjChunkFieldMask & whichField))
275         _sfLightGridTexObjChunk.syncWith(pFrom->_sfLightGridTexObjChunk);
277     if(FieldBits::NoField != (LightGridTexImgChunkCSFieldMask & whichField))
278         _sfLightGridTexImgChunkCS.syncWith(pFrom->_sfLightGridTexImgChunkCS);
280     if(FieldBits::NoField != (LightGridTexImgChunkFSFieldMask & whichField))
281         _sfLightGridTexImgChunkFS.syncWith(pFrom->_sfLightGridTexImgChunkFS);
283     if(FieldBits::NoField != (FrustumPlanesNormalsFieldMask & whichField))
284         _mfFrustumPlanesNormals.syncWith(pFrom->_mfFrustumPlanesNormals,
285                                 syncMode,
286                                 uiSyncInfo,
287                                 oOffsets);
289     if(FieldBits::NoField != (FrustumPlanesDistancesFieldMask & whichField))
290         _mfFrustumPlanesDistances.syncWith(pFrom->_mfFrustumPlanesDistances,
291                                 syncMode,
292                                 uiSyncInfo,
293                                 oOffsets);
295     if(FieldBits::NoField != (LeftFieldMask & whichField))
296         _sfLeft.syncWith(pFrom->_sfLeft);
298     if(FieldBits::NoField != (BottomFieldMask & whichField))
299         _sfBottom.syncWith(pFrom->_sfBottom);
301     if(FieldBits::NoField != (WidthFieldMask & whichField))
302         _sfWidth.syncWith(pFrom->_sfWidth);
304     if(FieldBits::NoField != (HeightFieldMask & whichField))
305         _sfHeight.syncWith(pFrom->_sfHeight);
307     if(FieldBits::NoField != (IsOrthographicCameraFieldMask & whichField))
308         _sfIsOrthographicCamera.syncWith(pFrom->_sfIsOrthographicCamera);
310 #endif
313 inline
314 const Char8 *ClusterShadingStageDataBase::getClassname(void)
316     return "ClusterShadingStageData";
318 OSG_GEN_CONTAINERPTR(ClusterShadingStageData);
320 OSG_END_NAMESPACE