changed: gcc8 base update
[opensg.git] / Source / System / NodeCores / Groups / Base / OSGLightBase.inl
blob4079c14fe17227042f509c5699b90250f233860e
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 Light!
47  **                                                                         **
48  *****************************************************************************
49 \*****************************************************************************/
51 OSG_BEGIN_NAMESPACE
55 //! access the type of the class
56 inline
57 OSG::FieldContainerType &LightBase::getClassType(void)
59     return _type;
62 //! access the numerical type of the class
63 inline
64 OSG::UInt32 LightBase::getClassTypeId(void)
66     return _type.getId();
69 inline
70 OSG::UInt16 LightBase::getClassGroupId(void)
72     return _type.getGroupId();
75 /*------------------------------ get -----------------------------------*/
77 //! Get the value of the Light::_sfAmbient field.
79 inline
80 Color4f &LightBase::editAmbient(void)
82     editSField(AmbientFieldMask);
84     return _sfAmbient.getValue();
87 //! Get the value of the Light::_sfAmbient field.
88 inline
89 const Color4f &LightBase::getAmbient(void) const
91     return _sfAmbient.getValue();
94 //! Set the value of the Light::_sfAmbient field.
95 inline
96 void LightBase::setAmbient(const Color4f &value)
98     editSField(AmbientFieldMask);
100     _sfAmbient.setValue(value);
102 //! Get the value of the Light::_sfDiffuse field.
104 inline
105 Color4f &LightBase::editDiffuse(void)
107     editSField(DiffuseFieldMask);
109     return _sfDiffuse.getValue();
112 //! Get the value of the Light::_sfDiffuse field.
113 inline
114 const Color4f &LightBase::getDiffuse(void) const
116     return _sfDiffuse.getValue();
119 //! Set the value of the Light::_sfDiffuse field.
120 inline
121 void LightBase::setDiffuse(const Color4f &value)
123     editSField(DiffuseFieldMask);
125     _sfDiffuse.setValue(value);
127 //! Get the value of the Light::_sfSpecular field.
129 inline
130 Color4f &LightBase::editSpecular(void)
132     editSField(SpecularFieldMask);
134     return _sfSpecular.getValue();
137 //! Get the value of the Light::_sfSpecular field.
138 inline
139 const Color4f &LightBase::getSpecular(void) const
141     return _sfSpecular.getValue();
144 //! Set the value of the Light::_sfSpecular field.
145 inline
146 void LightBase::setSpecular(const Color4f &value)
148     editSField(SpecularFieldMask);
150     _sfSpecular.setValue(value);
152 //! Get the value of the Light::_sfOn field.
154 inline
155 bool &LightBase::editOn(void)
157     editSField(OnFieldMask);
159     return _sfOn.getValue();
162 //! Get the value of the Light::_sfOn field.
163 inline
164       bool  LightBase::getOn(void) const
166     return _sfOn.getValue();
169 //! Set the value of the Light::_sfOn field.
170 inline
171 void LightBase::setOn(const bool value)
173     editSField(OnFieldMask);
175     _sfOn.setValue(value);
177 //! Get the value of the Light::_sfConstantAttenuation field.
179 inline
180 Real32 &LightBase::editConstantAttenuation(void)
182     editSField(ConstantAttenuationFieldMask);
184     return _sfConstantAttenuation.getValue();
187 //! Get the value of the Light::_sfConstantAttenuation field.
188 inline
189       Real32  LightBase::getConstantAttenuation(void) const
191     return _sfConstantAttenuation.getValue();
194 //! Set the value of the Light::_sfConstantAttenuation field.
195 inline
196 void LightBase::setConstantAttenuation(const Real32 value)
198     editSField(ConstantAttenuationFieldMask);
200     _sfConstantAttenuation.setValue(value);
202 //! Get the value of the Light::_sfLinearAttenuation field.
204 inline
205 Real32 &LightBase::editLinearAttenuation(void)
207     editSField(LinearAttenuationFieldMask);
209     return _sfLinearAttenuation.getValue();
212 //! Get the value of the Light::_sfLinearAttenuation field.
213 inline
214       Real32  LightBase::getLinearAttenuation(void) const
216     return _sfLinearAttenuation.getValue();
219 //! Set the value of the Light::_sfLinearAttenuation field.
220 inline
221 void LightBase::setLinearAttenuation(const Real32 value)
223     editSField(LinearAttenuationFieldMask);
225     _sfLinearAttenuation.setValue(value);
227 //! Get the value of the Light::_sfQuadraticAttenuation field.
229 inline
230 Real32 &LightBase::editQuadraticAttenuation(void)
232     editSField(QuadraticAttenuationFieldMask);
234     return _sfQuadraticAttenuation.getValue();
237 //! Get the value of the Light::_sfQuadraticAttenuation field.
238 inline
239       Real32  LightBase::getQuadraticAttenuation(void) const
241     return _sfQuadraticAttenuation.getValue();
244 //! Set the value of the Light::_sfQuadraticAttenuation field.
245 inline
246 void LightBase::setQuadraticAttenuation(const Real32 value)
248     editSField(QuadraticAttenuationFieldMask);
250     _sfQuadraticAttenuation.setValue(value);
252 //! Get the value of the Light::_sfShadowIntensity field.
254 inline
255 Real32 &LightBase::editShadowIntensity(void)
257     editSField(ShadowIntensityFieldMask);
259     return _sfShadowIntensity.getValue();
262 //! Get the value of the Light::_sfShadowIntensity field.
263 inline
264       Real32  LightBase::getShadowIntensity(void) const
266     return _sfShadowIntensity.getValue();
269 //! Set the value of the Light::_sfShadowIntensity field.
270 inline
271 void LightBase::setShadowIntensity(const Real32 value)
273     editSField(ShadowIntensityFieldMask);
275     _sfShadowIntensity.setValue(value);
277 //! Get the value of the Light::_sfShadowMode field.
279 inline
280 UInt32 &LightBase::editShadowMode(void)
282     editSField(ShadowModeFieldMask);
284     return _sfShadowMode.getValue();
287 //! Get the value of the Light::_sfShadowMode field.
288 inline
289       UInt32  LightBase::getShadowMode(void) const
291     return _sfShadowMode.getValue();
294 //! Set the value of the Light::_sfShadowMode field.
295 inline
296 void LightBase::setShadowMode(const UInt32 value)
298     editSField(ShadowModeFieldMask);
300     _sfShadowMode.setValue(value);
304 #ifdef OSG_MT_CPTR_ASPECT
305 inline
306 void LightBase::execSync (      LightBase *pFrom,
307                                         ConstFieldMaskArg  whichField,
308                                         AspectOffsetStore &oOffsets,
309                                         ConstFieldMaskArg  syncMode,
310                                   const UInt32             uiSyncInfo)
312     Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo);
314     if(FieldBits::NoField != (AmbientFieldMask & whichField))
315         _sfAmbient.syncWith(pFrom->_sfAmbient);
317     if(FieldBits::NoField != (DiffuseFieldMask & whichField))
318         _sfDiffuse.syncWith(pFrom->_sfDiffuse);
320     if(FieldBits::NoField != (SpecularFieldMask & whichField))
321         _sfSpecular.syncWith(pFrom->_sfSpecular);
323     if(FieldBits::NoField != (BeaconFieldMask & whichField))
324         _sfBeacon.syncWith(pFrom->_sfBeacon);
326     if(FieldBits::NoField != (OnFieldMask & whichField))
327         _sfOn.syncWith(pFrom->_sfOn);
329     if(FieldBits::NoField != (ConstantAttenuationFieldMask & whichField))
330         _sfConstantAttenuation.syncWith(pFrom->_sfConstantAttenuation);
332     if(FieldBits::NoField != (LinearAttenuationFieldMask & whichField))
333         _sfLinearAttenuation.syncWith(pFrom->_sfLinearAttenuation);
335     if(FieldBits::NoField != (QuadraticAttenuationFieldMask & whichField))
336         _sfQuadraticAttenuation.syncWith(pFrom->_sfQuadraticAttenuation);
338     if(FieldBits::NoField != (LightEngineFieldMask & whichField))
339         _sfLightEngine.syncWith(pFrom->_sfLightEngine);
341     if(FieldBits::NoField != (ShadowIntensityFieldMask & whichField))
342         _sfShadowIntensity.syncWith(pFrom->_sfShadowIntensity);
344     if(FieldBits::NoField != (ShadowModeFieldMask & whichField))
345         _sfShadowMode.syncWith(pFrom->_sfShadowMode);
347 #endif
350 inline
351 const Char8 *LightBase::getClassname(void)
353     return "Light";
355 OSG_GEN_CONTAINERPTR(Light);
357 OSG_END_NAMESPACE