changed: gcc8 base update
[opensg.git] / Source / System / NodeCores / Drawables / Particles / OSGParticlesBase.inl
blob21167f71cebb54e02d172d479dfda957c8a3f08e
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 Particles!
47  **                                                                         **
48  *****************************************************************************
49 \*****************************************************************************/
51 OSG_BEGIN_NAMESPACE
55 //! access the type of the class
56 inline
57 OSG::FieldContainerType &ParticlesBase::getClassType(void)
59     return _type;
62 //! access the numerical type of the class
63 inline
64 OSG::UInt32 ParticlesBase::getClassTypeId(void)
66     return _type.getId();
69 inline
70 OSG::UInt16 ParticlesBase::getClassGroupId(void)
72     return _type.getGroupId();
75 /*------------------------------ get -----------------------------------*/
77 //! Get the value of the Particles::_sfMode field.
79 inline
80 UInt32 &ParticlesBase::editMode(void)
82     editSField(ModeFieldMask);
84     return _sfMode.getValue();
87 //! Get the value of the Particles::_sfMode field.
88 inline
89       UInt32  ParticlesBase::getMode(void) const
91     return _sfMode.getValue();
94 //! Set the value of the Particles::_sfMode field.
95 inline
96 void ParticlesBase::setMode(const UInt32 value)
98     editSField(ModeFieldMask);
100     _sfMode.setValue(value);
102 //! Get the value of the Particles::_sfDrawOrder field.
104 inline
105 UInt32 &ParticlesBase::editDrawOrder(void)
107     editSField(DrawOrderFieldMask);
109     return _sfDrawOrder.getValue();
112 //! Get the value of the Particles::_sfDrawOrder field.
113 inline
114       UInt32  ParticlesBase::getDrawOrder(void) const
116     return _sfDrawOrder.getValue();
119 //! Set the value of the Particles::_sfDrawOrder field.
120 inline
121 void ParticlesBase::setDrawOrder(const UInt32 value)
123     editSField(DrawOrderFieldMask);
125     _sfDrawOrder.setValue(value);
127 //! Get the value of the Particles::_sfDynamic field.
129 inline
130 bool &ParticlesBase::editDynamic(void)
132     editSField(DynamicFieldMask);
134     return _sfDynamic.getValue();
137 //! Get the value of the Particles::_sfDynamic field.
138 inline
139       bool  ParticlesBase::getDynamic(void) const
141     return _sfDynamic.getValue();
144 //! Set the value of the Particles::_sfDynamic field.
145 inline
146 void ParticlesBase::setDynamic(const bool value)
148     editSField(DynamicFieldMask);
150     _sfDynamic.setValue(value);
152 //! Get the value of the Particles::_sfPump field.
154 inline
155 UInt32 &ParticlesBase::editPump(void)
157     editSField(PumpFieldMask);
159     return _sfPump.getValue();
162 //! Get the value of the Particles::_sfPump field.
163 inline
164       UInt32  ParticlesBase::getPump(void) const
166     return _sfPump.getValue();
169 //! Set the value of the Particles::_sfPump field.
170 inline
171 void ParticlesBase::setPump(const UInt32 value)
173     editSField(PumpFieldMask);
175     _sfPump.setValue(value);
177 //! Get the value of the Particles::_sfBsp field.
179 inline
180 ParticleBSPTree &ParticlesBase::editBsp(void)
182     editSField(BspFieldMask);
184     return _sfBsp.getValue();
187 //! Get the value of the Particles::_sfBsp field.
188 inline
189 const ParticleBSPTree &ParticlesBase::getBsp(void) const
191     return _sfBsp.getValue();
194 //! Set the value of the Particles::_sfBsp field.
195 inline
196 void ParticlesBase::setBsp(const ParticleBSPTree &value)
198     editSField(BspFieldMask);
200     _sfBsp.setValue(value);
202 //! Get the value of the Particles::_sfNumParticles field.
204 inline
205 Int32 &ParticlesBase::editNumParticles(void)
207     editSField(NumParticlesFieldMask);
209     return _sfNumParticles.getValue();
212 //! Get the value of the Particles::_sfNumParticles field.
213 inline
214       Int32  ParticlesBase::getNumParticles(void) const
216     return _sfNumParticles.getValue();
219 //! Set the value of the Particles::_sfNumParticles field.
220 inline
221 void ParticlesBase::setNumParticles(const Int32 value)
223     editSField(NumParticlesFieldMask);
225     _sfNumParticles.setValue(value);
228 //! Get the value of the \a index element the Particles::_mfSizes field.
229 inline
230 const Vec3f &ParticlesBase::getSizes(const UInt32 index) const
232     return _mfSizes[index];
235 inline
236 MFVec3f            ::reference ParticlesBase::editSizes(const UInt32 index)
238     editMField(SizesFieldMask, _mfSizes);
240     return _mfSizes[index];
243 //! Get the value of the \a index element the Particles::_mfIndices field.
244 inline
245       Int32  ParticlesBase::getIndices(const UInt32 index) const
247     return _mfIndices[index];
250 inline
251 MFInt32            ::reference ParticlesBase::editIndices(const UInt32 index)
253     editMField(IndicesFieldMask, _mfIndices);
255     return _mfIndices[index];
258 //! Get the value of the \a index element the Particles::_mfTextureZs field.
259 inline
260       Real32  ParticlesBase::getTextureZs(const UInt32 index) const
262     return _mfTextureZs[index];
265 inline
266 MFReal32           ::reference ParticlesBase::editTextureZs(const UInt32 index)
268     editMField(TextureZsFieldMask, _mfTextureZs);
270     return _mfTextureZs[index];
274 #ifdef OSG_MT_CPTR_ASPECT
275 inline
276 void ParticlesBase::execSync (      ParticlesBase *pFrom,
277                                         ConstFieldMaskArg  whichField,
278                                         AspectOffsetStore &oOffsets,
279                                         ConstFieldMaskArg  syncMode,
280                                   const UInt32             uiSyncInfo)
282     Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo);
284     if(FieldBits::NoField != (ModeFieldMask & whichField))
285         _sfMode.syncWith(pFrom->_sfMode);
287     if(FieldBits::NoField != (PositionsFieldMask & whichField))
288         _sfPositions.syncWith(pFrom->_sfPositions);
290     if(FieldBits::NoField != (SizesFieldMask & whichField))
291         _mfSizes.syncWith(pFrom->_mfSizes,
292                                 syncMode,
293                                 uiSyncInfo,
294                                 oOffsets);
296     if(FieldBits::NoField != (SecPositionsFieldMask & whichField))
297         _sfSecPositions.syncWith(pFrom->_sfSecPositions);
299     if(FieldBits::NoField != (ColorsFieldMask & whichField))
300         _sfColors.syncWith(pFrom->_sfColors);
302     if(FieldBits::NoField != (NormalsFieldMask & whichField))
303         _sfNormals.syncWith(pFrom->_sfNormals);
305     if(FieldBits::NoField != (IndicesFieldMask & whichField))
306         _mfIndices.syncWith(pFrom->_mfIndices,
307                                 syncMode,
308                                 uiSyncInfo,
309                                 oOffsets);
311     if(FieldBits::NoField != (TextureZsFieldMask & whichField))
312         _mfTextureZs.syncWith(pFrom->_mfTextureZs,
313                                 syncMode,
314                                 uiSyncInfo,
315                                 oOffsets);
317     if(FieldBits::NoField != (DrawOrderFieldMask & whichField))
318         _sfDrawOrder.syncWith(pFrom->_sfDrawOrder);
320     if(FieldBits::NoField != (DynamicFieldMask & whichField))
321         _sfDynamic.syncWith(pFrom->_sfDynamic);
323     if(FieldBits::NoField != (PumpFieldMask & whichField))
324         _sfPump.syncWith(pFrom->_sfPump);
326     if(FieldBits::NoField != (BspFieldMask & whichField))
327         _sfBsp.syncWith(pFrom->_sfBsp);
329     if(FieldBits::NoField != (NumParticlesFieldMask & whichField))
330         _sfNumParticles.syncWith(pFrom->_sfNumParticles);
332 #endif
335 inline
336 const Char8 *ParticlesBase::getClassname(void)
338     return "Particles";
340 OSG_GEN_CONTAINERPTR(Particles);
342 OSG_END_NAMESPACE