1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
7 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
9 \*---------------------------------------------------------------------------*/
10 /*---------------------------------------------------------------------------*\
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. *
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. *
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. *
26 \*---------------------------------------------------------------------------*/
27 /*---------------------------------------------------------------------------*\
35 \*---------------------------------------------------------------------------*/
37 /*****************************************************************************\
38 *****************************************************************************
40 ** This file is automatically generated. **
42 ** Any changes made to this file WILL be lost when it is **
43 ** regenerated, which can become necessary at any time. **
45 ** Do not change this file, changes should be done in the derived **
48 *****************************************************************************
49 \*****************************************************************************/
55 //! access the type of the class
57 OSG::FieldContainerType &LightChunkBase::getClassType(void)
62 //! access the numerical type of the class
64 OSG::UInt32 LightChunkBase::getClassTypeId(void)
70 OSG::UInt16 LightChunkBase::getClassGroupId(void)
72 return _type.getGroupId();
75 /*------------------------------ get -----------------------------------*/
77 //! Get the value of the LightChunk::_sfDiffuse field.
80 Color4f &LightChunkBase::editDiffuse(void)
82 editSField(DiffuseFieldMask);
84 return _sfDiffuse.getValue();
87 //! Get the value of the LightChunk::_sfDiffuse field.
89 const Color4f &LightChunkBase::getDiffuse(void) const
91 return _sfDiffuse.getValue();
94 //! Set the value of the LightChunk::_sfDiffuse field.
96 void LightChunkBase::setDiffuse(const Color4f &value)
98 editSField(DiffuseFieldMask);
100 _sfDiffuse.setValue(value);
102 //! Get the value of the LightChunk::_sfAmbient field.
105 Color4f &LightChunkBase::editAmbient(void)
107 editSField(AmbientFieldMask);
109 return _sfAmbient.getValue();
112 //! Get the value of the LightChunk::_sfAmbient field.
114 const Color4f &LightChunkBase::getAmbient(void) const
116 return _sfAmbient.getValue();
119 //! Set the value of the LightChunk::_sfAmbient field.
121 void LightChunkBase::setAmbient(const Color4f &value)
123 editSField(AmbientFieldMask);
125 _sfAmbient.setValue(value);
127 //! Get the value of the LightChunk::_sfSpecular field.
130 Color4f &LightChunkBase::editSpecular(void)
132 editSField(SpecularFieldMask);
134 return _sfSpecular.getValue();
137 //! Get the value of the LightChunk::_sfSpecular field.
139 const Color4f &LightChunkBase::getSpecular(void) const
141 return _sfSpecular.getValue();
144 //! Set the value of the LightChunk::_sfSpecular field.
146 void LightChunkBase::setSpecular(const Color4f &value)
148 editSField(SpecularFieldMask);
150 _sfSpecular.setValue(value);
152 //! Get the value of the LightChunk::_sfPosition field.
155 Vec4f &LightChunkBase::editPosition(void)
157 editSField(PositionFieldMask);
159 return _sfPosition.getValue();
162 //! Get the value of the LightChunk::_sfPosition field.
164 const Vec4f &LightChunkBase::getPosition(void) const
166 return _sfPosition.getValue();
169 //! Set the value of the LightChunk::_sfPosition field.
171 void LightChunkBase::setPosition(const Vec4f &value)
173 editSField(PositionFieldMask);
175 _sfPosition.setValue(value);
177 //! Get the value of the LightChunk::_sfDirection field.
180 Vec3f &LightChunkBase::editDirection(void)
182 editSField(DirectionFieldMask);
184 return _sfDirection.getValue();
187 //! Get the value of the LightChunk::_sfDirection field.
189 const Vec3f &LightChunkBase::getDirection(void) const
191 return _sfDirection.getValue();
194 //! Set the value of the LightChunk::_sfDirection field.
196 void LightChunkBase::setDirection(const Vec3f &value)
198 editSField(DirectionFieldMask);
200 _sfDirection.setValue(value);
202 //! Get the value of the LightChunk::_sfExponent field.
205 Real32 &LightChunkBase::editExponent(void)
207 editSField(ExponentFieldMask);
209 return _sfExponent.getValue();
212 //! Get the value of the LightChunk::_sfExponent field.
214 Real32 LightChunkBase::getExponent(void) const
216 return _sfExponent.getValue();
219 //! Set the value of the LightChunk::_sfExponent field.
221 void LightChunkBase::setExponent(const Real32 value)
223 editSField(ExponentFieldMask);
225 _sfExponent.setValue(value);
227 //! Get the value of the LightChunk::_sfCutoff field.
230 Real32 &LightChunkBase::editCutoff(void)
232 editSField(CutoffFieldMask);
234 return _sfCutoff.getValue();
237 //! Get the value of the LightChunk::_sfCutoff field.
239 Real32 LightChunkBase::getCutoff(void) const
241 return _sfCutoff.getValue();
244 //! Set the value of the LightChunk::_sfCutoff field.
246 void LightChunkBase::setCutoff(const Real32 value)
248 editSField(CutoffFieldMask);
250 _sfCutoff.setValue(value);
252 //! Get the value of the LightChunk::_sfConstantAttenuation field.
255 Real32 &LightChunkBase::editConstantAttenuation(void)
257 editSField(ConstantAttenuationFieldMask);
259 return _sfConstantAttenuation.getValue();
262 //! Get the value of the LightChunk::_sfConstantAttenuation field.
264 Real32 LightChunkBase::getConstantAttenuation(void) const
266 return _sfConstantAttenuation.getValue();
269 //! Set the value of the LightChunk::_sfConstantAttenuation field.
271 void LightChunkBase::setConstantAttenuation(const Real32 value)
273 editSField(ConstantAttenuationFieldMask);
275 _sfConstantAttenuation.setValue(value);
277 //! Get the value of the LightChunk::_sfLinearAttenuation field.
280 Real32 &LightChunkBase::editLinearAttenuation(void)
282 editSField(LinearAttenuationFieldMask);
284 return _sfLinearAttenuation.getValue();
287 //! Get the value of the LightChunk::_sfLinearAttenuation field.
289 Real32 LightChunkBase::getLinearAttenuation(void) const
291 return _sfLinearAttenuation.getValue();
294 //! Set the value of the LightChunk::_sfLinearAttenuation field.
296 void LightChunkBase::setLinearAttenuation(const Real32 value)
298 editSField(LinearAttenuationFieldMask);
300 _sfLinearAttenuation.setValue(value);
302 //! Get the value of the LightChunk::_sfQuadraticAttenuation field.
305 Real32 &LightChunkBase::editQuadraticAttenuation(void)
307 editSField(QuadraticAttenuationFieldMask);
309 return _sfQuadraticAttenuation.getValue();
312 //! Get the value of the LightChunk::_sfQuadraticAttenuation field.
314 Real32 LightChunkBase::getQuadraticAttenuation(void) const
316 return _sfQuadraticAttenuation.getValue();
319 //! Set the value of the LightChunk::_sfQuadraticAttenuation field.
321 void LightChunkBase::setQuadraticAttenuation(const Real32 value)
323 editSField(QuadraticAttenuationFieldMask);
325 _sfQuadraticAttenuation.setValue(value);
329 #ifdef OSG_MT_CPTR_ASPECT
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);
376 const Char8 *LightChunkBase::getClassname(void)
380 OSG_GEN_CONTAINERPTR(LightChunk);