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 &ParticlesBase::getClassType(void)
62 //! access the numerical type of the class
64 OSG::UInt32 ParticlesBase::getClassTypeId(void)
70 OSG::UInt16 ParticlesBase::getClassGroupId(void)
72 return _type.getGroupId();
75 /*------------------------------ get -----------------------------------*/
77 //! Get the value of the Particles::_sfMode field.
80 UInt32 &ParticlesBase::editMode(void)
82 editSField(ModeFieldMask);
84 return _sfMode.getValue();
87 //! Get the value of the Particles::_sfMode field.
89 UInt32 ParticlesBase::getMode(void) const
91 return _sfMode.getValue();
94 //! Set the value of the Particles::_sfMode field.
96 void ParticlesBase::setMode(const UInt32 value)
98 editSField(ModeFieldMask);
100 _sfMode.setValue(value);
102 //! Get the value of the Particles::_sfDrawOrder field.
105 UInt32 &ParticlesBase::editDrawOrder(void)
107 editSField(DrawOrderFieldMask);
109 return _sfDrawOrder.getValue();
112 //! Get the value of the Particles::_sfDrawOrder field.
114 UInt32 ParticlesBase::getDrawOrder(void) const
116 return _sfDrawOrder.getValue();
119 //! Set the value of the Particles::_sfDrawOrder field.
121 void ParticlesBase::setDrawOrder(const UInt32 value)
123 editSField(DrawOrderFieldMask);
125 _sfDrawOrder.setValue(value);
127 //! Get the value of the Particles::_sfDynamic field.
130 bool &ParticlesBase::editDynamic(void)
132 editSField(DynamicFieldMask);
134 return _sfDynamic.getValue();
137 //! Get the value of the Particles::_sfDynamic field.
139 bool ParticlesBase::getDynamic(void) const
141 return _sfDynamic.getValue();
144 //! Set the value of the Particles::_sfDynamic field.
146 void ParticlesBase::setDynamic(const bool value)
148 editSField(DynamicFieldMask);
150 _sfDynamic.setValue(value);
152 //! Get the value of the Particles::_sfPump field.
155 UInt32 &ParticlesBase::editPump(void)
157 editSField(PumpFieldMask);
159 return _sfPump.getValue();
162 //! Get the value of the Particles::_sfPump field.
164 UInt32 ParticlesBase::getPump(void) const
166 return _sfPump.getValue();
169 //! Set the value of the Particles::_sfPump field.
171 void ParticlesBase::setPump(const UInt32 value)
173 editSField(PumpFieldMask);
175 _sfPump.setValue(value);
177 //! Get the value of the Particles::_sfBsp field.
180 ParticleBSPTree &ParticlesBase::editBsp(void)
182 editSField(BspFieldMask);
184 return _sfBsp.getValue();
187 //! Get the value of the Particles::_sfBsp field.
189 const ParticleBSPTree &ParticlesBase::getBsp(void) const
191 return _sfBsp.getValue();
194 //! Set the value of the Particles::_sfBsp field.
196 void ParticlesBase::setBsp(const ParticleBSPTree &value)
198 editSField(BspFieldMask);
200 _sfBsp.setValue(value);
202 //! Get the value of the Particles::_sfNumParticles field.
205 Int32 &ParticlesBase::editNumParticles(void)
207 editSField(NumParticlesFieldMask);
209 return _sfNumParticles.getValue();
212 //! Get the value of the Particles::_sfNumParticles field.
214 Int32 ParticlesBase::getNumParticles(void) const
216 return _sfNumParticles.getValue();
219 //! Set the value of the Particles::_sfNumParticles field.
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.
230 const Vec3f &ParticlesBase::getSizes(const UInt32 index) const
232 return _mfSizes[index];
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.
245 Int32 ParticlesBase::getIndices(const UInt32 index) const
247 return _mfIndices[index];
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.
260 Real32 ParticlesBase::getTextureZs(const UInt32 index) const
262 return _mfTextureZs[index];
266 MFReal32 ::reference ParticlesBase::editTextureZs(const UInt32 index)
268 editMField(TextureZsFieldMask, _mfTextureZs);
270 return _mfTextureZs[index];
274 #ifdef OSG_MT_CPTR_ASPECT
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,
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,
311 if(FieldBits::NoField != (TextureZsFieldMask & whichField))
312 _mfTextureZs.syncWith(pFrom->_mfTextureZs,
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);
336 const Char8 *ParticlesBase::getClassname(void)
340 OSG_GEN_CONTAINERPTR(Particles);