fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / State / Base / OSGLightChunkBase.inl
blobeed2d5163d912005eccb52750c25d92e83302ac0
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 LightChunk!
47  **                                                                         **
48  *****************************************************************************
49 \*****************************************************************************/
51 OSG_BEGIN_NAMESPACE
55 //! access the type of the class
56 inline
57 OSG::FieldContainerType &LightChunkBase::getClassType(void)
59     return _type;
62 //! access the numerical type of the class
63 inline
64 OSG::UInt32 LightChunkBase::getClassTypeId(void)
66     return _type.getId();
69 inline
70 OSG::UInt16 LightChunkBase::getClassGroupId(void)
72     return _type.getGroupId();
75 /*------------------------------ get -----------------------------------*/
77 //! Get the value of the LightChunk::_sfDiffuse field.
79 inline
80 Color4f &LightChunkBase::editDiffuse(void)
82     editSField(DiffuseFieldMask);
84     return _sfDiffuse.getValue();
87 //! Get the value of the LightChunk::_sfDiffuse field.
88 inline
89 const Color4f &LightChunkBase::getDiffuse(void) const
91     return _sfDiffuse.getValue();
94 //! Set the value of the LightChunk::_sfDiffuse field.
95 inline
96 void LightChunkBase::setDiffuse(const Color4f &value)
98     editSField(DiffuseFieldMask);
100     _sfDiffuse.setValue(value);
102 //! Get the value of the LightChunk::_sfAmbient field.
104 inline
105 Color4f &LightChunkBase::editAmbient(void)
107     editSField(AmbientFieldMask);
109     return _sfAmbient.getValue();
112 //! Get the value of the LightChunk::_sfAmbient field.
113 inline
114 const Color4f &LightChunkBase::getAmbient(void) const
116     return _sfAmbient.getValue();
119 //! Set the value of the LightChunk::_sfAmbient field.
120 inline
121 void LightChunkBase::setAmbient(const Color4f &value)
123     editSField(AmbientFieldMask);
125     _sfAmbient.setValue(value);
127 //! Get the value of the LightChunk::_sfSpecular field.
129 inline
130 Color4f &LightChunkBase::editSpecular(void)
132     editSField(SpecularFieldMask);
134     return _sfSpecular.getValue();
137 //! Get the value of the LightChunk::_sfSpecular field.
138 inline
139 const Color4f &LightChunkBase::getSpecular(void) const
141     return _sfSpecular.getValue();
144 //! Set the value of the LightChunk::_sfSpecular field.
145 inline
146 void LightChunkBase::setSpecular(const Color4f &value)
148     editSField(SpecularFieldMask);
150     _sfSpecular.setValue(value);
152 //! Get the value of the LightChunk::_sfPosition field.
154 inline
155 Vec4f &LightChunkBase::editPosition(void)
157     editSField(PositionFieldMask);
159     return _sfPosition.getValue();
162 //! Get the value of the LightChunk::_sfPosition field.
163 inline
164 const Vec4f &LightChunkBase::getPosition(void) const
166     return _sfPosition.getValue();
169 //! Set the value of the LightChunk::_sfPosition field.
170 inline
171 void LightChunkBase::setPosition(const Vec4f &value)
173     editSField(PositionFieldMask);
175     _sfPosition.setValue(value);
177 //! Get the value of the LightChunk::_sfDirection field.
179 inline
180 Vec3f &LightChunkBase::editDirection(void)
182     editSField(DirectionFieldMask);
184     return _sfDirection.getValue();
187 //! Get the value of the LightChunk::_sfDirection field.
188 inline
189 const Vec3f &LightChunkBase::getDirection(void) const
191     return _sfDirection.getValue();
194 //! Set the value of the LightChunk::_sfDirection field.
195 inline
196 void LightChunkBase::setDirection(const Vec3f &value)
198     editSField(DirectionFieldMask);
200     _sfDirection.setValue(value);
202 //! Get the value of the LightChunk::_sfExponent field.
204 inline
205 Real32 &LightChunkBase::editExponent(void)
207     editSField(ExponentFieldMask);
209     return _sfExponent.getValue();
212 //! Get the value of the LightChunk::_sfExponent field.
213 inline
214       Real32  LightChunkBase::getExponent(void) const
216     return _sfExponent.getValue();
219 //! Set the value of the LightChunk::_sfExponent field.
220 inline
221 void LightChunkBase::setExponent(const Real32 value)
223     editSField(ExponentFieldMask);
225     _sfExponent.setValue(value);
227 //! Get the value of the LightChunk::_sfCutoff field.
229 inline
230 Real32 &LightChunkBase::editCutoff(void)
232     editSField(CutoffFieldMask);
234     return _sfCutoff.getValue();
237 //! Get the value of the LightChunk::_sfCutoff field.
238 inline
239       Real32  LightChunkBase::getCutoff(void) const
241     return _sfCutoff.getValue();
244 //! Set the value of the LightChunk::_sfCutoff field.
245 inline
246 void LightChunkBase::setCutoff(const Real32 value)
248     editSField(CutoffFieldMask);
250     _sfCutoff.setValue(value);
252 //! Get the value of the LightChunk::_sfConstantAttenuation field.
254 inline
255 Real32 &LightChunkBase::editConstantAttenuation(void)
257     editSField(ConstantAttenuationFieldMask);
259     return _sfConstantAttenuation.getValue();
262 //! Get the value of the LightChunk::_sfConstantAttenuation field.
263 inline
264       Real32  LightChunkBase::getConstantAttenuation(void) const
266     return _sfConstantAttenuation.getValue();
269 //! Set the value of the LightChunk::_sfConstantAttenuation field.
270 inline
271 void LightChunkBase::setConstantAttenuation(const Real32 value)
273     editSField(ConstantAttenuationFieldMask);
275     _sfConstantAttenuation.setValue(value);
277 //! Get the value of the LightChunk::_sfLinearAttenuation field.
279 inline
280 Real32 &LightChunkBase::editLinearAttenuation(void)
282     editSField(LinearAttenuationFieldMask);
284     return _sfLinearAttenuation.getValue();
287 //! Get the value of the LightChunk::_sfLinearAttenuation field.
288 inline
289       Real32  LightChunkBase::getLinearAttenuation(void) const
291     return _sfLinearAttenuation.getValue();
294 //! Set the value of the LightChunk::_sfLinearAttenuation field.
295 inline
296 void LightChunkBase::setLinearAttenuation(const Real32 value)
298     editSField(LinearAttenuationFieldMask);
300     _sfLinearAttenuation.setValue(value);
302 //! Get the value of the LightChunk::_sfQuadraticAttenuation field.
304 inline
305 Real32 &LightChunkBase::editQuadraticAttenuation(void)
307     editSField(QuadraticAttenuationFieldMask);
309     return _sfQuadraticAttenuation.getValue();
312 //! Get the value of the LightChunk::_sfQuadraticAttenuation field.
313 inline
314       Real32  LightChunkBase::getQuadraticAttenuation(void) const
316     return _sfQuadraticAttenuation.getValue();
319 //! Set the value of the LightChunk::_sfQuadraticAttenuation field.
320 inline
321 void LightChunkBase::setQuadraticAttenuation(const Real32 value)
323     editSField(QuadraticAttenuationFieldMask);
325     _sfQuadraticAttenuation.setValue(value);
329 #ifdef OSG_MT_CPTR_ASPECT
330 inline
331 void LightChunkBase::execSync (      LightChunkBase *pFrom,
332                                         ConstFieldMaskArg  whichField,
333                                         AspectOffsetStore &oOffsets,
334                                         ConstFieldMaskArg  syncMode,
335                                   const UInt32             uiSyncInfo)
337     Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo);
339     if(FieldBits::NoField != (DiffuseFieldMask & whichField))
340         _sfDiffuse.syncWith(pFrom->_sfDiffuse);
342     if(FieldBits::NoField != (AmbientFieldMask & whichField))
343         _sfAmbient.syncWith(pFrom->_sfAmbient);
345     if(FieldBits::NoField != (SpecularFieldMask & whichField))
346         _sfSpecular.syncWith(pFrom->_sfSpecular);
348     if(FieldBits::NoField != (PositionFieldMask & whichField))
349         _sfPosition.syncWith(pFrom->_sfPosition);
351     if(FieldBits::NoField != (DirectionFieldMask & whichField))
352         _sfDirection.syncWith(pFrom->_sfDirection);
354     if(FieldBits::NoField != (ExponentFieldMask & whichField))
355         _sfExponent.syncWith(pFrom->_sfExponent);
357     if(FieldBits::NoField != (CutoffFieldMask & whichField))
358         _sfCutoff.syncWith(pFrom->_sfCutoff);
360     if(FieldBits::NoField != (ConstantAttenuationFieldMask & whichField))
361         _sfConstantAttenuation.syncWith(pFrom->_sfConstantAttenuation);
363     if(FieldBits::NoField != (LinearAttenuationFieldMask & whichField))
364         _sfLinearAttenuation.syncWith(pFrom->_sfLinearAttenuation);
366     if(FieldBits::NoField != (QuadraticAttenuationFieldMask & whichField))
367         _sfQuadraticAttenuation.syncWith(pFrom->_sfQuadraticAttenuation);
369     if(FieldBits::NoField != (BeaconFieldMask & whichField))
370         _sfBeacon.syncWith(pFrom->_sfBeacon);
372 #endif
375 inline
376 const Char8 *LightChunkBase::getClassname(void)
378     return "LightChunk";
380 OSG_GEN_CONTAINERPTR(LightChunk);
382 OSG_END_NAMESPACE