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 "OSGGeoIntegralProperty.h" // Types Class
66 #include "OSGGeoVectorProperty.h" // Properties Class
68 #include "OSGGeometryBase.h"
69 #include "OSGGeometry.h"
71 #include <boost/bind.hpp>
75 /***************************************************************************\
77 \***************************************************************************/
79 /*! \class OSG::Geometry
83 /***************************************************************************\
84 * Field Documentation *
85 \***************************************************************************/
87 /*! \var GeoIntegralProperty * GeometryBase::_sfTypes
88 The types property contains the primitive's types. Legal values are
89 everything that can be passed to glBegin(). There have to be as many
93 /*! \var GeoIntegralProperty * GeometryBase::_sfLengths
94 The lengths property contains the number of vertices to use for the
95 corresponding primitive. There have to be as many lengths as types.
98 /*! \var GeoVectorProperty * GeometryBase::_mfProperties
99 The attributes used to render the geometry. The order is based on the
100 the one given in ARB_vertex_program.
103 /*! \var GeoIntegralProperty * GeometryBase::_mfPropIndices
104 The indices property contains the index data. See \ref
105 PageSystemGeoIndexing for a description of the indexing options.
108 /*! \var UInt32 GeometryBase::_sfPatchVertices
109 if primitives are patches set the number of vertices per patch. Evaluated
113 /*! \var bool GeometryBase::_sfDlistCache
114 Flag to activate caching the geometry inside a display list.
117 /*! \var bool GeometryBase::_sfUseVAO
118 Flag to activate caching the geometry inside a VAO.
121 /*! \var bool GeometryBase::_sfUseAttribCalls
122 Flag to activate caching the geometry inside a VAO.
125 /*! \var Int32 GeometryBase::_sfClassicGLId
126 The dlist id for the classic rendering mode, if used.
129 /*! \var Int32 GeometryBase::_sfAttGLId
130 The dlist id for the attribute-based rendering mode, if used.
133 /*! \var Int32 GeometryBase::_sfClassicVaoGLId
134 The vao gl id for the attribute-based rendering mode, if used.
137 /*! \var Int32 GeometryBase::_sfAttribVaoGLId
138 The vao gl id for the attribute-based rendering mode, if used.
142 /***************************************************************************\
143 * FieldType/FieldTrait Instantiation *
144 \***************************************************************************/
146 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
147 PointerType FieldTraits
<Geometry
*, nsOSG
>::_type(
149 "MaterialDrawablePtr",
150 Geometry::getClassType(),
154 OSG_FIELDTRAITS_GETTYPE_NS(Geometry
*, nsOSG
)
156 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
160 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField
,
164 DataType
&FieldTraits
< Geometry
*, nsOSG
+ 1 >::getType(void)
166 return FieldTraits
<Geometry
*, nsOSG
>::getType();
170 OSG_EXPORT_PTR_SFIELD(ChildPointerSField
,
172 UnrecordedRefCountPolicy
,
176 OSG_EXPORT_PTR_MFIELD(ChildPointerMField
,
178 UnrecordedRefCountPolicy
,
182 /***************************************************************************\
183 * Field Description *
184 \***************************************************************************/
186 void GeometryBase::classDescInserter(TypeObject
&oType
)
188 FieldDescriptionBase
*pDesc
= NULL
;
191 pDesc
= new SFUnrecChildGeoIntegralPropertyPtr::Description(
192 SFUnrecChildGeoIntegralPropertyPtr::getClassType(),
194 "The types property contains the primitive's types. Legal values are \n"
195 "everything that can be passed to glBegin(). There have to be as many \n"
196 "types as lengths.\n",
197 TypesFieldId
, TypesFieldMask
,
199 (Field::SFDefaultFlags
| Field::FStdAccess
),
200 static_cast<FieldEditMethodSig
>(&Geometry::editHandleTypes
),
201 static_cast<FieldGetMethodSig
>(&Geometry::getHandleTypes
));
203 oType
.addInitialDesc(pDesc
);
205 pDesc
= new SFUnrecChildGeoIntegralPropertyPtr::Description(
206 SFUnrecChildGeoIntegralPropertyPtr::getClassType(),
208 "The lengths property contains the number of vertices to use for the \n"
209 "corresponding primitive. There have to be as many lengths as types.\n",
210 LengthsFieldId
, LengthsFieldMask
,
212 (Field::SFDefaultFlags
| Field::FStdAccess
),
213 static_cast<FieldEditMethodSig
>(&Geometry::editHandleLengths
),
214 static_cast<FieldGetMethodSig
>(&Geometry::getHandleLengths
));
216 oType
.addInitialDesc(pDesc
);
218 pDesc
= new MFUnrecChildGeoVectorPropertyPtr::Description(
219 MFUnrecChildGeoVectorPropertyPtr::getClassType(),
221 "The attributes used to render the geometry. The order is based on the \n"
222 "the one given in ARB_vertex_program.\n",
223 PropertiesFieldId
, PropertiesFieldMask
,
225 (Field::MFDefaultFlags
| Field::FStdAccess
),
226 static_cast<FieldEditMethodSig
>(&Geometry::editHandleProperties
),
227 static_cast<FieldGetMethodSig
>(&Geometry::getHandleProperties
));
229 oType
.addInitialDesc(pDesc
);
231 pDesc
= new MFUnrecChildGeoIntegralPropertyPtr::Description(
232 MFUnrecChildGeoIntegralPropertyPtr::getClassType(),
234 "The indices property contains the index data. See \\ref \n"
235 "PageSystemGeoIndexing for a description of the indexing options.\n",
236 PropIndicesFieldId
, PropIndicesFieldMask
,
238 (Field::MFDefaultFlags
| Field::FStdAccess
),
239 static_cast<FieldEditMethodSig
>(&Geometry::editHandlePropIndices
),
240 static_cast<FieldGetMethodSig
>(&Geometry::getHandlePropIndices
));
242 oType
.addInitialDesc(pDesc
);
244 pDesc
= new SFUInt32::Description(
245 SFUInt32::getClassType(),
247 "if primitives are patches set the number of vertices per patch. Evaluated\n"
249 PatchVerticesFieldId
, PatchVerticesFieldMask
,
251 (Field::SFDefaultFlags
| Field::FStdAccess
),
252 static_cast<FieldEditMethodSig
>(&Geometry::editHandlePatchVertices
),
253 static_cast<FieldGetMethodSig
>(&Geometry::getHandlePatchVertices
));
255 oType
.addInitialDesc(pDesc
);
257 pDesc
= new SFBool::Description(
258 SFBool::getClassType(),
260 "Flag to activate caching the geometry inside a display list.\n",
261 DlistCacheFieldId
, DlistCacheFieldMask
,
263 (Field::SFDefaultFlags
| Field::FStdAccess
),
264 static_cast<FieldEditMethodSig
>(&Geometry::editHandleDlistCache
),
265 static_cast<FieldGetMethodSig
>(&Geometry::getHandleDlistCache
));
267 oType
.addInitialDesc(pDesc
);
269 pDesc
= new SFBool::Description(
270 SFBool::getClassType(),
272 "Flag to activate caching the geometry inside a VAO.\n",
273 UseVAOFieldId
, UseVAOFieldMask
,
275 (Field::SFDefaultFlags
| Field::FStdAccess
),
276 static_cast<FieldEditMethodSig
>(&Geometry::editHandleUseVAO
),
277 static_cast<FieldGetMethodSig
>(&Geometry::getHandleUseVAO
));
279 oType
.addInitialDesc(pDesc
);
281 pDesc
= new SFBool::Description(
282 SFBool::getClassType(),
284 "Flag to activate caching the geometry inside a VAO.\n",
285 UseAttribCallsFieldId
, UseAttribCallsFieldMask
,
287 (Field::SFDefaultFlags
| Field::FStdAccess
),
288 static_cast<FieldEditMethodSig
>(&Geometry::editHandleUseAttribCalls
),
289 static_cast<FieldGetMethodSig
>(&Geometry::getHandleUseAttribCalls
));
291 oType
.addInitialDesc(pDesc
);
293 pDesc
= new SFInt32::Description(
294 SFInt32::getClassType(),
296 "The dlist id for the classic rendering mode, if used.\n",
297 ClassicGLIdFieldId
, ClassicGLIdFieldMask
,
299 (Field::FClusterLocal
),
300 static_cast<FieldEditMethodSig
>(&Geometry::editHandleClassicGLId
),
301 static_cast<FieldGetMethodSig
>(&Geometry::getHandleClassicGLId
));
303 oType
.addInitialDesc(pDesc
);
305 pDesc
= new SFInt32::Description(
306 SFInt32::getClassType(),
308 "The dlist id for the attribute-based rendering mode, if used.\n",
309 AttGLIdFieldId
, AttGLIdFieldMask
,
311 (Field::FClusterLocal
),
312 static_cast<FieldEditMethodSig
>(&Geometry::editHandleAttGLId
),
313 static_cast<FieldGetMethodSig
>(&Geometry::getHandleAttGLId
));
315 oType
.addInitialDesc(pDesc
);
317 pDesc
= new SFInt32::Description(
318 SFInt32::getClassType(),
320 "The vao gl id for the attribute-based rendering mode, if used.\n",
321 ClassicVaoGLIdFieldId
, ClassicVaoGLIdFieldMask
,
323 (Field::FClusterLocal
),
324 static_cast<FieldEditMethodSig
>(&Geometry::editHandleClassicVaoGLId
),
325 static_cast<FieldGetMethodSig
>(&Geometry::getHandleClassicVaoGLId
));
327 oType
.addInitialDesc(pDesc
);
329 pDesc
= new SFInt32::Description(
330 SFInt32::getClassType(),
332 "The vao gl id for the attribute-based rendering mode, if used.\n",
333 AttribVaoGLIdFieldId
, AttribVaoGLIdFieldMask
,
335 (Field::FClusterLocal
),
336 static_cast<FieldEditMethodSig
>(&Geometry::editHandleAttribVaoGLId
),
337 static_cast<FieldGetMethodSig
>(&Geometry::getHandleAttribVaoGLId
));
339 oType
.addInitialDesc(pDesc
);
343 GeometryBase::TypeObject
GeometryBase::_type(
344 GeometryBase::getClassname(),
345 Inherited::getClassname(),
348 reinterpret_cast<PrototypeCreateF
>(&GeometryBase::createEmptyLocal
),
349 reinterpret_cast<InitContainerF
>(&Geometry::initMethod
),
350 reinterpret_cast<ExitContainerF
>(&Geometry::exitMethod
),
351 reinterpret_cast<InitalInsertDescFunc
>(&Geometry::classDescInserter
),
354 "<?xml version=\"1.0\"?>\n"
357 " name=\"Geometry\"\n"
358 " parent=\"MaterialDrawable\"\n"
359 " library=\"Drawable\"\n"
360 " pointerfieldtypes=\"both\"\n"
361 " structure=\"concrete\"\n"
362 " systemcomponent=\"true\"\n"
363 " parentsystemcomponent=\"true\"\n"
364 " childFields=\"both\"\n"
365 " decoratable=\"false\"\n"
366 " isNodeCore=\"true\"\n"
367 " docGroupBase=\"GrpDrawablesGeometry\"\n"
371 " type=\"GeoIntegralProperty\"\n"
372 " cardinality=\"single\"\n"
373 " visibility=\"external\"\n"
374 " access=\"public\"\n"
375 " category=\"childpointer\"\n"
376 " childParentType=\"FieldContainer\"\n"
377 " linkParentField=\"Parents\"\n"
379 " The types property contains the primitive's types. Legal values are \n"
380 " everything that can be passed to glBegin(). There have to be as many \n"
381 " types as lengths.\n"
384 " name=\"lengths\"\n"
385 " type=\"GeoIntegralProperty\"\n"
386 " cardinality=\"single\"\n"
387 " visibility=\"external\"\n"
388 " access=\"public\"\n"
389 " category=\"childpointer\"\n"
390 " childParentType=\"FieldContainer\"\n"
391 " linkParentField=\"Parents\"\n"
393 " The lengths property contains the number of vertices to use for the \n"
394 " corresponding primitive. There have to be as many lengths as types.\n"
397 " name=\"properties\"\n"
398 " type=\"GeoVectorProperty\"\n"
399 " cardinality=\"multi\"\n"
400 " visibility=\"external\"\n"
401 " access=\"public\"\n"
402 " category=\"childpointer\"\n"
403 " childParentType=\"FieldContainer\"\n"
404 " linkParentField=\"Parents\"\n"
406 " The attributes used to render the geometry. The order is based on the \n"
407 " the one given in ARB_vertex_program.\n"
410 " name=\"propIndices\"\n"
411 " type=\"GeoIntegralProperty\"\n"
412 " cardinality=\"multi\"\n"
413 " visibility=\"external\"\n"
414 " access=\"public\"\n"
415 " category=\"childpointer\"\n"
416 " childParentType=\"FieldContainer\"\n"
417 " linkParentField=\"Parents\"\n"
419 " The indices property contains the index data. See \\ref \n"
420 " PageSystemGeoIndexing for a description of the indexing options.\n"
423 " name=\"patchVertices\"\n"
425 " cardinality=\"single\"\n"
426 " visibility=\"external\"\n"
427 " defaultValue=\"0\"\n"
428 " access=\"public\"\n"
430 "\tif primitives are patches set the number of vertices per patch. Evaluated\n"
434 " name=\"dlistCache\"\n"
436 " cardinality=\"single\"\n"
437 " visibility=\"external\"\n"
438 " defaultValue=\"true\"\n"
439 " access=\"public\"\n"
441 "\tFlag to activate caching the geometry inside a display list.\n"
446 " cardinality=\"single\"\n"
447 " visibility=\"external\"\n"
448 " defaultValue=\"true\"\n"
449 " access=\"public\"\n"
451 "\tFlag to activate caching the geometry inside a VAO.\n"
454 " name=\"useAttribCalls\"\n"
456 " cardinality=\"single\"\n"
457 " visibility=\"external\"\n"
458 " defaultValue=\"false\"\n"
459 " access=\"public\"\n"
461 "\tFlag to activate caching the geometry inside a VAO.\n"
464 " name=\"classicGLId\"\n"
466 " cardinality=\"single\"\n"
467 " visibility=\"internal\"\n"
468 " defaultValue=\"0\"\n"
469 " access=\"protected\"\n"
470 " fieldFlags=\"FClusterLocal\"\n"
472 "\tThe dlist id for the classic rendering mode, if used.\n"
475 " name=\"attGLId\"\n"
477 " cardinality=\"single\"\n"
478 " visibility=\"internal\"\n"
479 " defaultValue=\"0\"\n"
480 " access=\"protected\"\n"
481 " fieldFlags=\"FClusterLocal\"\n"
483 "\tThe dlist id for the attribute-based rendering mode, if used.\n"
486 " name=\"classicVaoGLId\"\n"
488 " cardinality=\"single\"\n"
489 " visibility=\"internal\"\n"
490 " defaultValue=\"0\"\n"
491 " access=\"protected\"\n"
492 " fieldFlags=\"FClusterLocal\"\n"
494 "\tThe vao gl id for the attribute-based rendering mode, if used.\n"
497 " name=\"attribVaoGLId\"\n"
499 " cardinality=\"single\"\n"
500 " visibility=\"internal\"\n"
501 " defaultValue=\"0\"\n"
502 " access=\"protected\"\n"
503 " fieldFlags=\"FClusterLocal\"\n"
505 "\tThe vao gl id for the attribute-based rendering mode, if used.\n"
507 "</FieldContainer>\n",
511 /*------------------------------ get -----------------------------------*/
513 FieldContainerType
&GeometryBase::getType(void)
518 const FieldContainerType
&GeometryBase::getType(void) const
523 UInt32
GeometryBase::getContainerSize(void) const
525 return sizeof(Geometry
);
528 /*------------------------- decorator get ------------------------------*/
531 //! Get the Geometry::_sfTypes field.
532 const SFUnrecChildGeoIntegralPropertyPtr
*GeometryBase::getSFTypes(void) const
537 SFUnrecChildGeoIntegralPropertyPtr
*GeometryBase::editSFTypes (void)
539 editSField(TypesFieldMask
);
544 //! Get the value of the Geometry::_sfTypes field.
545 GeoIntegralProperty
* GeometryBase::getTypes(void) const
547 return _sfTypes
.getValue();
550 //! Set the value of the Geometry::_sfTypes field.
551 void GeometryBase::setTypes(GeoIntegralProperty
* const value
)
553 editSField(TypesFieldMask
);
555 _sfTypes
.setValue(value
);
559 //! Get the Geometry::_sfLengths field.
560 const SFUnrecChildGeoIntegralPropertyPtr
*GeometryBase::getSFLengths(void) const
565 SFUnrecChildGeoIntegralPropertyPtr
*GeometryBase::editSFLengths (void)
567 editSField(LengthsFieldMask
);
572 //! Get the value of the Geometry::_sfLengths field.
573 GeoIntegralProperty
* GeometryBase::getLengths(void) const
575 return _sfLengths
.getValue();
578 //! Set the value of the Geometry::_sfLengths field.
579 void GeometryBase::setLengths(GeoIntegralProperty
* const value
)
581 editSField(LengthsFieldMask
);
583 _sfLengths
.setValue(value
);
587 //! Get the Geometry::_mfProperties field.
588 const MFUnrecChildGeoVectorPropertyPtr
*GeometryBase::getMFProperties(void) const
590 return &_mfProperties
;
593 MFUnrecChildGeoVectorPropertyPtr
*GeometryBase::editMFProperties (void)
595 editMField(PropertiesFieldMask
, _mfProperties
);
597 return &_mfProperties
;
599 GeoVectorProperty
* GeometryBase::getProperties(const UInt32 index
) const
601 return _mfProperties
[index
];
604 //! Get the Geometry::_mfPropIndices field.
605 const MFUnrecChildGeoIntegralPropertyPtr
*GeometryBase::getMFPropIndices(void) const
607 return &_mfPropIndices
;
610 MFUnrecChildGeoIntegralPropertyPtr
*GeometryBase::editMFPropIndices (void)
612 editMField(PropIndicesFieldMask
, _mfPropIndices
);
614 return &_mfPropIndices
;
616 GeoIntegralProperty
* GeometryBase::getPropIndices(const UInt32 index
) const
618 return _mfPropIndices
[index
];
621 SFUInt32
*GeometryBase::editSFPatchVertices(void)
623 editSField(PatchVerticesFieldMask
);
625 return &_sfPatchVertices
;
628 const SFUInt32
*GeometryBase::getSFPatchVertices(void) const
630 return &_sfPatchVertices
;
634 SFBool
*GeometryBase::editSFDlistCache(void)
636 editSField(DlistCacheFieldMask
);
638 return &_sfDlistCache
;
641 const SFBool
*GeometryBase::getSFDlistCache(void) const
643 return &_sfDlistCache
;
647 SFBool
*GeometryBase::editSFUseVAO(void)
649 editSField(UseVAOFieldMask
);
654 const SFBool
*GeometryBase::getSFUseVAO(void) const
660 SFBool
*GeometryBase::editSFUseAttribCalls(void)
662 editSField(UseAttribCallsFieldMask
);
664 return &_sfUseAttribCalls
;
667 const SFBool
*GeometryBase::getSFUseAttribCalls(void) const
669 return &_sfUseAttribCalls
;
673 SFInt32
*GeometryBase::editSFClassicGLId(void)
675 editSField(ClassicGLIdFieldMask
);
677 return &_sfClassicGLId
;
680 const SFInt32
*GeometryBase::getSFClassicGLId(void) const
682 return &_sfClassicGLId
;
686 SFInt32
*GeometryBase::editSFAttGLId(void)
688 editSField(AttGLIdFieldMask
);
693 const SFInt32
*GeometryBase::getSFAttGLId(void) const
699 SFInt32
*GeometryBase::editSFClassicVaoGLId(void)
701 editSField(ClassicVaoGLIdFieldMask
);
703 return &_sfClassicVaoGLId
;
706 const SFInt32
*GeometryBase::getSFClassicVaoGLId(void) const
708 return &_sfClassicVaoGLId
;
712 SFInt32
*GeometryBase::editSFAttribVaoGLId(void)
714 editSField(AttribVaoGLIdFieldMask
);
716 return &_sfAttribVaoGLId
;
719 const SFInt32
*GeometryBase::getSFAttribVaoGLId(void) const
721 return &_sfAttribVaoGLId
;
727 void GeometryBase::pushToProperties(GeoVectorProperty
* const value
)
729 editMField(PropertiesFieldMask
, _mfProperties
);
731 _mfProperties
.push_back(value
);
734 void GeometryBase::assignProperties(const MFUnrecChildGeoVectorPropertyPtr
&value
)
736 MFUnrecChildGeoVectorPropertyPtr::const_iterator elemIt
=
738 MFUnrecChildGeoVectorPropertyPtr::const_iterator elemEnd
=
741 static_cast<Geometry
*>(this)->clearProperties();
743 while(elemIt
!= elemEnd
)
745 this->pushToProperties(*elemIt
);
751 void GeometryBase::removeFromProperties(UInt32 uiIndex
)
753 if(uiIndex
< _mfProperties
.size())
755 editMField(PropertiesFieldMask
, _mfProperties
);
757 _mfProperties
.erase(uiIndex
);
761 void GeometryBase::removeObjFromProperties(GeoVectorProperty
* const value
)
763 Int32 iElemIdx
= _mfProperties
.findIndex(value
);
767 editMField(PropertiesFieldMask
, _mfProperties
);
769 _mfProperties
.erase(iElemIdx
);
772 void GeometryBase::clearProperties(void)
774 editMField(PropertiesFieldMask
, _mfProperties
);
777 _mfProperties
.clear();
780 void GeometryBase::pushToPropIndices(GeoIntegralProperty
* const value
)
782 editMField(PropIndicesFieldMask
, _mfPropIndices
);
784 _mfPropIndices
.push_back(value
);
787 void GeometryBase::assignPropIndices(const MFUnrecChildGeoIntegralPropertyPtr
&value
)
789 MFUnrecChildGeoIntegralPropertyPtr::const_iterator elemIt
=
791 MFUnrecChildGeoIntegralPropertyPtr::const_iterator elemEnd
=
794 static_cast<Geometry
*>(this)->clearPropIndices();
796 while(elemIt
!= elemEnd
)
798 this->pushToPropIndices(*elemIt
);
804 void GeometryBase::removeFromPropIndices(UInt32 uiIndex
)
806 if(uiIndex
< _mfPropIndices
.size())
808 editMField(PropIndicesFieldMask
, _mfPropIndices
);
810 _mfPropIndices
.erase(uiIndex
);
814 void GeometryBase::removeObjFromPropIndices(GeoIntegralProperty
* const value
)
816 Int32 iElemIdx
= _mfPropIndices
.findIndex(value
);
820 editMField(PropIndicesFieldMask
, _mfPropIndices
);
822 _mfPropIndices
.erase(iElemIdx
);
825 void GeometryBase::clearPropIndices(void)
827 editMField(PropIndicesFieldMask
, _mfPropIndices
);
830 _mfPropIndices
.clear();
835 /*------------------------------ access -----------------------------------*/
837 SizeT
GeometryBase::getBinSize(ConstFieldMaskArg whichField
)
839 SizeT returnValue
= Inherited::getBinSize(whichField
);
841 if(FieldBits::NoField
!= (TypesFieldMask
& whichField
))
843 returnValue
+= _sfTypes
.getBinSize();
845 if(FieldBits::NoField
!= (LengthsFieldMask
& whichField
))
847 returnValue
+= _sfLengths
.getBinSize();
849 if(FieldBits::NoField
!= (PropertiesFieldMask
& whichField
))
851 returnValue
+= _mfProperties
.getBinSize();
853 if(FieldBits::NoField
!= (PropIndicesFieldMask
& whichField
))
855 returnValue
+= _mfPropIndices
.getBinSize();
857 if(FieldBits::NoField
!= (PatchVerticesFieldMask
& whichField
))
859 returnValue
+= _sfPatchVertices
.getBinSize();
861 if(FieldBits::NoField
!= (DlistCacheFieldMask
& whichField
))
863 returnValue
+= _sfDlistCache
.getBinSize();
865 if(FieldBits::NoField
!= (UseVAOFieldMask
& whichField
))
867 returnValue
+= _sfUseVAO
.getBinSize();
869 if(FieldBits::NoField
!= (UseAttribCallsFieldMask
& whichField
))
871 returnValue
+= _sfUseAttribCalls
.getBinSize();
873 if(FieldBits::NoField
!= (ClassicGLIdFieldMask
& whichField
))
875 returnValue
+= _sfClassicGLId
.getBinSize();
877 if(FieldBits::NoField
!= (AttGLIdFieldMask
& whichField
))
879 returnValue
+= _sfAttGLId
.getBinSize();
881 if(FieldBits::NoField
!= (ClassicVaoGLIdFieldMask
& whichField
))
883 returnValue
+= _sfClassicVaoGLId
.getBinSize();
885 if(FieldBits::NoField
!= (AttribVaoGLIdFieldMask
& whichField
))
887 returnValue
+= _sfAttribVaoGLId
.getBinSize();
893 void GeometryBase::copyToBin(BinaryDataHandler
&pMem
,
894 ConstFieldMaskArg whichField
)
896 Inherited::copyToBin(pMem
, whichField
);
898 if(FieldBits::NoField
!= (TypesFieldMask
& whichField
))
900 _sfTypes
.copyToBin(pMem
);
902 if(FieldBits::NoField
!= (LengthsFieldMask
& whichField
))
904 _sfLengths
.copyToBin(pMem
);
906 if(FieldBits::NoField
!= (PropertiesFieldMask
& whichField
))
908 _mfProperties
.copyToBin(pMem
);
910 if(FieldBits::NoField
!= (PropIndicesFieldMask
& whichField
))
912 _mfPropIndices
.copyToBin(pMem
);
914 if(FieldBits::NoField
!= (PatchVerticesFieldMask
& whichField
))
916 _sfPatchVertices
.copyToBin(pMem
);
918 if(FieldBits::NoField
!= (DlistCacheFieldMask
& whichField
))
920 _sfDlistCache
.copyToBin(pMem
);
922 if(FieldBits::NoField
!= (UseVAOFieldMask
& whichField
))
924 _sfUseVAO
.copyToBin(pMem
);
926 if(FieldBits::NoField
!= (UseAttribCallsFieldMask
& whichField
))
928 _sfUseAttribCalls
.copyToBin(pMem
);
930 if(FieldBits::NoField
!= (ClassicGLIdFieldMask
& whichField
))
932 _sfClassicGLId
.copyToBin(pMem
);
934 if(FieldBits::NoField
!= (AttGLIdFieldMask
& whichField
))
936 _sfAttGLId
.copyToBin(pMem
);
938 if(FieldBits::NoField
!= (ClassicVaoGLIdFieldMask
& whichField
))
940 _sfClassicVaoGLId
.copyToBin(pMem
);
942 if(FieldBits::NoField
!= (AttribVaoGLIdFieldMask
& whichField
))
944 _sfAttribVaoGLId
.copyToBin(pMem
);
948 void GeometryBase::copyFromBin(BinaryDataHandler
&pMem
,
949 ConstFieldMaskArg whichField
)
951 Inherited::copyFromBin(pMem
, whichField
);
953 if(FieldBits::NoField
!= (TypesFieldMask
& whichField
))
955 editSField(TypesFieldMask
);
956 _sfTypes
.copyFromBin(pMem
);
958 if(FieldBits::NoField
!= (LengthsFieldMask
& whichField
))
960 editSField(LengthsFieldMask
);
961 _sfLengths
.copyFromBin(pMem
);
963 if(FieldBits::NoField
!= (PropertiesFieldMask
& whichField
))
965 editMField(PropertiesFieldMask
, _mfProperties
);
966 _mfProperties
.copyFromBin(pMem
);
968 if(FieldBits::NoField
!= (PropIndicesFieldMask
& whichField
))
970 editMField(PropIndicesFieldMask
, _mfPropIndices
);
971 _mfPropIndices
.copyFromBin(pMem
);
973 if(FieldBits::NoField
!= (PatchVerticesFieldMask
& whichField
))
975 editSField(PatchVerticesFieldMask
);
976 _sfPatchVertices
.copyFromBin(pMem
);
978 if(FieldBits::NoField
!= (DlistCacheFieldMask
& whichField
))
980 editSField(DlistCacheFieldMask
);
981 _sfDlistCache
.copyFromBin(pMem
);
983 if(FieldBits::NoField
!= (UseVAOFieldMask
& whichField
))
985 editSField(UseVAOFieldMask
);
986 _sfUseVAO
.copyFromBin(pMem
);
988 if(FieldBits::NoField
!= (UseAttribCallsFieldMask
& whichField
))
990 editSField(UseAttribCallsFieldMask
);
991 _sfUseAttribCalls
.copyFromBin(pMem
);
993 if(FieldBits::NoField
!= (ClassicGLIdFieldMask
& whichField
))
995 editSField(ClassicGLIdFieldMask
);
996 _sfClassicGLId
.copyFromBin(pMem
);
998 if(FieldBits::NoField
!= (AttGLIdFieldMask
& whichField
))
1000 editSField(AttGLIdFieldMask
);
1001 _sfAttGLId
.copyFromBin(pMem
);
1003 if(FieldBits::NoField
!= (ClassicVaoGLIdFieldMask
& whichField
))
1005 editSField(ClassicVaoGLIdFieldMask
);
1006 _sfClassicVaoGLId
.copyFromBin(pMem
);
1008 if(FieldBits::NoField
!= (AttribVaoGLIdFieldMask
& whichField
))
1010 editSField(AttribVaoGLIdFieldMask
);
1011 _sfAttribVaoGLId
.copyFromBin(pMem
);
1015 //! create a new instance of the class
1016 GeometryTransitPtr
GeometryBase::createLocal(BitVector bFlags
)
1018 GeometryTransitPtr fc
;
1020 if(getClassType().getPrototype() != NULL
)
1022 FieldContainerTransitPtr tmpPtr
=
1023 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
1025 fc
= dynamic_pointer_cast
<Geometry
>(tmpPtr
);
1031 //! create a new instance of the class, copy the container flags
1032 GeometryTransitPtr
GeometryBase::createDependent(BitVector bFlags
)
1034 GeometryTransitPtr fc
;
1036 if(getClassType().getPrototype() != NULL
)
1038 FieldContainerTransitPtr tmpPtr
=
1039 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
1041 fc
= dynamic_pointer_cast
<Geometry
>(tmpPtr
);
1047 //! create a new instance of the class
1048 GeometryTransitPtr
GeometryBase::create(void)
1050 GeometryTransitPtr fc
;
1052 if(getClassType().getPrototype() != NULL
)
1054 FieldContainerTransitPtr tmpPtr
=
1055 getClassType().getPrototype()-> shallowCopy();
1057 fc
= dynamic_pointer_cast
<Geometry
>(tmpPtr
);
1063 Geometry
*GeometryBase::createEmptyLocal(BitVector bFlags
)
1065 Geometry
*returnValue
;
1067 newPtr
<Geometry
>(returnValue
, bFlags
);
1069 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
1074 //! create an empty new instance of the class, do not copy the prototype
1075 Geometry
*GeometryBase::createEmpty(void)
1077 Geometry
*returnValue
;
1079 newPtr
<Geometry
>(returnValue
, Thread::getCurrentLocalFlags());
1081 returnValue
->_pFieldFlags
->_bNamespaceMask
&=
1082 ~Thread::getCurrentLocalFlags();
1088 FieldContainerTransitPtr
GeometryBase::shallowCopyLocal(
1089 BitVector bFlags
) const
1093 newPtr(tmpPtr
, dynamic_cast<const Geometry
*>(this), bFlags
);
1095 FieldContainerTransitPtr
returnValue(tmpPtr
);
1097 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
1102 FieldContainerTransitPtr
GeometryBase::shallowCopyDependent(
1103 BitVector bFlags
) const
1107 newPtr(tmpPtr
, dynamic_cast<const Geometry
*>(this), ~bFlags
);
1109 FieldContainerTransitPtr
returnValue(tmpPtr
);
1111 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
1116 FieldContainerTransitPtr
GeometryBase::shallowCopy(void) const
1121 dynamic_cast<const Geometry
*>(this),
1122 Thread::getCurrentLocalFlags());
1124 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
1126 FieldContainerTransitPtr
returnValue(tmpPtr
);
1134 /*------------------------- constructors ----------------------------------*/
1136 GeometryBase::GeometryBase(void) :
1140 GeoIntegralProperty::ParentsFieldId
),
1143 GeoIntegralProperty::ParentsFieldId
),
1144 _mfProperties (this,
1146 GeoVectorProperty::ParentsFieldId
),
1147 _mfPropIndices (this,
1149 GeoIntegralProperty::ParentsFieldId
),
1150 _sfPatchVertices (UInt32(0)),
1151 _sfDlistCache (bool(true)),
1152 _sfUseVAO (bool(true)),
1153 _sfUseAttribCalls (bool(false)),
1154 _sfClassicGLId (Int32(0)),
1155 _sfAttGLId (Int32(0)),
1156 _sfClassicVaoGLId (Int32(0)),
1157 _sfAttribVaoGLId (Int32(0))
1161 GeometryBase::GeometryBase(const GeometryBase
&source
) :
1165 GeoIntegralProperty::ParentsFieldId
),
1168 GeoIntegralProperty::ParentsFieldId
),
1169 _mfProperties (this,
1171 GeoVectorProperty::ParentsFieldId
),
1172 _mfPropIndices (this,
1174 GeoIntegralProperty::ParentsFieldId
),
1175 _sfPatchVertices (source
._sfPatchVertices
),
1176 _sfDlistCache (source
._sfDlistCache
),
1177 _sfUseVAO (source
._sfUseVAO
),
1178 _sfUseAttribCalls (source
._sfUseAttribCalls
),
1179 _sfClassicGLId (source
._sfClassicGLId
),
1180 _sfAttGLId (source
._sfAttGLId
),
1181 _sfClassicVaoGLId (source
._sfClassicVaoGLId
),
1182 _sfAttribVaoGLId (source
._sfAttribVaoGLId
)
1187 /*-------------------------- destructors ----------------------------------*/
1189 GeometryBase::~GeometryBase(void)
1193 /*-------------------------------------------------------------------------*/
1196 bool GeometryBase::unlinkChild(
1197 FieldContainer
* const pChild
,
1198 UInt16
const childFieldId
)
1200 if(childFieldId
== TypesFieldId
)
1202 GeoIntegralProperty
* pTypedChild
=
1203 dynamic_cast<GeoIntegralProperty
*>(pChild
);
1205 if(pTypedChild
!= NULL
)
1207 if(_sfTypes
.getValue() == pTypedChild
)
1209 editSField(TypesFieldMask
);
1211 _sfTypes
.setValue(NULL
);
1216 SWARNING
<< "Parent ([" << this
1217 << "] id [" << this->getId()
1218 << "] type [" << this->getType().getCName()
1219 << "] childFieldId [" << childFieldId
1220 << "]) - Child ([" << pChild
1221 << "] id [" << pChild
->getId()
1222 << "] type [" << pChild
->getType().getCName()
1223 << "]): link inconsistent!"
1232 if(childFieldId
== LengthsFieldId
)
1234 GeoIntegralProperty
* pTypedChild
=
1235 dynamic_cast<GeoIntegralProperty
*>(pChild
);
1237 if(pTypedChild
!= NULL
)
1239 if(_sfLengths
.getValue() == pTypedChild
)
1241 editSField(LengthsFieldMask
);
1243 _sfLengths
.setValue(NULL
);
1248 SWARNING
<< "Parent ([" << this
1249 << "] id [" << this->getId()
1250 << "] type [" << this->getType().getCName()
1251 << "] childFieldId [" << childFieldId
1252 << "]) - Child ([" << pChild
1253 << "] id [" << pChild
->getId()
1254 << "] type [" << pChild
->getType().getCName()
1255 << "]): link inconsistent!"
1264 if(childFieldId
== PropertiesFieldId
)
1266 GeoVectorProperty
* pTypedChild
=
1267 dynamic_cast<GeoVectorProperty
*>(pChild
);
1269 if(pTypedChild
!= NULL
)
1271 Int32 iChildIdx
= _mfProperties
.findIndex(pTypedChild
);
1275 editMField(PropertiesFieldMask
, _mfProperties
);
1277 _mfProperties
.erase(iChildIdx
);
1282 SWARNING
<< "Parent ([" << this
1283 << "] id [" << this->getId()
1284 << "] type [" << this->getType().getCName()
1285 << "] childFieldId [" << childFieldId
1286 << "]) - Child ([" << pChild
1287 << "] id [" << pChild
->getId()
1288 << "] type [" << pChild
->getType().getCName()
1289 << "]): link inconsistent!"
1298 if(childFieldId
== PropIndicesFieldId
)
1300 GeoIntegralProperty
* pTypedChild
=
1301 dynamic_cast<GeoIntegralProperty
*>(pChild
);
1303 if(pTypedChild
!= NULL
)
1305 Int32 iChildIdx
= _mfPropIndices
.findIndex(pTypedChild
);
1309 editMField(PropIndicesFieldMask
, _mfPropIndices
);
1311 _mfPropIndices
.erase(iChildIdx
);
1316 SWARNING
<< "Parent ([" << this
1317 << "] id [" << this->getId()
1318 << "] type [" << this->getType().getCName()
1319 << "] childFieldId [" << childFieldId
1320 << "]) - Child ([" << pChild
1321 << "] id [" << pChild
->getId()
1322 << "] type [" << pChild
->getType().getCName()
1323 << "]): link inconsistent!"
1333 return Inherited::unlinkChild(pChild
, childFieldId
);
1336 void GeometryBase::onCreate(const Geometry
*source
)
1338 Inherited::onCreate(source
);
1342 Geometry
*pThis
= static_cast<Geometry
*>(this);
1344 pThis
->setTypes(source
->getTypes());
1346 pThis
->setLengths(source
->getLengths());
1348 MFUnrecChildGeoVectorPropertyPtr::const_iterator PropertiesIt
=
1349 source
->_mfProperties
.begin();
1350 MFUnrecChildGeoVectorPropertyPtr::const_iterator PropertiesEnd
=
1351 source
->_mfProperties
.end ();
1353 while(PropertiesIt
!= PropertiesEnd
)
1355 pThis
->pushToProperties(*PropertiesIt
);
1360 MFUnrecChildGeoIntegralPropertyPtr::const_iterator PropIndicesIt
=
1361 source
->_mfPropIndices
.begin();
1362 MFUnrecChildGeoIntegralPropertyPtr::const_iterator PropIndicesEnd
=
1363 source
->_mfPropIndices
.end ();
1365 while(PropIndicesIt
!= PropIndicesEnd
)
1367 pThis
->pushToPropIndices(*PropIndicesIt
);
1374 GetFieldHandlePtr
GeometryBase::getHandleTypes (void) const
1376 SFUnrecChildGeoIntegralPropertyPtr::GetHandlePtr
returnValue(
1377 new SFUnrecChildGeoIntegralPropertyPtr::GetHandle(
1379 this->getType().getFieldDesc(TypesFieldId
),
1380 const_cast<GeometryBase
*>(this)));
1385 EditFieldHandlePtr
GeometryBase::editHandleTypes (void)
1387 SFUnrecChildGeoIntegralPropertyPtr::EditHandlePtr
returnValue(
1388 new SFUnrecChildGeoIntegralPropertyPtr::EditHandle(
1390 this->getType().getFieldDesc(TypesFieldId
),
1393 returnValue
->setSetMethod(
1394 boost::bind(&Geometry::setTypes
,
1395 static_cast<Geometry
*>(this), _1
));
1397 editSField(TypesFieldMask
);
1402 GetFieldHandlePtr
GeometryBase::getHandleLengths (void) const
1404 SFUnrecChildGeoIntegralPropertyPtr::GetHandlePtr
returnValue(
1405 new SFUnrecChildGeoIntegralPropertyPtr::GetHandle(
1407 this->getType().getFieldDesc(LengthsFieldId
),
1408 const_cast<GeometryBase
*>(this)));
1413 EditFieldHandlePtr
GeometryBase::editHandleLengths (void)
1415 SFUnrecChildGeoIntegralPropertyPtr::EditHandlePtr
returnValue(
1416 new SFUnrecChildGeoIntegralPropertyPtr::EditHandle(
1418 this->getType().getFieldDesc(LengthsFieldId
),
1421 returnValue
->setSetMethod(
1422 boost::bind(&Geometry::setLengths
,
1423 static_cast<Geometry
*>(this), _1
));
1425 editSField(LengthsFieldMask
);
1430 GetFieldHandlePtr
GeometryBase::getHandleProperties (void) const
1432 MFUnrecChildGeoVectorPropertyPtr::GetHandlePtr
returnValue(
1433 new MFUnrecChildGeoVectorPropertyPtr::GetHandle(
1435 this->getType().getFieldDesc(PropertiesFieldId
),
1436 const_cast<GeometryBase
*>(this)));
1441 EditFieldHandlePtr
GeometryBase::editHandleProperties (void)
1443 MFUnrecChildGeoVectorPropertyPtr::EditHandlePtr
returnValue(
1444 new MFUnrecChildGeoVectorPropertyPtr::EditHandle(
1446 this->getType().getFieldDesc(PropertiesFieldId
),
1449 returnValue
->setAddMethod(
1450 boost::bind(&Geometry::pushToProperties
,
1451 static_cast<Geometry
*>(this), _1
));
1452 returnValue
->setRemoveMethod(
1453 boost::bind(&Geometry::removeFromProperties
,
1454 static_cast<Geometry
*>(this), _1
));
1455 returnValue
->setRemoveObjMethod(
1456 boost::bind(&Geometry::removeObjFromProperties
,
1457 static_cast<Geometry
*>(this), _1
));
1458 returnValue
->setClearMethod(
1459 boost::bind(&Geometry::clearProperties
,
1460 static_cast<Geometry
*>(this)));
1462 editMField(PropertiesFieldMask
, _mfProperties
);
1467 GetFieldHandlePtr
GeometryBase::getHandlePropIndices (void) const
1469 MFUnrecChildGeoIntegralPropertyPtr::GetHandlePtr
returnValue(
1470 new MFUnrecChildGeoIntegralPropertyPtr::GetHandle(
1472 this->getType().getFieldDesc(PropIndicesFieldId
),
1473 const_cast<GeometryBase
*>(this)));
1478 EditFieldHandlePtr
GeometryBase::editHandlePropIndices (void)
1480 MFUnrecChildGeoIntegralPropertyPtr::EditHandlePtr
returnValue(
1481 new MFUnrecChildGeoIntegralPropertyPtr::EditHandle(
1483 this->getType().getFieldDesc(PropIndicesFieldId
),
1486 returnValue
->setAddMethod(
1487 boost::bind(&Geometry::pushToPropIndices
,
1488 static_cast<Geometry
*>(this), _1
));
1489 returnValue
->setRemoveMethod(
1490 boost::bind(&Geometry::removeFromPropIndices
,
1491 static_cast<Geometry
*>(this), _1
));
1492 returnValue
->setRemoveObjMethod(
1493 boost::bind(&Geometry::removeObjFromPropIndices
,
1494 static_cast<Geometry
*>(this), _1
));
1495 returnValue
->setClearMethod(
1496 boost::bind(&Geometry::clearPropIndices
,
1497 static_cast<Geometry
*>(this)));
1499 editMField(PropIndicesFieldMask
, _mfPropIndices
);
1504 GetFieldHandlePtr
GeometryBase::getHandlePatchVertices (void) const
1506 SFUInt32::GetHandlePtr
returnValue(
1507 new SFUInt32::GetHandle(
1509 this->getType().getFieldDesc(PatchVerticesFieldId
),
1510 const_cast<GeometryBase
*>(this)));
1515 EditFieldHandlePtr
GeometryBase::editHandlePatchVertices (void)
1517 SFUInt32::EditHandlePtr
returnValue(
1518 new SFUInt32::EditHandle(
1520 this->getType().getFieldDesc(PatchVerticesFieldId
),
1524 editSField(PatchVerticesFieldMask
);
1529 GetFieldHandlePtr
GeometryBase::getHandleDlistCache (void) const
1531 SFBool::GetHandlePtr
returnValue(
1532 new SFBool::GetHandle(
1534 this->getType().getFieldDesc(DlistCacheFieldId
),
1535 const_cast<GeometryBase
*>(this)));
1540 EditFieldHandlePtr
GeometryBase::editHandleDlistCache (void)
1542 SFBool::EditHandlePtr
returnValue(
1543 new SFBool::EditHandle(
1545 this->getType().getFieldDesc(DlistCacheFieldId
),
1549 editSField(DlistCacheFieldMask
);
1554 GetFieldHandlePtr
GeometryBase::getHandleUseVAO (void) const
1556 SFBool::GetHandlePtr
returnValue(
1557 new SFBool::GetHandle(
1559 this->getType().getFieldDesc(UseVAOFieldId
),
1560 const_cast<GeometryBase
*>(this)));
1565 EditFieldHandlePtr
GeometryBase::editHandleUseVAO (void)
1567 SFBool::EditHandlePtr
returnValue(
1568 new SFBool::EditHandle(
1570 this->getType().getFieldDesc(UseVAOFieldId
),
1574 editSField(UseVAOFieldMask
);
1579 GetFieldHandlePtr
GeometryBase::getHandleUseAttribCalls (void) const
1581 SFBool::GetHandlePtr
returnValue(
1582 new SFBool::GetHandle(
1584 this->getType().getFieldDesc(UseAttribCallsFieldId
),
1585 const_cast<GeometryBase
*>(this)));
1590 EditFieldHandlePtr
GeometryBase::editHandleUseAttribCalls (void)
1592 SFBool::EditHandlePtr
returnValue(
1593 new SFBool::EditHandle(
1595 this->getType().getFieldDesc(UseAttribCallsFieldId
),
1599 editSField(UseAttribCallsFieldMask
);
1604 GetFieldHandlePtr
GeometryBase::getHandleClassicGLId (void) const
1606 SFInt32::GetHandlePtr
returnValue(
1607 new SFInt32::GetHandle(
1609 this->getType().getFieldDesc(ClassicGLIdFieldId
),
1610 const_cast<GeometryBase
*>(this)));
1615 EditFieldHandlePtr
GeometryBase::editHandleClassicGLId (void)
1617 SFInt32::EditHandlePtr
returnValue(
1618 new SFInt32::EditHandle(
1620 this->getType().getFieldDesc(ClassicGLIdFieldId
),
1624 editSField(ClassicGLIdFieldMask
);
1629 GetFieldHandlePtr
GeometryBase::getHandleAttGLId (void) const
1631 SFInt32::GetHandlePtr
returnValue(
1632 new SFInt32::GetHandle(
1634 this->getType().getFieldDesc(AttGLIdFieldId
),
1635 const_cast<GeometryBase
*>(this)));
1640 EditFieldHandlePtr
GeometryBase::editHandleAttGLId (void)
1642 SFInt32::EditHandlePtr
returnValue(
1643 new SFInt32::EditHandle(
1645 this->getType().getFieldDesc(AttGLIdFieldId
),
1649 editSField(AttGLIdFieldMask
);
1654 GetFieldHandlePtr
GeometryBase::getHandleClassicVaoGLId (void) const
1656 SFInt32::GetHandlePtr
returnValue(
1657 new SFInt32::GetHandle(
1659 this->getType().getFieldDesc(ClassicVaoGLIdFieldId
),
1660 const_cast<GeometryBase
*>(this)));
1665 EditFieldHandlePtr
GeometryBase::editHandleClassicVaoGLId (void)
1667 SFInt32::EditHandlePtr
returnValue(
1668 new SFInt32::EditHandle(
1670 this->getType().getFieldDesc(ClassicVaoGLIdFieldId
),
1674 editSField(ClassicVaoGLIdFieldMask
);
1679 GetFieldHandlePtr
GeometryBase::getHandleAttribVaoGLId (void) const
1681 SFInt32::GetHandlePtr
returnValue(
1682 new SFInt32::GetHandle(
1684 this->getType().getFieldDesc(AttribVaoGLIdFieldId
),
1685 const_cast<GeometryBase
*>(this)));
1690 EditFieldHandlePtr
GeometryBase::editHandleAttribVaoGLId (void)
1692 SFInt32::EditHandlePtr
returnValue(
1693 new SFInt32::EditHandle(
1695 this->getType().getFieldDesc(AttribVaoGLIdFieldId
),
1699 editSField(AttribVaoGLIdFieldMask
);
1705 #ifdef OSG_MT_CPTR_ASPECT
1706 void GeometryBase::execSyncV( FieldContainer
&oFrom
,
1707 ConstFieldMaskArg whichField
,
1708 AspectOffsetStore
&oOffsets
,
1709 ConstFieldMaskArg syncMode
,
1710 const UInt32 uiSyncInfo
)
1712 Geometry
*pThis
= static_cast<Geometry
*>(this);
1714 pThis
->execSync(static_cast<Geometry
*>(&oFrom
),
1723 #ifdef OSG_MT_CPTR_ASPECT
1724 FieldContainer
*GeometryBase::createAspectCopy(
1725 const FieldContainer
*pRefAspect
) const
1727 Geometry
*returnValue
;
1729 newAspectCopy(returnValue
,
1730 dynamic_cast<const Geometry
*>(pRefAspect
),
1731 dynamic_cast<const Geometry
*>(this));
1737 void GeometryBase::resolveLinks(void)
1739 Inherited::resolveLinks();
1741 static_cast<Geometry
*>(this)->setTypes(NULL
);
1743 static_cast<Geometry
*>(this)->setLengths(NULL
);
1745 static_cast<Geometry
*>(this)->clearProperties();
1747 static_cast<Geometry
*>(this)->clearPropIndices();