changed: gcc8 base update
[opensg.git] / Source / System / State / Base / OSGMaterialChunkBase.inl
blob3dd0e0861df09432cd9a1ba4fd1faa78259587f2
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 MaterialChunk!
47  **                                                                         **
48  *****************************************************************************
49 \*****************************************************************************/
51 OSG_BEGIN_NAMESPACE
55 //! access the type of the class
56 inline
57 OSG::FieldContainerType &MaterialChunkBase::getClassType(void)
59     return _type;
62 //! access the numerical type of the class
63 inline
64 OSG::UInt32 MaterialChunkBase::getClassTypeId(void)
66     return _type.getId();
69 inline
70 OSG::UInt16 MaterialChunkBase::getClassGroupId(void)
72     return _type.getGroupId();
75 /*------------------------------ get -----------------------------------*/
77 //! Get the value of the MaterialChunk::_sfDiffuse field.
79 inline
80 Color4f &MaterialChunkBase::editDiffuse(void)
82     editSField(DiffuseFieldMask);
84     return _sfDiffuse.getValue();
87 //! Get the value of the MaterialChunk::_sfDiffuse field.
88 inline
89 const Color4f &MaterialChunkBase::getDiffuse(void) const
91     return _sfDiffuse.getValue();
94 //! Set the value of the MaterialChunk::_sfDiffuse field.
95 inline
96 void MaterialChunkBase::setDiffuse(const Color4f &value)
98     editSField(DiffuseFieldMask);
100     _sfDiffuse.setValue(value);
102 //! Get the value of the MaterialChunk::_sfAmbient field.
104 inline
105 Color4f &MaterialChunkBase::editAmbient(void)
107     editSField(AmbientFieldMask);
109     return _sfAmbient.getValue();
112 //! Get the value of the MaterialChunk::_sfAmbient field.
113 inline
114 const Color4f &MaterialChunkBase::getAmbient(void) const
116     return _sfAmbient.getValue();
119 //! Set the value of the MaterialChunk::_sfAmbient field.
120 inline
121 void MaterialChunkBase::setAmbient(const Color4f &value)
123     editSField(AmbientFieldMask);
125     _sfAmbient.setValue(value);
127 //! Get the value of the MaterialChunk::_sfSpecular field.
129 inline
130 Color4f &MaterialChunkBase::editSpecular(void)
132     editSField(SpecularFieldMask);
134     return _sfSpecular.getValue();
137 //! Get the value of the MaterialChunk::_sfSpecular field.
138 inline
139 const Color4f &MaterialChunkBase::getSpecular(void) const
141     return _sfSpecular.getValue();
144 //! Set the value of the MaterialChunk::_sfSpecular field.
145 inline
146 void MaterialChunkBase::setSpecular(const Color4f &value)
148     editSField(SpecularFieldMask);
150     _sfSpecular.setValue(value);
152 //! Get the value of the MaterialChunk::_sfEmission field.
154 inline
155 Color4f &MaterialChunkBase::editEmission(void)
157     editSField(EmissionFieldMask);
159     return _sfEmission.getValue();
162 //! Get the value of the MaterialChunk::_sfEmission field.
163 inline
164 const Color4f &MaterialChunkBase::getEmission(void) const
166     return _sfEmission.getValue();
169 //! Set the value of the MaterialChunk::_sfEmission field.
170 inline
171 void MaterialChunkBase::setEmission(const Color4f &value)
173     editSField(EmissionFieldMask);
175     _sfEmission.setValue(value);
177 //! Get the value of the MaterialChunk::_sfShininess field.
179 inline
180 Real32 &MaterialChunkBase::editShininess(void)
182     editSField(ShininessFieldMask);
184     return _sfShininess.getValue();
187 //! Get the value of the MaterialChunk::_sfShininess field.
188 inline
189       Real32  MaterialChunkBase::getShininess(void) const
191     return _sfShininess.getValue();
194 //! Set the value of the MaterialChunk::_sfShininess field.
195 inline
196 void MaterialChunkBase::setShininess(const Real32 value)
198     editSField(ShininessFieldMask);
200     _sfShininess.setValue(value);
202 //! Get the value of the MaterialChunk::_sfLit field.
204 inline
205 bool &MaterialChunkBase::editLit(void)
207     editSField(LitFieldMask);
209     return _sfLit.getValue();
212 //! Get the value of the MaterialChunk::_sfLit field.
213 inline
214       bool  MaterialChunkBase::getLit(void) const
216     return _sfLit.getValue();
219 //! Set the value of the MaterialChunk::_sfLit field.
220 inline
221 void MaterialChunkBase::setLit(const bool value)
223     editSField(LitFieldMask);
225     _sfLit.setValue(value);
227 //! Get the value of the MaterialChunk::_sfColorMaterial field.
229 inline
230 GLenum &MaterialChunkBase::editColorMaterial(void)
232     editSField(ColorMaterialFieldMask);
234     return _sfColorMaterial.getValue();
237 //! Get the value of the MaterialChunk::_sfColorMaterial field.
238 inline
239 const GLenum &MaterialChunkBase::getColorMaterial(void) const
241     return _sfColorMaterial.getValue();
244 //! Set the value of the MaterialChunk::_sfColorMaterial field.
245 inline
246 void MaterialChunkBase::setColorMaterial(const GLenum &value)
248     editSField(ColorMaterialFieldMask);
250     _sfColorMaterial.setValue(value);
252 //! Get the value of the MaterialChunk::_sfBackMaterial field.
254 inline
255 bool &MaterialChunkBase::editBackMaterial(void)
257     editSField(BackMaterialFieldMask);
259     return _sfBackMaterial.getValue();
262 //! Get the value of the MaterialChunk::_sfBackMaterial field.
263 inline
264       bool  MaterialChunkBase::getBackMaterial(void) const
266     return _sfBackMaterial.getValue();
269 //! Set the value of the MaterialChunk::_sfBackMaterial field.
270 inline
271 void MaterialChunkBase::setBackMaterial(const bool value)
273     editSField(BackMaterialFieldMask);
275     _sfBackMaterial.setValue(value);
277 //! Get the value of the MaterialChunk::_sfBackDiffuse field.
279 inline
280 Color4f &MaterialChunkBase::editBackDiffuse(void)
282     editSField(BackDiffuseFieldMask);
284     return _sfBackDiffuse.getValue();
287 //! Get the value of the MaterialChunk::_sfBackDiffuse field.
288 inline
289 const Color4f &MaterialChunkBase::getBackDiffuse(void) const
291     return _sfBackDiffuse.getValue();
294 //! Set the value of the MaterialChunk::_sfBackDiffuse field.
295 inline
296 void MaterialChunkBase::setBackDiffuse(const Color4f &value)
298     editSField(BackDiffuseFieldMask);
300     _sfBackDiffuse.setValue(value);
302 //! Get the value of the MaterialChunk::_sfBackAmbient field.
304 inline
305 Color4f &MaterialChunkBase::editBackAmbient(void)
307     editSField(BackAmbientFieldMask);
309     return _sfBackAmbient.getValue();
312 //! Get the value of the MaterialChunk::_sfBackAmbient field.
313 inline
314 const Color4f &MaterialChunkBase::getBackAmbient(void) const
316     return _sfBackAmbient.getValue();
319 //! Set the value of the MaterialChunk::_sfBackAmbient field.
320 inline
321 void MaterialChunkBase::setBackAmbient(const Color4f &value)
323     editSField(BackAmbientFieldMask);
325     _sfBackAmbient.setValue(value);
327 //! Get the value of the MaterialChunk::_sfBackSpecular field.
329 inline
330 Color4f &MaterialChunkBase::editBackSpecular(void)
332     editSField(BackSpecularFieldMask);
334     return _sfBackSpecular.getValue();
337 //! Get the value of the MaterialChunk::_sfBackSpecular field.
338 inline
339 const Color4f &MaterialChunkBase::getBackSpecular(void) const
341     return _sfBackSpecular.getValue();
344 //! Set the value of the MaterialChunk::_sfBackSpecular field.
345 inline
346 void MaterialChunkBase::setBackSpecular(const Color4f &value)
348     editSField(BackSpecularFieldMask);
350     _sfBackSpecular.setValue(value);
352 //! Get the value of the MaterialChunk::_sfBackEmission field.
354 inline
355 Color4f &MaterialChunkBase::editBackEmission(void)
357     editSField(BackEmissionFieldMask);
359     return _sfBackEmission.getValue();
362 //! Get the value of the MaterialChunk::_sfBackEmission field.
363 inline
364 const Color4f &MaterialChunkBase::getBackEmission(void) const
366     return _sfBackEmission.getValue();
369 //! Set the value of the MaterialChunk::_sfBackEmission field.
370 inline
371 void MaterialChunkBase::setBackEmission(const Color4f &value)
373     editSField(BackEmissionFieldMask);
375     _sfBackEmission.setValue(value);
377 //! Get the value of the MaterialChunk::_sfBackShininess field.
379 inline
380 Real32 &MaterialChunkBase::editBackShininess(void)
382     editSField(BackShininessFieldMask);
384     return _sfBackShininess.getValue();
387 //! Get the value of the MaterialChunk::_sfBackShininess field.
388 inline
389       Real32  MaterialChunkBase::getBackShininess(void) const
391     return _sfBackShininess.getValue();
394 //! Set the value of the MaterialChunk::_sfBackShininess field.
395 inline
396 void MaterialChunkBase::setBackShininess(const Real32 value)
398     editSField(BackShininessFieldMask);
400     _sfBackShininess.setValue(value);
402 //! Get the value of the MaterialChunk::_sfBackColorMaterial field.
404 inline
405 GLenum &MaterialChunkBase::editBackColorMaterial(void)
407     editSField(BackColorMaterialFieldMask);
409     return _sfBackColorMaterial.getValue();
412 //! Get the value of the MaterialChunk::_sfBackColorMaterial field.
413 inline
414 const GLenum &MaterialChunkBase::getBackColorMaterial(void) const
416     return _sfBackColorMaterial.getValue();
419 //! Set the value of the MaterialChunk::_sfBackColorMaterial field.
420 inline
421 void MaterialChunkBase::setBackColorMaterial(const GLenum &value)
423     editSField(BackColorMaterialFieldMask);
425     _sfBackColorMaterial.setValue(value);
429 #ifdef OSG_MT_CPTR_ASPECT
430 inline
431 void MaterialChunkBase::execSync (      MaterialChunkBase *pFrom,
432                                         ConstFieldMaskArg  whichField,
433                                         AspectOffsetStore &oOffsets,
434                                         ConstFieldMaskArg  syncMode,
435                                   const UInt32             uiSyncInfo)
437     Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo);
439     if(FieldBits::NoField != (DiffuseFieldMask & whichField))
440         _sfDiffuse.syncWith(pFrom->_sfDiffuse);
442     if(FieldBits::NoField != (AmbientFieldMask & whichField))
443         _sfAmbient.syncWith(pFrom->_sfAmbient);
445     if(FieldBits::NoField != (SpecularFieldMask & whichField))
446         _sfSpecular.syncWith(pFrom->_sfSpecular);
448     if(FieldBits::NoField != (EmissionFieldMask & whichField))
449         _sfEmission.syncWith(pFrom->_sfEmission);
451     if(FieldBits::NoField != (ShininessFieldMask & whichField))
452         _sfShininess.syncWith(pFrom->_sfShininess);
454     if(FieldBits::NoField != (LitFieldMask & whichField))
455         _sfLit.syncWith(pFrom->_sfLit);
457     if(FieldBits::NoField != (ColorMaterialFieldMask & whichField))
458         _sfColorMaterial.syncWith(pFrom->_sfColorMaterial);
460     if(FieldBits::NoField != (BackMaterialFieldMask & whichField))
461         _sfBackMaterial.syncWith(pFrom->_sfBackMaterial);
463     if(FieldBits::NoField != (BackDiffuseFieldMask & whichField))
464         _sfBackDiffuse.syncWith(pFrom->_sfBackDiffuse);
466     if(FieldBits::NoField != (BackAmbientFieldMask & whichField))
467         _sfBackAmbient.syncWith(pFrom->_sfBackAmbient);
469     if(FieldBits::NoField != (BackSpecularFieldMask & whichField))
470         _sfBackSpecular.syncWith(pFrom->_sfBackSpecular);
472     if(FieldBits::NoField != (BackEmissionFieldMask & whichField))
473         _sfBackEmission.syncWith(pFrom->_sfBackEmission);
475     if(FieldBits::NoField != (BackShininessFieldMask & whichField))
476         _sfBackShininess.syncWith(pFrom->_sfBackShininess);
478     if(FieldBits::NoField != (BackColorMaterialFieldMask & whichField))
479         _sfBackColorMaterial.syncWith(pFrom->_sfBackColorMaterial);
481 #endif
484 inline
485 const Char8 *MaterialChunkBase::getClassname(void)
487     return "MaterialChunk";
489 OSG_GEN_CONTAINERPTR(MaterialChunk);
491 OSG_END_NAMESPACE