1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 /*****************************************************************************\
40 *****************************************************************************
42 ** This file is automatically generated. **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
47 ** Do not change this file, changes should be done in the derived **
50 *****************************************************************************
51 \*****************************************************************************/
57 #pragma warning(disable: 4355) // turn off 'this' : used in base member initializer list warning
58 #pragma warning(disable: 4290) // disable exception specification warning
61 #include "OSGConfig.h"
65 #include "OSGGeoVectorProperty.h" // Positions Class
67 #include "OSGParticlesBase.h"
68 #include "OSGParticles.h"
70 #include <boost/bind.hpp>
74 /***************************************************************************\
76 \***************************************************************************/
78 /*! \class OSG::Particles
79 See \ref PageSystemParticles for details.
82 /***************************************************************************\
83 * Field Documentation *
84 \***************************************************************************/
86 /*! \var UInt32 ParticlesBase::_sfMode
87 The particle mode, see OSG::Particles::modeE for options.
90 /*! \var GeoVectorProperty * ParticlesBase::_sfPositions
91 The positions of the particles. This is the primary defining
92 information for a particle.
95 /*! \var Vec3f ParticlesBase::_mfSizes
96 The particle sizes. If not set (1,1,1) will be used, if only one entry
97 is set, it will be used for all particles. If the number of sizes if
98 equal to the number of positions every particle will get its own size.
99 Most modes only use the X coordinate of the vector. Particles with
100 size[0] == 0 are ignored.
103 /*! \var GeoVectorProperty * ParticlesBase::_sfSecPositions
104 The secondary position of the particle. This information is only used
105 by a few rendering modes, e.g. the streak mode. Usually it represents
106 the particle's last position.
109 /*! \var GeoVectorProperty * ParticlesBase::_sfColors
110 The particle colors (optional).
113 /*! \var GeoVectorProperty * ParticlesBase::_sfNormals
114 Most particles will be automatically aligned to the view
115 direction. If normals are set they will be used to define the
116 direction the particles are facing.
119 /*! \var Int32 ParticlesBase::_mfIndices
120 Indices for the particles. Useful to select subsets of all particles for
124 /*! \var Real32 ParticlesBase::_mfTextureZs
125 The texture z coordinate of the particles. Useful in conjunction with 3D
126 textures to use different texture images on different particles.
129 /*! \var UInt32 ParticlesBase::_sfDrawOrder
130 Define an optional sorting on the particles, see OSG::Particles::DrawOrderE
131 for variants. Default is unordered.
134 /*! \var bool ParticlesBase::_sfDynamic
135 Hint to tell the system whether particles are expected to change position or
136 not. Is used to speed up sorting.
139 /*! \var UInt32 ParticlesBase::_sfPump
143 /*! \var ParticleBSPTree ParticlesBase::_sfBsp
147 /*! \var Int32 ParticlesBase::_sfNumParticles
148 Optional number of particles to use. If set to -1, all the particles in
149 pos, or indices if set, will be used.
153 /***************************************************************************\
154 * FieldType/FieldTrait Instantiation *
155 \***************************************************************************/
157 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
158 PointerType FieldTraits
<Particles
*, nsOSG
>::_type(
160 "MaterialDrawablePtr",
161 Particles::getClassType(),
165 OSG_FIELDTRAITS_GETTYPE_NS(Particles
*, nsOSG
)
167 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
171 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField
,
175 /***************************************************************************\
176 * Field Description *
177 \***************************************************************************/
179 void ParticlesBase::classDescInserter(TypeObject
&oType
)
181 FieldDescriptionBase
*pDesc
= NULL
;
184 pDesc
= new SFUInt32::Description(
185 SFUInt32::getClassType(),
187 "The particle mode, see OSG::Particles::modeE for options.\n",
188 ModeFieldId
, ModeFieldMask
,
190 (Field::SFDefaultFlags
| Field::FStdAccess
),
191 static_cast<FieldEditMethodSig
>(&Particles::editHandleMode
),
192 static_cast<FieldGetMethodSig
>(&Particles::getHandleMode
));
194 oType
.addInitialDesc(pDesc
);
196 pDesc
= new SFUnrecChildGeoVectorPropertyPtr::Description(
197 SFUnrecChildGeoVectorPropertyPtr::getClassType(),
199 "The positions of the particles. This is the primary defining\n"
200 "information for a particle.\n",
201 PositionsFieldId
, PositionsFieldMask
,
203 (Field::SFDefaultFlags
| Field::FStdAccess
),
204 static_cast<FieldEditMethodSig
>(&Particles::editHandlePositions
),
205 static_cast<FieldGetMethodSig
>(&Particles::getHandlePositions
));
207 oType
.addInitialDesc(pDesc
);
209 pDesc
= new MFVec3f::Description(
210 MFVec3f::getClassType(),
212 "The particle sizes. If not set (1,1,1) will be used, if only one entry\n"
213 "is set, it will be used for all particles. If the number of sizes if\n"
214 "equal to the number of positions every particle will get its own size.\n"
215 "Most modes only use the X coordinate of the vector. Particles with \n"
216 "size[0] == 0 are ignored.\n",
217 SizesFieldId
, SizesFieldMask
,
219 (Field::MFDefaultFlags
| Field::FStdAccess
),
220 static_cast<FieldEditMethodSig
>(&Particles::editHandleSizes
),
221 static_cast<FieldGetMethodSig
>(&Particles::getHandleSizes
));
223 oType
.addInitialDesc(pDesc
);
225 pDesc
= new SFUnrecChildGeoVectorPropertyPtr::Description(
226 SFUnrecChildGeoVectorPropertyPtr::getClassType(),
228 "The secondary position of the particle. This information is only used\n"
229 "by a few rendering modes, e.g. the streak mode. Usually it represents\n"
230 "the particle's last position.\n",
231 SecPositionsFieldId
, SecPositionsFieldMask
,
233 (Field::SFDefaultFlags
| Field::FStdAccess
),
234 static_cast<FieldEditMethodSig
>(&Particles::editHandleSecPositions
),
235 static_cast<FieldGetMethodSig
>(&Particles::getHandleSecPositions
));
237 oType
.addInitialDesc(pDesc
);
239 pDesc
= new SFUnrecChildGeoVectorPropertyPtr::Description(
240 SFUnrecChildGeoVectorPropertyPtr::getClassType(),
242 "The particle colors (optional).\n",
243 ColorsFieldId
, ColorsFieldMask
,
245 (Field::SFDefaultFlags
| Field::FStdAccess
),
246 static_cast<FieldEditMethodSig
>(&Particles::editHandleColors
),
247 static_cast<FieldGetMethodSig
>(&Particles::getHandleColors
));
249 oType
.addInitialDesc(pDesc
);
251 pDesc
= new SFUnrecChildGeoVectorPropertyPtr::Description(
252 SFUnrecChildGeoVectorPropertyPtr::getClassType(),
254 "Most particles will be automatically aligned to the view\n"
255 "direction. If normals are set they will be used to define the\n"
256 "direction the particles are facing.\n",
257 NormalsFieldId
, NormalsFieldMask
,
259 (Field::SFDefaultFlags
| Field::FStdAccess
),
260 static_cast<FieldEditMethodSig
>(&Particles::editHandleNormals
),
261 static_cast<FieldGetMethodSig
>(&Particles::getHandleNormals
));
263 oType
.addInitialDesc(pDesc
);
265 pDesc
= new MFInt32::Description(
266 MFInt32::getClassType(),
268 "Indices for the particles. Useful to select subsets of all particles for \n"
270 IndicesFieldId
, IndicesFieldMask
,
272 (Field::MFDefaultFlags
| Field::FStdAccess
),
273 static_cast<FieldEditMethodSig
>(&Particles::editHandleIndices
),
274 static_cast<FieldGetMethodSig
>(&Particles::getHandleIndices
));
276 oType
.addInitialDesc(pDesc
);
278 pDesc
= new MFReal32::Description(
279 MFReal32::getClassType(),
281 "The texture z coordinate of the particles. Useful in conjunction with 3D \n"
282 "textures to use different texture images on different particles.\n",
283 TextureZsFieldId
, TextureZsFieldMask
,
285 (Field::MFDefaultFlags
| Field::FStdAccess
),
286 static_cast<FieldEditMethodSig
>(&Particles::editHandleTextureZs
),
287 static_cast<FieldGetMethodSig
>(&Particles::getHandleTextureZs
));
289 oType
.addInitialDesc(pDesc
);
291 pDesc
= new SFUInt32::Description(
292 SFUInt32::getClassType(),
294 "Define an optional sorting on the particles, see OSG::Particles::DrawOrderE\n"
295 "for variants. Default is unordered.\n",
296 DrawOrderFieldId
, DrawOrderFieldMask
,
298 (Field::SFDefaultFlags
| Field::FStdAccess
),
299 static_cast<FieldEditMethodSig
>(&Particles::editHandleDrawOrder
),
300 static_cast<FieldGetMethodSig
>(&Particles::getHandleDrawOrder
));
302 oType
.addInitialDesc(pDesc
);
304 pDesc
= new SFBool::Description(
305 SFBool::getClassType(),
307 "Hint to tell the system whether particles are expected to change position or\n"
308 "not. Is used to speed up sorting.\n",
309 DynamicFieldId
, DynamicFieldMask
,
311 (Field::SFDefaultFlags
| Field::FStdAccess
),
312 static_cast<FieldEditMethodSig
>(&Particles::editHandleDynamic
),
313 static_cast<FieldGetMethodSig
>(&Particles::getHandleDynamic
));
315 oType
.addInitialDesc(pDesc
);
317 pDesc
= new SFUInt32::Description(
318 SFUInt32::getClassType(),
321 PumpFieldId
, PumpFieldMask
,
323 (Field::SFDefaultFlags
| Field::FStdAccess
),
324 static_cast<FieldEditMethodSig
>(&Particles::editHandlePump
),
325 static_cast<FieldGetMethodSig
>(&Particles::getHandlePump
));
327 oType
.addInitialDesc(pDesc
);
329 pDesc
= new SFParticleBSPTree::Description(
330 SFParticleBSPTree::getClassType(),
333 BspFieldId
, BspFieldMask
,
335 (Field::SFDefaultFlags
| Field::FStdAccess
),
336 static_cast<FieldEditMethodSig
>(&Particles::editHandleBsp
),
337 static_cast<FieldGetMethodSig
>(&Particles::getHandleBsp
));
339 oType
.addInitialDesc(pDesc
);
341 pDesc
= new SFInt32::Description(
342 SFInt32::getClassType(),
344 "Optional number of particles to use. If set to -1, all the particles in \n"
345 "pos, or indices if set, will be used.\n",
346 NumParticlesFieldId
, NumParticlesFieldMask
,
348 (Field::SFDefaultFlags
| Field::FStdAccess
),
349 static_cast<FieldEditMethodSig
>(&Particles::editHandleNumParticles
),
350 static_cast<FieldGetMethodSig
>(&Particles::getHandleNumParticles
));
352 oType
.addInitialDesc(pDesc
);
356 ParticlesBase::TypeObject
ParticlesBase::_type(
357 ParticlesBase::getClassname(),
358 Inherited::getClassname(),
361 reinterpret_cast<PrototypeCreateF
>(&ParticlesBase::createEmptyLocal
),
362 reinterpret_cast<InitContainerF
>(&Particles::initMethod
),
363 reinterpret_cast<ExitContainerF
>(&Particles::exitMethod
),
364 reinterpret_cast<InitalInsertDescFunc
>(
365 reinterpret_cast<void *>(&Particles::classDescInserter
)),
368 "<?xml version=\"1.0\"?>\n"
371 " name=\"Particles\"\n"
372 " parent=\"MaterialDrawable\"\n"
373 " library=\"Drawable\"\n"
374 " pointerfieldtypes=\"both\"\n"
375 " structure=\"concrete\"\n"
376 " systemcomponent=\"true\"\n"
377 " parentsystemcomponent=\"true\"\n"
378 " docGroupBase=\"GrpDrawablesParticles\"\n"
381 " See \\ref PageSystemParticles for details.\n"
384 "\t type=\"UInt32\"\n"
385 "\t cardinality=\"single\"\n"
386 "\t visibility=\"external\"\n"
387 "\t defaultValue=\"2\"\n"
388 "\t access=\"public\"\n"
390 "\tThe particle mode, see OSG::Particles::modeE for options.\n"
393 "\t name=\"positions\"\n"
394 "\t type=\"GeoVectorProperty\"\n"
395 "\t cardinality=\"single\"\n"
396 "\t visibility=\"external\"\n"
397 "\t access=\"public\"\n"
398 " category=\"childpointer\"\n"
399 " childParentType=\"FieldContainer\"\n"
400 " linkParentField=\"Parents\"\n"
402 " The positions of the particles. This is the primary defining\n"
403 " information for a particle.\n"
406 "\t name=\"sizes\"\n"
407 "\t type=\"Vec3f\"\n"
408 "\t cardinality=\"multi\"\n"
409 "\t visibility=\"external\"\n"
410 "\t access=\"public\"\n"
412 " The particle sizes. If not set (1,1,1) will be used, if only one entry\n"
413 " is set, it will be used for all particles. If the number of sizes if\n"
414 " equal to the number of positions every particle will get its own size.\n"
415 " Most modes only use the X coordinate of the vector. Particles with \n"
416 " size[0] == 0 are ignored.\n"
419 "\t name=\"secPositions\"\n"
420 "\t type=\"GeoVectorProperty\"\n"
421 "\t cardinality=\"single\"\n"
422 "\t visibility=\"external\"\n"
423 "\t access=\"public\"\n"
424 " category=\"childpointer\"\n"
425 " childParentType=\"FieldContainer\"\n"
426 " linkParentField=\"Parents\"\n"
428 " The secondary position of the particle. This information is only used\n"
429 " by a few rendering modes, e.g. the streak mode. Usually it represents\n"
430 " the particle's last position.\n"
433 "\t name=\"colors\"\n"
434 "\t type=\"GeoVectorProperty\"\n"
435 "\t cardinality=\"single\"\n"
436 "\t visibility=\"external\"\n"
437 "\t access=\"public\"\n"
438 " category=\"childpointer\"\n"
439 " childParentType=\"FieldContainer\"\n"
440 " linkParentField=\"Parents\"\n"
442 "\tThe particle colors (optional).\n"
445 "\t name=\"normals\"\n"
446 "\t type=\"GeoVectorProperty\"\n"
447 "\t cardinality=\"single\"\n"
448 "\t visibility=\"external\"\n"
449 "\t access=\"public\"\n"
450 " category=\"childpointer\"\n"
451 " childParentType=\"FieldContainer\"\n"
452 " linkParentField=\"Parents\"\n"
454 " Most particles will be automatically aligned to the view\n"
455 " direction. If normals are set they will be used to define the\n"
456 " direction the particles are facing.\n"
459 "\t name=\"indices\"\n"
460 "\t type=\"Int32\"\n"
461 "\t cardinality=\"multi\"\n"
462 "\t visibility=\"external\"\n"
463 "\t access=\"public\"\n"
465 " Indices for the particles. Useful to select subsets of all particles for \n"
469 "\t name=\"textureZs\"\n"
470 "\t type=\"Real32\"\n"
471 "\t cardinality=\"multi\"\n"
472 "\t visibility=\"external\"\n"
473 "\t access=\"public\"\n"
475 " The texture z coordinate of the particles. Useful in conjunction with 3D \n"
476 " textures to use different texture images on different particles.\n"
479 "\t name=\"drawOrder\"\n"
480 "\t type=\"UInt32\"\n"
481 "\t cardinality=\"single\"\n"
482 "\t visibility=\"external\"\n"
483 "\t defaultValue=\"0\"\n"
484 "\t access=\"public\"\n"
486 " Define an optional sorting on the particles, see OSG::Particles::DrawOrderE\n"
487 " for variants. Default is unordered.\n"
490 "\t name=\"dynamic\"\n"
492 "\t cardinality=\"single\"\n"
493 "\t visibility=\"external\"\n"
494 "\t defaultValue=\"true\"\n"
495 "\t access=\"public\"\n"
497 " Hint to tell the system whether particles are expected to change position or\n"
498 " not. Is used to speed up sorting.\n"
502 "\t type=\"UInt32\"\n"
503 "\t cardinality=\"single\"\n"
504 "\t visibility=\"internal\"\n"
505 "\t access=\"protected\"\n"
510 "\t type=\"ParticleBSPTree\"\n"
511 "\t cardinality=\"single\"\n"
512 "\t visibility=\"external\"\n"
513 "\t typeHeader=\"OSGParticleBSP.h\"\n"
514 " fieldHeader=\"OSGParticleBSP.h\"\n"
515 "\t access=\"public\"\n"
519 "\t name=\"numParticles\"\n"
520 "\t type=\"Int32\"\n"
521 "\t cardinality=\"single\"\n"
522 "\t visibility=\"external\"\n"
523 "\t access=\"public\"\n"
524 " defaultValue=\"-1\"\n"
526 " Optional number of particles to use. If set to -1, all the particles in \n"
527 " pos, or indices if set, will be used.\n"
529 "</FieldContainer>\n",
530 "See \\ref PageSystemParticles for details.\n"
533 /*------------------------------ get -----------------------------------*/
535 FieldContainerType
&ParticlesBase::getType(void)
540 const FieldContainerType
&ParticlesBase::getType(void) const
545 UInt32
ParticlesBase::getContainerSize(void) const
547 return sizeof(Particles
);
550 /*------------------------- decorator get ------------------------------*/
553 SFUInt32
*ParticlesBase::editSFMode(void)
555 editSField(ModeFieldMask
);
560 const SFUInt32
*ParticlesBase::getSFMode(void) const
566 //! Get the Particles::_sfPositions field.
567 const SFUnrecChildGeoVectorPropertyPtr
*ParticlesBase::getSFPositions(void) const
569 return &_sfPositions
;
572 SFUnrecChildGeoVectorPropertyPtr
*ParticlesBase::editSFPositions (void)
574 editSField(PositionsFieldMask
);
576 return &_sfPositions
;
579 //! Get the value of the Particles::_sfPositions field.
580 GeoVectorProperty
* ParticlesBase::getPositions(void) const
582 return _sfPositions
.getValue();
585 //! Set the value of the Particles::_sfPositions field.
586 void ParticlesBase::setPositions(GeoVectorProperty
* const value
)
588 editSField(PositionsFieldMask
);
590 _sfPositions
.setValue(value
);
594 MFVec3f
*ParticlesBase::editMFSizes(void)
596 editMField(SizesFieldMask
, _mfSizes
);
601 const MFVec3f
*ParticlesBase::getMFSizes(void) const
607 //! Get the Particles::_sfSecPositions field.
608 const SFUnrecChildGeoVectorPropertyPtr
*ParticlesBase::getSFSecPositions(void) const
610 return &_sfSecPositions
;
613 SFUnrecChildGeoVectorPropertyPtr
*ParticlesBase::editSFSecPositions (void)
615 editSField(SecPositionsFieldMask
);
617 return &_sfSecPositions
;
620 //! Get the value of the Particles::_sfSecPositions field.
621 GeoVectorProperty
* ParticlesBase::getSecPositions(void) const
623 return _sfSecPositions
.getValue();
626 //! Set the value of the Particles::_sfSecPositions field.
627 void ParticlesBase::setSecPositions(GeoVectorProperty
* const value
)
629 editSField(SecPositionsFieldMask
);
631 _sfSecPositions
.setValue(value
);
635 //! Get the Particles::_sfColors field.
636 const SFUnrecChildGeoVectorPropertyPtr
*ParticlesBase::getSFColors(void) const
641 SFUnrecChildGeoVectorPropertyPtr
*ParticlesBase::editSFColors (void)
643 editSField(ColorsFieldMask
);
648 //! Get the value of the Particles::_sfColors field.
649 GeoVectorProperty
* ParticlesBase::getColors(void) const
651 return _sfColors
.getValue();
654 //! Set the value of the Particles::_sfColors field.
655 void ParticlesBase::setColors(GeoVectorProperty
* const value
)
657 editSField(ColorsFieldMask
);
659 _sfColors
.setValue(value
);
663 //! Get the Particles::_sfNormals field.
664 const SFUnrecChildGeoVectorPropertyPtr
*ParticlesBase::getSFNormals(void) const
669 SFUnrecChildGeoVectorPropertyPtr
*ParticlesBase::editSFNormals (void)
671 editSField(NormalsFieldMask
);
676 //! Get the value of the Particles::_sfNormals field.
677 GeoVectorProperty
* ParticlesBase::getNormals(void) const
679 return _sfNormals
.getValue();
682 //! Set the value of the Particles::_sfNormals field.
683 void ParticlesBase::setNormals(GeoVectorProperty
* const value
)
685 editSField(NormalsFieldMask
);
687 _sfNormals
.setValue(value
);
691 MFInt32
*ParticlesBase::editMFIndices(void)
693 editMField(IndicesFieldMask
, _mfIndices
);
698 const MFInt32
*ParticlesBase::getMFIndices(void) const
704 MFReal32
*ParticlesBase::editMFTextureZs(void)
706 editMField(TextureZsFieldMask
, _mfTextureZs
);
708 return &_mfTextureZs
;
711 const MFReal32
*ParticlesBase::getMFTextureZs(void) const
713 return &_mfTextureZs
;
717 SFUInt32
*ParticlesBase::editSFDrawOrder(void)
719 editSField(DrawOrderFieldMask
);
721 return &_sfDrawOrder
;
724 const SFUInt32
*ParticlesBase::getSFDrawOrder(void) const
726 return &_sfDrawOrder
;
730 SFBool
*ParticlesBase::editSFDynamic(void)
732 editSField(DynamicFieldMask
);
737 const SFBool
*ParticlesBase::getSFDynamic(void) const
743 SFUInt32
*ParticlesBase::editSFPump(void)
745 editSField(PumpFieldMask
);
750 const SFUInt32
*ParticlesBase::getSFPump(void) const
756 SFParticleBSPTree
*ParticlesBase::editSFBsp(void)
758 editSField(BspFieldMask
);
763 const SFParticleBSPTree
*ParticlesBase::getSFBsp(void) const
769 SFInt32
*ParticlesBase::editSFNumParticles(void)
771 editSField(NumParticlesFieldMask
);
773 return &_sfNumParticles
;
776 const SFInt32
*ParticlesBase::getSFNumParticles(void) const
778 return &_sfNumParticles
;
786 /*------------------------------ access -----------------------------------*/
788 SizeT
ParticlesBase::getBinSize(ConstFieldMaskArg whichField
)
790 SizeT returnValue
= Inherited::getBinSize(whichField
);
792 if(FieldBits::NoField
!= (ModeFieldMask
& whichField
))
794 returnValue
+= _sfMode
.getBinSize();
796 if(FieldBits::NoField
!= (PositionsFieldMask
& whichField
))
798 returnValue
+= _sfPositions
.getBinSize();
800 if(FieldBits::NoField
!= (SizesFieldMask
& whichField
))
802 returnValue
+= _mfSizes
.getBinSize();
804 if(FieldBits::NoField
!= (SecPositionsFieldMask
& whichField
))
806 returnValue
+= _sfSecPositions
.getBinSize();
808 if(FieldBits::NoField
!= (ColorsFieldMask
& whichField
))
810 returnValue
+= _sfColors
.getBinSize();
812 if(FieldBits::NoField
!= (NormalsFieldMask
& whichField
))
814 returnValue
+= _sfNormals
.getBinSize();
816 if(FieldBits::NoField
!= (IndicesFieldMask
& whichField
))
818 returnValue
+= _mfIndices
.getBinSize();
820 if(FieldBits::NoField
!= (TextureZsFieldMask
& whichField
))
822 returnValue
+= _mfTextureZs
.getBinSize();
824 if(FieldBits::NoField
!= (DrawOrderFieldMask
& whichField
))
826 returnValue
+= _sfDrawOrder
.getBinSize();
828 if(FieldBits::NoField
!= (DynamicFieldMask
& whichField
))
830 returnValue
+= _sfDynamic
.getBinSize();
832 if(FieldBits::NoField
!= (PumpFieldMask
& whichField
))
834 returnValue
+= _sfPump
.getBinSize();
836 if(FieldBits::NoField
!= (BspFieldMask
& whichField
))
838 returnValue
+= _sfBsp
.getBinSize();
840 if(FieldBits::NoField
!= (NumParticlesFieldMask
& whichField
))
842 returnValue
+= _sfNumParticles
.getBinSize();
848 void ParticlesBase::copyToBin(BinaryDataHandler
&pMem
,
849 ConstFieldMaskArg whichField
)
851 Inherited::copyToBin(pMem
, whichField
);
853 if(FieldBits::NoField
!= (ModeFieldMask
& whichField
))
855 _sfMode
.copyToBin(pMem
);
857 if(FieldBits::NoField
!= (PositionsFieldMask
& whichField
))
859 _sfPositions
.copyToBin(pMem
);
861 if(FieldBits::NoField
!= (SizesFieldMask
& whichField
))
863 _mfSizes
.copyToBin(pMem
);
865 if(FieldBits::NoField
!= (SecPositionsFieldMask
& whichField
))
867 _sfSecPositions
.copyToBin(pMem
);
869 if(FieldBits::NoField
!= (ColorsFieldMask
& whichField
))
871 _sfColors
.copyToBin(pMem
);
873 if(FieldBits::NoField
!= (NormalsFieldMask
& whichField
))
875 _sfNormals
.copyToBin(pMem
);
877 if(FieldBits::NoField
!= (IndicesFieldMask
& whichField
))
879 _mfIndices
.copyToBin(pMem
);
881 if(FieldBits::NoField
!= (TextureZsFieldMask
& whichField
))
883 _mfTextureZs
.copyToBin(pMem
);
885 if(FieldBits::NoField
!= (DrawOrderFieldMask
& whichField
))
887 _sfDrawOrder
.copyToBin(pMem
);
889 if(FieldBits::NoField
!= (DynamicFieldMask
& whichField
))
891 _sfDynamic
.copyToBin(pMem
);
893 if(FieldBits::NoField
!= (PumpFieldMask
& whichField
))
895 _sfPump
.copyToBin(pMem
);
897 if(FieldBits::NoField
!= (BspFieldMask
& whichField
))
899 _sfBsp
.copyToBin(pMem
);
901 if(FieldBits::NoField
!= (NumParticlesFieldMask
& whichField
))
903 _sfNumParticles
.copyToBin(pMem
);
907 void ParticlesBase::copyFromBin(BinaryDataHandler
&pMem
,
908 ConstFieldMaskArg whichField
)
910 Inherited::copyFromBin(pMem
, whichField
);
912 if(FieldBits::NoField
!= (ModeFieldMask
& whichField
))
914 editSField(ModeFieldMask
);
915 _sfMode
.copyFromBin(pMem
);
917 if(FieldBits::NoField
!= (PositionsFieldMask
& whichField
))
919 editSField(PositionsFieldMask
);
920 _sfPositions
.copyFromBin(pMem
);
922 if(FieldBits::NoField
!= (SizesFieldMask
& whichField
))
924 editMField(SizesFieldMask
, _mfSizes
);
925 _mfSizes
.copyFromBin(pMem
);
927 if(FieldBits::NoField
!= (SecPositionsFieldMask
& whichField
))
929 editSField(SecPositionsFieldMask
);
930 _sfSecPositions
.copyFromBin(pMem
);
932 if(FieldBits::NoField
!= (ColorsFieldMask
& whichField
))
934 editSField(ColorsFieldMask
);
935 _sfColors
.copyFromBin(pMem
);
937 if(FieldBits::NoField
!= (NormalsFieldMask
& whichField
))
939 editSField(NormalsFieldMask
);
940 _sfNormals
.copyFromBin(pMem
);
942 if(FieldBits::NoField
!= (IndicesFieldMask
& whichField
))
944 editMField(IndicesFieldMask
, _mfIndices
);
945 _mfIndices
.copyFromBin(pMem
);
947 if(FieldBits::NoField
!= (TextureZsFieldMask
& whichField
))
949 editMField(TextureZsFieldMask
, _mfTextureZs
);
950 _mfTextureZs
.copyFromBin(pMem
);
952 if(FieldBits::NoField
!= (DrawOrderFieldMask
& whichField
))
954 editSField(DrawOrderFieldMask
);
955 _sfDrawOrder
.copyFromBin(pMem
);
957 if(FieldBits::NoField
!= (DynamicFieldMask
& whichField
))
959 editSField(DynamicFieldMask
);
960 _sfDynamic
.copyFromBin(pMem
);
962 if(FieldBits::NoField
!= (PumpFieldMask
& whichField
))
964 editSField(PumpFieldMask
);
965 _sfPump
.copyFromBin(pMem
);
967 if(FieldBits::NoField
!= (BspFieldMask
& whichField
))
969 editSField(BspFieldMask
);
970 _sfBsp
.copyFromBin(pMem
);
972 if(FieldBits::NoField
!= (NumParticlesFieldMask
& whichField
))
974 editSField(NumParticlesFieldMask
);
975 _sfNumParticles
.copyFromBin(pMem
);
979 //! create a new instance of the class
980 ParticlesTransitPtr
ParticlesBase::createLocal(BitVector bFlags
)
982 ParticlesTransitPtr fc
;
984 if(getClassType().getPrototype() != NULL
)
986 FieldContainerTransitPtr tmpPtr
=
987 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
989 fc
= dynamic_pointer_cast
<Particles
>(tmpPtr
);
995 //! create a new instance of the class, copy the container flags
996 ParticlesTransitPtr
ParticlesBase::createDependent(BitVector bFlags
)
998 ParticlesTransitPtr fc
;
1000 if(getClassType().getPrototype() != NULL
)
1002 FieldContainerTransitPtr tmpPtr
=
1003 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
1005 fc
= dynamic_pointer_cast
<Particles
>(tmpPtr
);
1011 //! create a new instance of the class
1012 ParticlesTransitPtr
ParticlesBase::create(void)
1014 ParticlesTransitPtr fc
;
1016 if(getClassType().getPrototype() != NULL
)
1018 FieldContainerTransitPtr tmpPtr
=
1019 getClassType().getPrototype()-> shallowCopy();
1021 fc
= dynamic_pointer_cast
<Particles
>(tmpPtr
);
1027 Particles
*ParticlesBase::createEmptyLocal(BitVector bFlags
)
1029 Particles
*returnValue
;
1031 newPtr
<Particles
>(returnValue
, bFlags
);
1033 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
1038 //! create an empty new instance of the class, do not copy the prototype
1039 Particles
*ParticlesBase::createEmpty(void)
1041 Particles
*returnValue
;
1043 newPtr
<Particles
>(returnValue
, Thread::getCurrentLocalFlags());
1045 returnValue
->_pFieldFlags
->_bNamespaceMask
&=
1046 ~Thread::getCurrentLocalFlags();
1052 FieldContainerTransitPtr
ParticlesBase::shallowCopyLocal(
1053 BitVector bFlags
) const
1057 newPtr(tmpPtr
, dynamic_cast<const Particles
*>(this), bFlags
);
1059 FieldContainerTransitPtr
returnValue(tmpPtr
);
1061 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
1066 FieldContainerTransitPtr
ParticlesBase::shallowCopyDependent(
1067 BitVector bFlags
) const
1071 newPtr(tmpPtr
, dynamic_cast<const Particles
*>(this), ~bFlags
);
1073 FieldContainerTransitPtr
returnValue(tmpPtr
);
1075 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
1080 FieldContainerTransitPtr
ParticlesBase::shallowCopy(void) const
1085 dynamic_cast<const Particles
*>(this),
1086 Thread::getCurrentLocalFlags());
1088 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
1090 FieldContainerTransitPtr
returnValue(tmpPtr
);
1098 /*------------------------- constructors ----------------------------------*/
1100 ParticlesBase::ParticlesBase(void) :
1102 _sfMode (UInt32(2)),
1105 GeoVectorProperty::ParentsFieldId
),
1107 _sfSecPositions (this,
1108 SecPositionsFieldId
,
1109 GeoVectorProperty::ParentsFieldId
),
1112 GeoVectorProperty::ParentsFieldId
),
1115 GeoVectorProperty::ParentsFieldId
),
1118 _sfDrawOrder (UInt32(0)),
1119 _sfDynamic (bool(true)),
1122 _sfNumParticles (Int32(-1))
1126 ParticlesBase::ParticlesBase(const ParticlesBase
&source
) :
1128 _sfMode (source
._sfMode
),
1131 GeoVectorProperty::ParentsFieldId
),
1132 _mfSizes (source
._mfSizes
),
1133 _sfSecPositions (this,
1134 SecPositionsFieldId
,
1135 GeoVectorProperty::ParentsFieldId
),
1138 GeoVectorProperty::ParentsFieldId
),
1141 GeoVectorProperty::ParentsFieldId
),
1142 _mfIndices (source
._mfIndices
),
1143 _mfTextureZs (source
._mfTextureZs
),
1144 _sfDrawOrder (source
._sfDrawOrder
),
1145 _sfDynamic (source
._sfDynamic
),
1146 _sfPump (source
._sfPump
),
1147 _sfBsp (source
._sfBsp
),
1148 _sfNumParticles (source
._sfNumParticles
)
1153 /*-------------------------- destructors ----------------------------------*/
1155 ParticlesBase::~ParticlesBase(void)
1159 /*-------------------------------------------------------------------------*/
1162 bool ParticlesBase::unlinkChild(
1163 FieldContainer
* const pChild
,
1164 UInt16
const childFieldId
)
1166 if(childFieldId
== PositionsFieldId
)
1168 GeoVectorProperty
* pTypedChild
=
1169 dynamic_cast<GeoVectorProperty
*>(pChild
);
1171 if(pTypedChild
!= NULL
)
1173 if(_sfPositions
.getValue() == pTypedChild
)
1175 editSField(PositionsFieldMask
);
1177 _sfPositions
.setValue(NULL
);
1182 SWARNING
<< "Parent ([" << this
1183 << "] id [" << this->getId()
1184 << "] type [" << this->getType().getCName()
1185 << "] childFieldId [" << childFieldId
1186 << "]) - Child ([" << pChild
1187 << "] id [" << pChild
->getId()
1188 << "] type [" << pChild
->getType().getCName()
1189 << "]): link inconsistent!"
1198 if(childFieldId
== SecPositionsFieldId
)
1200 GeoVectorProperty
* pTypedChild
=
1201 dynamic_cast<GeoVectorProperty
*>(pChild
);
1203 if(pTypedChild
!= NULL
)
1205 if(_sfSecPositions
.getValue() == pTypedChild
)
1207 editSField(SecPositionsFieldMask
);
1209 _sfSecPositions
.setValue(NULL
);
1214 SWARNING
<< "Parent ([" << this
1215 << "] id [" << this->getId()
1216 << "] type [" << this->getType().getCName()
1217 << "] childFieldId [" << childFieldId
1218 << "]) - Child ([" << pChild
1219 << "] id [" << pChild
->getId()
1220 << "] type [" << pChild
->getType().getCName()
1221 << "]): link inconsistent!"
1230 if(childFieldId
== ColorsFieldId
)
1232 GeoVectorProperty
* pTypedChild
=
1233 dynamic_cast<GeoVectorProperty
*>(pChild
);
1235 if(pTypedChild
!= NULL
)
1237 if(_sfColors
.getValue() == pTypedChild
)
1239 editSField(ColorsFieldMask
);
1241 _sfColors
.setValue(NULL
);
1246 SWARNING
<< "Parent ([" << this
1247 << "] id [" << this->getId()
1248 << "] type [" << this->getType().getCName()
1249 << "] childFieldId [" << childFieldId
1250 << "]) - Child ([" << pChild
1251 << "] id [" << pChild
->getId()
1252 << "] type [" << pChild
->getType().getCName()
1253 << "]): link inconsistent!"
1262 if(childFieldId
== NormalsFieldId
)
1264 GeoVectorProperty
* pTypedChild
=
1265 dynamic_cast<GeoVectorProperty
*>(pChild
);
1267 if(pTypedChild
!= NULL
)
1269 if(_sfNormals
.getValue() == pTypedChild
)
1271 editSField(NormalsFieldMask
);
1273 _sfNormals
.setValue(NULL
);
1278 SWARNING
<< "Parent ([" << this
1279 << "] id [" << this->getId()
1280 << "] type [" << this->getType().getCName()
1281 << "] childFieldId [" << childFieldId
1282 << "]) - Child ([" << pChild
1283 << "] id [" << pChild
->getId()
1284 << "] type [" << pChild
->getType().getCName()
1285 << "]): link inconsistent!"
1295 return Inherited::unlinkChild(pChild
, childFieldId
);
1298 void ParticlesBase::onCreate(const Particles
*source
)
1300 Inherited::onCreate(source
);
1304 Particles
*pThis
= static_cast<Particles
*>(this);
1306 pThis
->setPositions(source
->getPositions());
1308 pThis
->setSecPositions(source
->getSecPositions());
1310 pThis
->setColors(source
->getColors());
1312 pThis
->setNormals(source
->getNormals());
1316 GetFieldHandlePtr
ParticlesBase::getHandleMode (void) const
1318 SFUInt32::GetHandlePtr
returnValue(
1319 new SFUInt32::GetHandle(
1321 this->getType().getFieldDesc(ModeFieldId
),
1322 const_cast<ParticlesBase
*>(this)));
1327 EditFieldHandlePtr
ParticlesBase::editHandleMode (void)
1329 SFUInt32::EditHandlePtr
returnValue(
1330 new SFUInt32::EditHandle(
1332 this->getType().getFieldDesc(ModeFieldId
),
1336 editSField(ModeFieldMask
);
1341 GetFieldHandlePtr
ParticlesBase::getHandlePositions (void) const
1343 SFUnrecChildGeoVectorPropertyPtr::GetHandlePtr
returnValue(
1344 new SFUnrecChildGeoVectorPropertyPtr::GetHandle(
1346 this->getType().getFieldDesc(PositionsFieldId
),
1347 const_cast<ParticlesBase
*>(this)));
1352 EditFieldHandlePtr
ParticlesBase::editHandlePositions (void)
1354 SFUnrecChildGeoVectorPropertyPtr::EditHandlePtr
returnValue(
1355 new SFUnrecChildGeoVectorPropertyPtr::EditHandle(
1357 this->getType().getFieldDesc(PositionsFieldId
),
1360 returnValue
->setSetMethod(
1361 boost::bind(&Particles::setPositions
,
1362 static_cast<Particles
*>(this), _1
));
1364 editSField(PositionsFieldMask
);
1369 GetFieldHandlePtr
ParticlesBase::getHandleSizes (void) const
1371 MFVec3f::GetHandlePtr
returnValue(
1372 new MFVec3f::GetHandle(
1374 this->getType().getFieldDesc(SizesFieldId
),
1375 const_cast<ParticlesBase
*>(this)));
1380 EditFieldHandlePtr
ParticlesBase::editHandleSizes (void)
1382 MFVec3f::EditHandlePtr
returnValue(
1383 new MFVec3f::EditHandle(
1385 this->getType().getFieldDesc(SizesFieldId
),
1389 editMField(SizesFieldMask
, _mfSizes
);
1394 GetFieldHandlePtr
ParticlesBase::getHandleSecPositions (void) const
1396 SFUnrecChildGeoVectorPropertyPtr::GetHandlePtr
returnValue(
1397 new SFUnrecChildGeoVectorPropertyPtr::GetHandle(
1399 this->getType().getFieldDesc(SecPositionsFieldId
),
1400 const_cast<ParticlesBase
*>(this)));
1405 EditFieldHandlePtr
ParticlesBase::editHandleSecPositions (void)
1407 SFUnrecChildGeoVectorPropertyPtr::EditHandlePtr
returnValue(
1408 new SFUnrecChildGeoVectorPropertyPtr::EditHandle(
1410 this->getType().getFieldDesc(SecPositionsFieldId
),
1413 returnValue
->setSetMethod(
1414 boost::bind(&Particles::setSecPositions
,
1415 static_cast<Particles
*>(this), _1
));
1417 editSField(SecPositionsFieldMask
);
1422 GetFieldHandlePtr
ParticlesBase::getHandleColors (void) const
1424 SFUnrecChildGeoVectorPropertyPtr::GetHandlePtr
returnValue(
1425 new SFUnrecChildGeoVectorPropertyPtr::GetHandle(
1427 this->getType().getFieldDesc(ColorsFieldId
),
1428 const_cast<ParticlesBase
*>(this)));
1433 EditFieldHandlePtr
ParticlesBase::editHandleColors (void)
1435 SFUnrecChildGeoVectorPropertyPtr::EditHandlePtr
returnValue(
1436 new SFUnrecChildGeoVectorPropertyPtr::EditHandle(
1438 this->getType().getFieldDesc(ColorsFieldId
),
1441 returnValue
->setSetMethod(
1442 boost::bind(&Particles::setColors
,
1443 static_cast<Particles
*>(this), _1
));
1445 editSField(ColorsFieldMask
);
1450 GetFieldHandlePtr
ParticlesBase::getHandleNormals (void) const
1452 SFUnrecChildGeoVectorPropertyPtr::GetHandlePtr
returnValue(
1453 new SFUnrecChildGeoVectorPropertyPtr::GetHandle(
1455 this->getType().getFieldDesc(NormalsFieldId
),
1456 const_cast<ParticlesBase
*>(this)));
1461 EditFieldHandlePtr
ParticlesBase::editHandleNormals (void)
1463 SFUnrecChildGeoVectorPropertyPtr::EditHandlePtr
returnValue(
1464 new SFUnrecChildGeoVectorPropertyPtr::EditHandle(
1466 this->getType().getFieldDesc(NormalsFieldId
),
1469 returnValue
->setSetMethod(
1470 boost::bind(&Particles::setNormals
,
1471 static_cast<Particles
*>(this), _1
));
1473 editSField(NormalsFieldMask
);
1478 GetFieldHandlePtr
ParticlesBase::getHandleIndices (void) const
1480 MFInt32::GetHandlePtr
returnValue(
1481 new MFInt32::GetHandle(
1483 this->getType().getFieldDesc(IndicesFieldId
),
1484 const_cast<ParticlesBase
*>(this)));
1489 EditFieldHandlePtr
ParticlesBase::editHandleIndices (void)
1491 MFInt32::EditHandlePtr
returnValue(
1492 new MFInt32::EditHandle(
1494 this->getType().getFieldDesc(IndicesFieldId
),
1498 editMField(IndicesFieldMask
, _mfIndices
);
1503 GetFieldHandlePtr
ParticlesBase::getHandleTextureZs (void) const
1505 MFReal32::GetHandlePtr
returnValue(
1506 new MFReal32::GetHandle(
1508 this->getType().getFieldDesc(TextureZsFieldId
),
1509 const_cast<ParticlesBase
*>(this)));
1514 EditFieldHandlePtr
ParticlesBase::editHandleTextureZs (void)
1516 MFReal32::EditHandlePtr
returnValue(
1517 new MFReal32::EditHandle(
1519 this->getType().getFieldDesc(TextureZsFieldId
),
1523 editMField(TextureZsFieldMask
, _mfTextureZs
);
1528 GetFieldHandlePtr
ParticlesBase::getHandleDrawOrder (void) const
1530 SFUInt32::GetHandlePtr
returnValue(
1531 new SFUInt32::GetHandle(
1533 this->getType().getFieldDesc(DrawOrderFieldId
),
1534 const_cast<ParticlesBase
*>(this)));
1539 EditFieldHandlePtr
ParticlesBase::editHandleDrawOrder (void)
1541 SFUInt32::EditHandlePtr
returnValue(
1542 new SFUInt32::EditHandle(
1544 this->getType().getFieldDesc(DrawOrderFieldId
),
1548 editSField(DrawOrderFieldMask
);
1553 GetFieldHandlePtr
ParticlesBase::getHandleDynamic (void) const
1555 SFBool::GetHandlePtr
returnValue(
1556 new SFBool::GetHandle(
1558 this->getType().getFieldDesc(DynamicFieldId
),
1559 const_cast<ParticlesBase
*>(this)));
1564 EditFieldHandlePtr
ParticlesBase::editHandleDynamic (void)
1566 SFBool::EditHandlePtr
returnValue(
1567 new SFBool::EditHandle(
1569 this->getType().getFieldDesc(DynamicFieldId
),
1573 editSField(DynamicFieldMask
);
1578 GetFieldHandlePtr
ParticlesBase::getHandlePump (void) const
1580 SFUInt32::GetHandlePtr
returnValue(
1581 new SFUInt32::GetHandle(
1583 this->getType().getFieldDesc(PumpFieldId
),
1584 const_cast<ParticlesBase
*>(this)));
1589 EditFieldHandlePtr
ParticlesBase::editHandlePump (void)
1591 SFUInt32::EditHandlePtr
returnValue(
1592 new SFUInt32::EditHandle(
1594 this->getType().getFieldDesc(PumpFieldId
),
1598 editSField(PumpFieldMask
);
1603 GetFieldHandlePtr
ParticlesBase::getHandleBsp (void) const
1605 SFParticleBSPTree::GetHandlePtr
returnValue(
1606 new SFParticleBSPTree::GetHandle(
1608 this->getType().getFieldDesc(BspFieldId
),
1609 const_cast<ParticlesBase
*>(this)));
1614 EditFieldHandlePtr
ParticlesBase::editHandleBsp (void)
1616 SFParticleBSPTree::EditHandlePtr
returnValue(
1617 new SFParticleBSPTree::EditHandle(
1619 this->getType().getFieldDesc(BspFieldId
),
1623 editSField(BspFieldMask
);
1628 GetFieldHandlePtr
ParticlesBase::getHandleNumParticles (void) const
1630 SFInt32::GetHandlePtr
returnValue(
1631 new SFInt32::GetHandle(
1633 this->getType().getFieldDesc(NumParticlesFieldId
),
1634 const_cast<ParticlesBase
*>(this)));
1639 EditFieldHandlePtr
ParticlesBase::editHandleNumParticles (void)
1641 SFInt32::EditHandlePtr
returnValue(
1642 new SFInt32::EditHandle(
1644 this->getType().getFieldDesc(NumParticlesFieldId
),
1648 editSField(NumParticlesFieldMask
);
1654 #ifdef OSG_MT_CPTR_ASPECT
1655 void ParticlesBase::execSyncV( FieldContainer
&oFrom
,
1656 ConstFieldMaskArg whichField
,
1657 AspectOffsetStore
&oOffsets
,
1658 ConstFieldMaskArg syncMode
,
1659 const UInt32 uiSyncInfo
)
1661 Particles
*pThis
= static_cast<Particles
*>(this);
1663 pThis
->execSync(static_cast<Particles
*>(&oFrom
),
1672 #ifdef OSG_MT_CPTR_ASPECT
1673 FieldContainer
*ParticlesBase::createAspectCopy(
1674 const FieldContainer
*pRefAspect
) const
1676 Particles
*returnValue
;
1678 newAspectCopy(returnValue
,
1679 dynamic_cast<const Particles
*>(pRefAspect
),
1680 dynamic_cast<const Particles
*>(this));
1686 void ParticlesBase::resolveLinks(void)
1688 Inherited::resolveLinks();
1690 static_cast<Particles
*>(this)->setPositions(NULL
);
1692 static_cast<Particles
*>(this)->setSecPositions(NULL
);
1694 static_cast<Particles
*>(this)->setColors(NULL
);
1696 static_cast<Particles
*>(this)->setNormals(NULL
);
1698 #ifdef OSG_MT_CPTR_ASPECT
1699 AspectOffsetStore oOffsets
;
1701 _pAspectStore
->fillOffsetArray(oOffsets
, this);
1704 #ifdef OSG_MT_CPTR_ASPECT
1705 _mfSizes
.terminateShare(Thread::getCurrentAspect(),
1708 #ifdef OSG_MT_CPTR_ASPECT
1709 _mfIndices
.terminateShare(Thread::getCurrentAspect(),
1712 #ifdef OSG_MT_CPTR_ASPECT
1713 _mfTextureZs
.terminateShare(Thread::getCurrentAspect(),