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
>(
352 reinterpret_cast<void *>(&Geometry::classDescInserter
)),
355 "<?xml version=\"1.0\"?>\n"
358 " name=\"Geometry\"\n"
359 " parent=\"MaterialDrawable\"\n"
360 " library=\"Drawable\"\n"
361 " pointerfieldtypes=\"both\"\n"
362 " structure=\"concrete\"\n"
363 " systemcomponent=\"true\"\n"
364 " parentsystemcomponent=\"true\"\n"
365 " childFields=\"both\"\n"
366 " decoratable=\"false\"\n"
367 " isNodeCore=\"true\"\n"
368 " docGroupBase=\"GrpDrawablesGeometry\"\n"
372 " type=\"GeoIntegralProperty\"\n"
373 " cardinality=\"single\"\n"
374 " visibility=\"external\"\n"
375 " access=\"public\"\n"
376 " category=\"childpointer\"\n"
377 " childParentType=\"FieldContainer\"\n"
378 " linkParentField=\"Parents\"\n"
380 " The types property contains the primitive's types. Legal values are \n"
381 " everything that can be passed to glBegin(). There have to be as many \n"
382 " types as lengths.\n"
385 " name=\"lengths\"\n"
386 " type=\"GeoIntegralProperty\"\n"
387 " cardinality=\"single\"\n"
388 " visibility=\"external\"\n"
389 " access=\"public\"\n"
390 " category=\"childpointer\"\n"
391 " childParentType=\"FieldContainer\"\n"
392 " linkParentField=\"Parents\"\n"
394 " The lengths property contains the number of vertices to use for the \n"
395 " corresponding primitive. There have to be as many lengths as types.\n"
398 " name=\"properties\"\n"
399 " type=\"GeoVectorProperty\"\n"
400 " cardinality=\"multi\"\n"
401 " visibility=\"external\"\n"
402 " access=\"public\"\n"
403 " category=\"childpointer\"\n"
404 " childParentType=\"FieldContainer\"\n"
405 " linkParentField=\"Parents\"\n"
407 " The attributes used to render the geometry. The order is based on the \n"
408 " the one given in ARB_vertex_program.\n"
411 " name=\"propIndices\"\n"
412 " type=\"GeoIntegralProperty\"\n"
413 " cardinality=\"multi\"\n"
414 " visibility=\"external\"\n"
415 " access=\"public\"\n"
416 " category=\"childpointer\"\n"
417 " childParentType=\"FieldContainer\"\n"
418 " linkParentField=\"Parents\"\n"
420 " The indices property contains the index data. See \\ref \n"
421 " PageSystemGeoIndexing for a description of the indexing options.\n"
424 " name=\"patchVertices\"\n"
426 " cardinality=\"single\"\n"
427 " visibility=\"external\"\n"
428 " defaultValue=\"0\"\n"
429 " access=\"public\"\n"
431 "\tif primitives are patches set the number of vertices per patch. Evaluated\n"
435 " name=\"dlistCache\"\n"
437 " cardinality=\"single\"\n"
438 " visibility=\"external\"\n"
439 " defaultValue=\"true\"\n"
440 " access=\"public\"\n"
442 "\tFlag to activate caching the geometry inside a display list.\n"
447 " cardinality=\"single\"\n"
448 " visibility=\"external\"\n"
449 " defaultValue=\"true\"\n"
450 " access=\"public\"\n"
452 "\tFlag to activate caching the geometry inside a VAO.\n"
455 " name=\"useAttribCalls\"\n"
457 " cardinality=\"single\"\n"
458 " visibility=\"external\"\n"
459 " defaultValue=\"false\"\n"
460 " access=\"public\"\n"
462 "\tFlag to activate caching the geometry inside a VAO.\n"
465 " name=\"classicGLId\"\n"
467 " cardinality=\"single\"\n"
468 " visibility=\"internal\"\n"
469 " defaultValue=\"0\"\n"
470 " access=\"protected\"\n"
471 " fieldFlags=\"FClusterLocal\"\n"
473 "\tThe dlist id for the classic rendering mode, if used.\n"
476 " name=\"attGLId\"\n"
478 " cardinality=\"single\"\n"
479 " visibility=\"internal\"\n"
480 " defaultValue=\"0\"\n"
481 " access=\"protected\"\n"
482 " fieldFlags=\"FClusterLocal\"\n"
484 "\tThe dlist id for the attribute-based rendering mode, if used.\n"
487 " name=\"classicVaoGLId\"\n"
489 " cardinality=\"single\"\n"
490 " visibility=\"internal\"\n"
491 " defaultValue=\"0\"\n"
492 " access=\"protected\"\n"
493 " fieldFlags=\"FClusterLocal\"\n"
495 "\tThe vao gl id for the attribute-based rendering mode, if used.\n"
498 " name=\"attribVaoGLId\"\n"
500 " cardinality=\"single\"\n"
501 " visibility=\"internal\"\n"
502 " defaultValue=\"0\"\n"
503 " access=\"protected\"\n"
504 " fieldFlags=\"FClusterLocal\"\n"
506 "\tThe vao gl id for the attribute-based rendering mode, if used.\n"
508 "</FieldContainer>\n",
512 /*------------------------------ get -----------------------------------*/
514 FieldContainerType
&GeometryBase::getType(void)
519 const FieldContainerType
&GeometryBase::getType(void) const
524 UInt32
GeometryBase::getContainerSize(void) const
526 return sizeof(Geometry
);
529 /*------------------------- decorator get ------------------------------*/
532 //! Get the Geometry::_sfTypes field.
533 const SFUnrecChildGeoIntegralPropertyPtr
*GeometryBase::getSFTypes(void) const
538 SFUnrecChildGeoIntegralPropertyPtr
*GeometryBase::editSFTypes (void)
540 editSField(TypesFieldMask
);
545 //! Get the value of the Geometry::_sfTypes field.
546 GeoIntegralProperty
* GeometryBase::getTypes(void) const
548 return _sfTypes
.getValue();
551 //! Set the value of the Geometry::_sfTypes field.
552 void GeometryBase::setTypes(GeoIntegralProperty
* const value
)
554 editSField(TypesFieldMask
);
556 _sfTypes
.setValue(value
);
560 //! Get the Geometry::_sfLengths field.
561 const SFUnrecChildGeoIntegralPropertyPtr
*GeometryBase::getSFLengths(void) const
566 SFUnrecChildGeoIntegralPropertyPtr
*GeometryBase::editSFLengths (void)
568 editSField(LengthsFieldMask
);
573 //! Get the value of the Geometry::_sfLengths field.
574 GeoIntegralProperty
* GeometryBase::getLengths(void) const
576 return _sfLengths
.getValue();
579 //! Set the value of the Geometry::_sfLengths field.
580 void GeometryBase::setLengths(GeoIntegralProperty
* const value
)
582 editSField(LengthsFieldMask
);
584 _sfLengths
.setValue(value
);
588 //! Get the Geometry::_mfProperties field.
589 const MFUnrecChildGeoVectorPropertyPtr
*GeometryBase::getMFProperties(void) const
591 return &_mfProperties
;
594 MFUnrecChildGeoVectorPropertyPtr
*GeometryBase::editMFProperties (void)
596 editMField(PropertiesFieldMask
, _mfProperties
);
598 return &_mfProperties
;
600 GeoVectorProperty
* GeometryBase::getProperties(const UInt32 index
) const
602 return _mfProperties
[index
];
605 //! Get the Geometry::_mfPropIndices field.
606 const MFUnrecChildGeoIntegralPropertyPtr
*GeometryBase::getMFPropIndices(void) const
608 return &_mfPropIndices
;
611 MFUnrecChildGeoIntegralPropertyPtr
*GeometryBase::editMFPropIndices (void)
613 editMField(PropIndicesFieldMask
, _mfPropIndices
);
615 return &_mfPropIndices
;
617 GeoIntegralProperty
* GeometryBase::getPropIndices(const UInt32 index
) const
619 return _mfPropIndices
[index
];
622 SFUInt32
*GeometryBase::editSFPatchVertices(void)
624 editSField(PatchVerticesFieldMask
);
626 return &_sfPatchVertices
;
629 const SFUInt32
*GeometryBase::getSFPatchVertices(void) const
631 return &_sfPatchVertices
;
635 SFBool
*GeometryBase::editSFDlistCache(void)
637 editSField(DlistCacheFieldMask
);
639 return &_sfDlistCache
;
642 const SFBool
*GeometryBase::getSFDlistCache(void) const
644 return &_sfDlistCache
;
648 SFBool
*GeometryBase::editSFUseVAO(void)
650 editSField(UseVAOFieldMask
);
655 const SFBool
*GeometryBase::getSFUseVAO(void) const
661 SFBool
*GeometryBase::editSFUseAttribCalls(void)
663 editSField(UseAttribCallsFieldMask
);
665 return &_sfUseAttribCalls
;
668 const SFBool
*GeometryBase::getSFUseAttribCalls(void) const
670 return &_sfUseAttribCalls
;
674 SFInt32
*GeometryBase::editSFClassicGLId(void)
676 editSField(ClassicGLIdFieldMask
);
678 return &_sfClassicGLId
;
681 const SFInt32
*GeometryBase::getSFClassicGLId(void) const
683 return &_sfClassicGLId
;
687 SFInt32
*GeometryBase::editSFAttGLId(void)
689 editSField(AttGLIdFieldMask
);
694 const SFInt32
*GeometryBase::getSFAttGLId(void) const
700 SFInt32
*GeometryBase::editSFClassicVaoGLId(void)
702 editSField(ClassicVaoGLIdFieldMask
);
704 return &_sfClassicVaoGLId
;
707 const SFInt32
*GeometryBase::getSFClassicVaoGLId(void) const
709 return &_sfClassicVaoGLId
;
713 SFInt32
*GeometryBase::editSFAttribVaoGLId(void)
715 editSField(AttribVaoGLIdFieldMask
);
717 return &_sfAttribVaoGLId
;
720 const SFInt32
*GeometryBase::getSFAttribVaoGLId(void) const
722 return &_sfAttribVaoGLId
;
728 void GeometryBase::pushToProperties(GeoVectorProperty
* const value
)
730 editMField(PropertiesFieldMask
, _mfProperties
);
732 _mfProperties
.push_back(value
);
735 void GeometryBase::assignProperties(const MFUnrecChildGeoVectorPropertyPtr
&value
)
737 MFUnrecChildGeoVectorPropertyPtr::const_iterator elemIt
=
739 MFUnrecChildGeoVectorPropertyPtr::const_iterator elemEnd
=
742 static_cast<Geometry
*>(this)->clearProperties();
744 while(elemIt
!= elemEnd
)
746 this->pushToProperties(*elemIt
);
752 void GeometryBase::removeFromProperties(UInt32 uiIndex
)
754 if(uiIndex
< _mfProperties
.size())
756 editMField(PropertiesFieldMask
, _mfProperties
);
758 _mfProperties
.erase(uiIndex
);
762 void GeometryBase::removeObjFromProperties(GeoVectorProperty
* const value
)
764 Int32 iElemIdx
= _mfProperties
.findIndex(value
);
768 editMField(PropertiesFieldMask
, _mfProperties
);
770 _mfProperties
.erase(iElemIdx
);
773 void GeometryBase::clearProperties(void)
775 editMField(PropertiesFieldMask
, _mfProperties
);
778 _mfProperties
.clear();
781 void GeometryBase::pushToPropIndices(GeoIntegralProperty
* const value
)
783 editMField(PropIndicesFieldMask
, _mfPropIndices
);
785 _mfPropIndices
.push_back(value
);
788 void GeometryBase::assignPropIndices(const MFUnrecChildGeoIntegralPropertyPtr
&value
)
790 MFUnrecChildGeoIntegralPropertyPtr::const_iterator elemIt
=
792 MFUnrecChildGeoIntegralPropertyPtr::const_iterator elemEnd
=
795 static_cast<Geometry
*>(this)->clearPropIndices();
797 while(elemIt
!= elemEnd
)
799 this->pushToPropIndices(*elemIt
);
805 void GeometryBase::removeFromPropIndices(UInt32 uiIndex
)
807 if(uiIndex
< _mfPropIndices
.size())
809 editMField(PropIndicesFieldMask
, _mfPropIndices
);
811 _mfPropIndices
.erase(uiIndex
);
815 void GeometryBase::removeObjFromPropIndices(GeoIntegralProperty
* const value
)
817 Int32 iElemIdx
= _mfPropIndices
.findIndex(value
);
821 editMField(PropIndicesFieldMask
, _mfPropIndices
);
823 _mfPropIndices
.erase(iElemIdx
);
826 void GeometryBase::clearPropIndices(void)
828 editMField(PropIndicesFieldMask
, _mfPropIndices
);
831 _mfPropIndices
.clear();
836 /*------------------------------ access -----------------------------------*/
838 SizeT
GeometryBase::getBinSize(ConstFieldMaskArg whichField
)
840 SizeT returnValue
= Inherited::getBinSize(whichField
);
842 if(FieldBits::NoField
!= (TypesFieldMask
& whichField
))
844 returnValue
+= _sfTypes
.getBinSize();
846 if(FieldBits::NoField
!= (LengthsFieldMask
& whichField
))
848 returnValue
+= _sfLengths
.getBinSize();
850 if(FieldBits::NoField
!= (PropertiesFieldMask
& whichField
))
852 returnValue
+= _mfProperties
.getBinSize();
854 if(FieldBits::NoField
!= (PropIndicesFieldMask
& whichField
))
856 returnValue
+= _mfPropIndices
.getBinSize();
858 if(FieldBits::NoField
!= (PatchVerticesFieldMask
& whichField
))
860 returnValue
+= _sfPatchVertices
.getBinSize();
862 if(FieldBits::NoField
!= (DlistCacheFieldMask
& whichField
))
864 returnValue
+= _sfDlistCache
.getBinSize();
866 if(FieldBits::NoField
!= (UseVAOFieldMask
& whichField
))
868 returnValue
+= _sfUseVAO
.getBinSize();
870 if(FieldBits::NoField
!= (UseAttribCallsFieldMask
& whichField
))
872 returnValue
+= _sfUseAttribCalls
.getBinSize();
874 if(FieldBits::NoField
!= (ClassicGLIdFieldMask
& whichField
))
876 returnValue
+= _sfClassicGLId
.getBinSize();
878 if(FieldBits::NoField
!= (AttGLIdFieldMask
& whichField
))
880 returnValue
+= _sfAttGLId
.getBinSize();
882 if(FieldBits::NoField
!= (ClassicVaoGLIdFieldMask
& whichField
))
884 returnValue
+= _sfClassicVaoGLId
.getBinSize();
886 if(FieldBits::NoField
!= (AttribVaoGLIdFieldMask
& whichField
))
888 returnValue
+= _sfAttribVaoGLId
.getBinSize();
894 void GeometryBase::copyToBin(BinaryDataHandler
&pMem
,
895 ConstFieldMaskArg whichField
)
897 Inherited::copyToBin(pMem
, whichField
);
899 if(FieldBits::NoField
!= (TypesFieldMask
& whichField
))
901 _sfTypes
.copyToBin(pMem
);
903 if(FieldBits::NoField
!= (LengthsFieldMask
& whichField
))
905 _sfLengths
.copyToBin(pMem
);
907 if(FieldBits::NoField
!= (PropertiesFieldMask
& whichField
))
909 _mfProperties
.copyToBin(pMem
);
911 if(FieldBits::NoField
!= (PropIndicesFieldMask
& whichField
))
913 _mfPropIndices
.copyToBin(pMem
);
915 if(FieldBits::NoField
!= (PatchVerticesFieldMask
& whichField
))
917 _sfPatchVertices
.copyToBin(pMem
);
919 if(FieldBits::NoField
!= (DlistCacheFieldMask
& whichField
))
921 _sfDlistCache
.copyToBin(pMem
);
923 if(FieldBits::NoField
!= (UseVAOFieldMask
& whichField
))
925 _sfUseVAO
.copyToBin(pMem
);
927 if(FieldBits::NoField
!= (UseAttribCallsFieldMask
& whichField
))
929 _sfUseAttribCalls
.copyToBin(pMem
);
931 if(FieldBits::NoField
!= (ClassicGLIdFieldMask
& whichField
))
933 _sfClassicGLId
.copyToBin(pMem
);
935 if(FieldBits::NoField
!= (AttGLIdFieldMask
& whichField
))
937 _sfAttGLId
.copyToBin(pMem
);
939 if(FieldBits::NoField
!= (ClassicVaoGLIdFieldMask
& whichField
))
941 _sfClassicVaoGLId
.copyToBin(pMem
);
943 if(FieldBits::NoField
!= (AttribVaoGLIdFieldMask
& whichField
))
945 _sfAttribVaoGLId
.copyToBin(pMem
);
949 void GeometryBase::copyFromBin(BinaryDataHandler
&pMem
,
950 ConstFieldMaskArg whichField
)
952 Inherited::copyFromBin(pMem
, whichField
);
954 if(FieldBits::NoField
!= (TypesFieldMask
& whichField
))
956 editSField(TypesFieldMask
);
957 _sfTypes
.copyFromBin(pMem
);
959 if(FieldBits::NoField
!= (LengthsFieldMask
& whichField
))
961 editSField(LengthsFieldMask
);
962 _sfLengths
.copyFromBin(pMem
);
964 if(FieldBits::NoField
!= (PropertiesFieldMask
& whichField
))
966 editMField(PropertiesFieldMask
, _mfProperties
);
967 _mfProperties
.copyFromBin(pMem
);
969 if(FieldBits::NoField
!= (PropIndicesFieldMask
& whichField
))
971 editMField(PropIndicesFieldMask
, _mfPropIndices
);
972 _mfPropIndices
.copyFromBin(pMem
);
974 if(FieldBits::NoField
!= (PatchVerticesFieldMask
& whichField
))
976 editSField(PatchVerticesFieldMask
);
977 _sfPatchVertices
.copyFromBin(pMem
);
979 if(FieldBits::NoField
!= (DlistCacheFieldMask
& whichField
))
981 editSField(DlistCacheFieldMask
);
982 _sfDlistCache
.copyFromBin(pMem
);
984 if(FieldBits::NoField
!= (UseVAOFieldMask
& whichField
))
986 editSField(UseVAOFieldMask
);
987 _sfUseVAO
.copyFromBin(pMem
);
989 if(FieldBits::NoField
!= (UseAttribCallsFieldMask
& whichField
))
991 editSField(UseAttribCallsFieldMask
);
992 _sfUseAttribCalls
.copyFromBin(pMem
);
994 if(FieldBits::NoField
!= (ClassicGLIdFieldMask
& whichField
))
996 editSField(ClassicGLIdFieldMask
);
997 _sfClassicGLId
.copyFromBin(pMem
);
999 if(FieldBits::NoField
!= (AttGLIdFieldMask
& whichField
))
1001 editSField(AttGLIdFieldMask
);
1002 _sfAttGLId
.copyFromBin(pMem
);
1004 if(FieldBits::NoField
!= (ClassicVaoGLIdFieldMask
& whichField
))
1006 editSField(ClassicVaoGLIdFieldMask
);
1007 _sfClassicVaoGLId
.copyFromBin(pMem
);
1009 if(FieldBits::NoField
!= (AttribVaoGLIdFieldMask
& whichField
))
1011 editSField(AttribVaoGLIdFieldMask
);
1012 _sfAttribVaoGLId
.copyFromBin(pMem
);
1016 //! create a new instance of the class
1017 GeometryTransitPtr
GeometryBase::createLocal(BitVector bFlags
)
1019 GeometryTransitPtr fc
;
1021 if(getClassType().getPrototype() != NULL
)
1023 FieldContainerTransitPtr tmpPtr
=
1024 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
1026 fc
= dynamic_pointer_cast
<Geometry
>(tmpPtr
);
1032 //! create a new instance of the class, copy the container flags
1033 GeometryTransitPtr
GeometryBase::createDependent(BitVector bFlags
)
1035 GeometryTransitPtr fc
;
1037 if(getClassType().getPrototype() != NULL
)
1039 FieldContainerTransitPtr tmpPtr
=
1040 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
1042 fc
= dynamic_pointer_cast
<Geometry
>(tmpPtr
);
1048 //! create a new instance of the class
1049 GeometryTransitPtr
GeometryBase::create(void)
1051 GeometryTransitPtr fc
;
1053 if(getClassType().getPrototype() != NULL
)
1055 FieldContainerTransitPtr tmpPtr
=
1056 getClassType().getPrototype()-> shallowCopy();
1058 fc
= dynamic_pointer_cast
<Geometry
>(tmpPtr
);
1064 Geometry
*GeometryBase::createEmptyLocal(BitVector bFlags
)
1066 Geometry
*returnValue
;
1068 newPtr
<Geometry
>(returnValue
, bFlags
);
1070 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
1075 //! create an empty new instance of the class, do not copy the prototype
1076 Geometry
*GeometryBase::createEmpty(void)
1078 Geometry
*returnValue
;
1080 newPtr
<Geometry
>(returnValue
, Thread::getCurrentLocalFlags());
1082 returnValue
->_pFieldFlags
->_bNamespaceMask
&=
1083 ~Thread::getCurrentLocalFlags();
1089 FieldContainerTransitPtr
GeometryBase::shallowCopyLocal(
1090 BitVector bFlags
) const
1094 newPtr(tmpPtr
, dynamic_cast<const Geometry
*>(this), bFlags
);
1096 FieldContainerTransitPtr
returnValue(tmpPtr
);
1098 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
1103 FieldContainerTransitPtr
GeometryBase::shallowCopyDependent(
1104 BitVector bFlags
) const
1108 newPtr(tmpPtr
, dynamic_cast<const Geometry
*>(this), ~bFlags
);
1110 FieldContainerTransitPtr
returnValue(tmpPtr
);
1112 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
1117 FieldContainerTransitPtr
GeometryBase::shallowCopy(void) const
1122 dynamic_cast<const Geometry
*>(this),
1123 Thread::getCurrentLocalFlags());
1125 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
1127 FieldContainerTransitPtr
returnValue(tmpPtr
);
1135 /*------------------------- constructors ----------------------------------*/
1137 GeometryBase::GeometryBase(void) :
1141 GeoIntegralProperty::ParentsFieldId
),
1144 GeoIntegralProperty::ParentsFieldId
),
1145 _mfProperties (this,
1147 GeoVectorProperty::ParentsFieldId
),
1148 _mfPropIndices (this,
1150 GeoIntegralProperty::ParentsFieldId
),
1151 _sfPatchVertices (UInt32(0)),
1152 _sfDlistCache (bool(true)),
1153 _sfUseVAO (bool(true)),
1154 _sfUseAttribCalls (bool(false)),
1155 _sfClassicGLId (Int32(0)),
1156 _sfAttGLId (Int32(0)),
1157 _sfClassicVaoGLId (Int32(0)),
1158 _sfAttribVaoGLId (Int32(0))
1162 GeometryBase::GeometryBase(const GeometryBase
&source
) :
1166 GeoIntegralProperty::ParentsFieldId
),
1169 GeoIntegralProperty::ParentsFieldId
),
1170 _mfProperties (this,
1172 GeoVectorProperty::ParentsFieldId
),
1173 _mfPropIndices (this,
1175 GeoIntegralProperty::ParentsFieldId
),
1176 _sfPatchVertices (source
._sfPatchVertices
),
1177 _sfDlistCache (source
._sfDlistCache
),
1178 _sfUseVAO (source
._sfUseVAO
),
1179 _sfUseAttribCalls (source
._sfUseAttribCalls
),
1180 _sfClassicGLId (source
._sfClassicGLId
),
1181 _sfAttGLId (source
._sfAttGLId
),
1182 _sfClassicVaoGLId (source
._sfClassicVaoGLId
),
1183 _sfAttribVaoGLId (source
._sfAttribVaoGLId
)
1188 /*-------------------------- destructors ----------------------------------*/
1190 GeometryBase::~GeometryBase(void)
1194 /*-------------------------------------------------------------------------*/
1197 bool GeometryBase::unlinkChild(
1198 FieldContainer
* const pChild
,
1199 UInt16
const childFieldId
)
1201 if(childFieldId
== TypesFieldId
)
1203 GeoIntegralProperty
* pTypedChild
=
1204 dynamic_cast<GeoIntegralProperty
*>(pChild
);
1206 if(pTypedChild
!= NULL
)
1208 if(_sfTypes
.getValue() == pTypedChild
)
1210 editSField(TypesFieldMask
);
1212 _sfTypes
.setValue(NULL
);
1217 SWARNING
<< "Parent ([" << this
1218 << "] id [" << this->getId()
1219 << "] type [" << this->getType().getCName()
1220 << "] childFieldId [" << childFieldId
1221 << "]) - Child ([" << pChild
1222 << "] id [" << pChild
->getId()
1223 << "] type [" << pChild
->getType().getCName()
1224 << "]): link inconsistent!"
1233 if(childFieldId
== LengthsFieldId
)
1235 GeoIntegralProperty
* pTypedChild
=
1236 dynamic_cast<GeoIntegralProperty
*>(pChild
);
1238 if(pTypedChild
!= NULL
)
1240 if(_sfLengths
.getValue() == pTypedChild
)
1242 editSField(LengthsFieldMask
);
1244 _sfLengths
.setValue(NULL
);
1249 SWARNING
<< "Parent ([" << this
1250 << "] id [" << this->getId()
1251 << "] type [" << this->getType().getCName()
1252 << "] childFieldId [" << childFieldId
1253 << "]) - Child ([" << pChild
1254 << "] id [" << pChild
->getId()
1255 << "] type [" << pChild
->getType().getCName()
1256 << "]): link inconsistent!"
1265 if(childFieldId
== PropertiesFieldId
)
1267 GeoVectorProperty
* pTypedChild
=
1268 dynamic_cast<GeoVectorProperty
*>(pChild
);
1270 if(pTypedChild
!= NULL
)
1272 Int32 iChildIdx
= _mfProperties
.findIndex(pTypedChild
);
1276 editMField(PropertiesFieldMask
, _mfProperties
);
1278 _mfProperties
.erase(iChildIdx
);
1283 SWARNING
<< "Parent ([" << this
1284 << "] id [" << this->getId()
1285 << "] type [" << this->getType().getCName()
1286 << "] childFieldId [" << childFieldId
1287 << "]) - Child ([" << pChild
1288 << "] id [" << pChild
->getId()
1289 << "] type [" << pChild
->getType().getCName()
1290 << "]): link inconsistent!"
1299 if(childFieldId
== PropIndicesFieldId
)
1301 GeoIntegralProperty
* pTypedChild
=
1302 dynamic_cast<GeoIntegralProperty
*>(pChild
);
1304 if(pTypedChild
!= NULL
)
1306 Int32 iChildIdx
= _mfPropIndices
.findIndex(pTypedChild
);
1310 editMField(PropIndicesFieldMask
, _mfPropIndices
);
1312 _mfPropIndices
.erase(iChildIdx
);
1317 SWARNING
<< "Parent ([" << this
1318 << "] id [" << this->getId()
1319 << "] type [" << this->getType().getCName()
1320 << "] childFieldId [" << childFieldId
1321 << "]) - Child ([" << pChild
1322 << "] id [" << pChild
->getId()
1323 << "] type [" << pChild
->getType().getCName()
1324 << "]): link inconsistent!"
1334 return Inherited::unlinkChild(pChild
, childFieldId
);
1337 void GeometryBase::onCreate(const Geometry
*source
)
1339 Inherited::onCreate(source
);
1343 Geometry
*pThis
= static_cast<Geometry
*>(this);
1345 pThis
->setTypes(source
->getTypes());
1347 pThis
->setLengths(source
->getLengths());
1349 MFUnrecChildGeoVectorPropertyPtr::const_iterator PropertiesIt
=
1350 source
->_mfProperties
.begin();
1351 MFUnrecChildGeoVectorPropertyPtr::const_iterator PropertiesEnd
=
1352 source
->_mfProperties
.end ();
1354 while(PropertiesIt
!= PropertiesEnd
)
1356 pThis
->pushToProperties(*PropertiesIt
);
1361 MFUnrecChildGeoIntegralPropertyPtr::const_iterator PropIndicesIt
=
1362 source
->_mfPropIndices
.begin();
1363 MFUnrecChildGeoIntegralPropertyPtr::const_iterator PropIndicesEnd
=
1364 source
->_mfPropIndices
.end ();
1366 while(PropIndicesIt
!= PropIndicesEnd
)
1368 pThis
->pushToPropIndices(*PropIndicesIt
);
1375 GetFieldHandlePtr
GeometryBase::getHandleTypes (void) const
1377 SFUnrecChildGeoIntegralPropertyPtr::GetHandlePtr
returnValue(
1378 new SFUnrecChildGeoIntegralPropertyPtr::GetHandle(
1380 this->getType().getFieldDesc(TypesFieldId
),
1381 const_cast<GeometryBase
*>(this)));
1386 EditFieldHandlePtr
GeometryBase::editHandleTypes (void)
1388 SFUnrecChildGeoIntegralPropertyPtr::EditHandlePtr
returnValue(
1389 new SFUnrecChildGeoIntegralPropertyPtr::EditHandle(
1391 this->getType().getFieldDesc(TypesFieldId
),
1394 returnValue
->setSetMethod(
1395 boost::bind(&Geometry::setTypes
,
1396 static_cast<Geometry
*>(this), _1
));
1398 editSField(TypesFieldMask
);
1403 GetFieldHandlePtr
GeometryBase::getHandleLengths (void) const
1405 SFUnrecChildGeoIntegralPropertyPtr::GetHandlePtr
returnValue(
1406 new SFUnrecChildGeoIntegralPropertyPtr::GetHandle(
1408 this->getType().getFieldDesc(LengthsFieldId
),
1409 const_cast<GeometryBase
*>(this)));
1414 EditFieldHandlePtr
GeometryBase::editHandleLengths (void)
1416 SFUnrecChildGeoIntegralPropertyPtr::EditHandlePtr
returnValue(
1417 new SFUnrecChildGeoIntegralPropertyPtr::EditHandle(
1419 this->getType().getFieldDesc(LengthsFieldId
),
1422 returnValue
->setSetMethod(
1423 boost::bind(&Geometry::setLengths
,
1424 static_cast<Geometry
*>(this), _1
));
1426 editSField(LengthsFieldMask
);
1431 GetFieldHandlePtr
GeometryBase::getHandleProperties (void) const
1433 MFUnrecChildGeoVectorPropertyPtr::GetHandlePtr
returnValue(
1434 new MFUnrecChildGeoVectorPropertyPtr::GetHandle(
1436 this->getType().getFieldDesc(PropertiesFieldId
),
1437 const_cast<GeometryBase
*>(this)));
1442 EditFieldHandlePtr
GeometryBase::editHandleProperties (void)
1444 MFUnrecChildGeoVectorPropertyPtr::EditHandlePtr
returnValue(
1445 new MFUnrecChildGeoVectorPropertyPtr::EditHandle(
1447 this->getType().getFieldDesc(PropertiesFieldId
),
1450 returnValue
->setAddMethod(
1451 boost::bind(&Geometry::pushToProperties
,
1452 static_cast<Geometry
*>(this), _1
));
1453 returnValue
->setRemoveMethod(
1454 boost::bind(&Geometry::removeFromProperties
,
1455 static_cast<Geometry
*>(this), _1
));
1456 returnValue
->setRemoveObjMethod(
1457 boost::bind(&Geometry::removeObjFromProperties
,
1458 static_cast<Geometry
*>(this), _1
));
1459 returnValue
->setClearMethod(
1460 boost::bind(&Geometry::clearProperties
,
1461 static_cast<Geometry
*>(this)));
1463 editMField(PropertiesFieldMask
, _mfProperties
);
1468 GetFieldHandlePtr
GeometryBase::getHandlePropIndices (void) const
1470 MFUnrecChildGeoIntegralPropertyPtr::GetHandlePtr
returnValue(
1471 new MFUnrecChildGeoIntegralPropertyPtr::GetHandle(
1473 this->getType().getFieldDesc(PropIndicesFieldId
),
1474 const_cast<GeometryBase
*>(this)));
1479 EditFieldHandlePtr
GeometryBase::editHandlePropIndices (void)
1481 MFUnrecChildGeoIntegralPropertyPtr::EditHandlePtr
returnValue(
1482 new MFUnrecChildGeoIntegralPropertyPtr::EditHandle(
1484 this->getType().getFieldDesc(PropIndicesFieldId
),
1487 returnValue
->setAddMethod(
1488 boost::bind(&Geometry::pushToPropIndices
,
1489 static_cast<Geometry
*>(this), _1
));
1490 returnValue
->setRemoveMethod(
1491 boost::bind(&Geometry::removeFromPropIndices
,
1492 static_cast<Geometry
*>(this), _1
));
1493 returnValue
->setRemoveObjMethod(
1494 boost::bind(&Geometry::removeObjFromPropIndices
,
1495 static_cast<Geometry
*>(this), _1
));
1496 returnValue
->setClearMethod(
1497 boost::bind(&Geometry::clearPropIndices
,
1498 static_cast<Geometry
*>(this)));
1500 editMField(PropIndicesFieldMask
, _mfPropIndices
);
1505 GetFieldHandlePtr
GeometryBase::getHandlePatchVertices (void) const
1507 SFUInt32::GetHandlePtr
returnValue(
1508 new SFUInt32::GetHandle(
1510 this->getType().getFieldDesc(PatchVerticesFieldId
),
1511 const_cast<GeometryBase
*>(this)));
1516 EditFieldHandlePtr
GeometryBase::editHandlePatchVertices (void)
1518 SFUInt32::EditHandlePtr
returnValue(
1519 new SFUInt32::EditHandle(
1521 this->getType().getFieldDesc(PatchVerticesFieldId
),
1525 editSField(PatchVerticesFieldMask
);
1530 GetFieldHandlePtr
GeometryBase::getHandleDlistCache (void) const
1532 SFBool::GetHandlePtr
returnValue(
1533 new SFBool::GetHandle(
1535 this->getType().getFieldDesc(DlistCacheFieldId
),
1536 const_cast<GeometryBase
*>(this)));
1541 EditFieldHandlePtr
GeometryBase::editHandleDlistCache (void)
1543 SFBool::EditHandlePtr
returnValue(
1544 new SFBool::EditHandle(
1546 this->getType().getFieldDesc(DlistCacheFieldId
),
1550 editSField(DlistCacheFieldMask
);
1555 GetFieldHandlePtr
GeometryBase::getHandleUseVAO (void) const
1557 SFBool::GetHandlePtr
returnValue(
1558 new SFBool::GetHandle(
1560 this->getType().getFieldDesc(UseVAOFieldId
),
1561 const_cast<GeometryBase
*>(this)));
1566 EditFieldHandlePtr
GeometryBase::editHandleUseVAO (void)
1568 SFBool::EditHandlePtr
returnValue(
1569 new SFBool::EditHandle(
1571 this->getType().getFieldDesc(UseVAOFieldId
),
1575 editSField(UseVAOFieldMask
);
1580 GetFieldHandlePtr
GeometryBase::getHandleUseAttribCalls (void) const
1582 SFBool::GetHandlePtr
returnValue(
1583 new SFBool::GetHandle(
1585 this->getType().getFieldDesc(UseAttribCallsFieldId
),
1586 const_cast<GeometryBase
*>(this)));
1591 EditFieldHandlePtr
GeometryBase::editHandleUseAttribCalls (void)
1593 SFBool::EditHandlePtr
returnValue(
1594 new SFBool::EditHandle(
1596 this->getType().getFieldDesc(UseAttribCallsFieldId
),
1600 editSField(UseAttribCallsFieldMask
);
1605 GetFieldHandlePtr
GeometryBase::getHandleClassicGLId (void) const
1607 SFInt32::GetHandlePtr
returnValue(
1608 new SFInt32::GetHandle(
1610 this->getType().getFieldDesc(ClassicGLIdFieldId
),
1611 const_cast<GeometryBase
*>(this)));
1616 EditFieldHandlePtr
GeometryBase::editHandleClassicGLId (void)
1618 SFInt32::EditHandlePtr
returnValue(
1619 new SFInt32::EditHandle(
1621 this->getType().getFieldDesc(ClassicGLIdFieldId
),
1625 editSField(ClassicGLIdFieldMask
);
1630 GetFieldHandlePtr
GeometryBase::getHandleAttGLId (void) const
1632 SFInt32::GetHandlePtr
returnValue(
1633 new SFInt32::GetHandle(
1635 this->getType().getFieldDesc(AttGLIdFieldId
),
1636 const_cast<GeometryBase
*>(this)));
1641 EditFieldHandlePtr
GeometryBase::editHandleAttGLId (void)
1643 SFInt32::EditHandlePtr
returnValue(
1644 new SFInt32::EditHandle(
1646 this->getType().getFieldDesc(AttGLIdFieldId
),
1650 editSField(AttGLIdFieldMask
);
1655 GetFieldHandlePtr
GeometryBase::getHandleClassicVaoGLId (void) const
1657 SFInt32::GetHandlePtr
returnValue(
1658 new SFInt32::GetHandle(
1660 this->getType().getFieldDesc(ClassicVaoGLIdFieldId
),
1661 const_cast<GeometryBase
*>(this)));
1666 EditFieldHandlePtr
GeometryBase::editHandleClassicVaoGLId (void)
1668 SFInt32::EditHandlePtr
returnValue(
1669 new SFInt32::EditHandle(
1671 this->getType().getFieldDesc(ClassicVaoGLIdFieldId
),
1675 editSField(ClassicVaoGLIdFieldMask
);
1680 GetFieldHandlePtr
GeometryBase::getHandleAttribVaoGLId (void) const
1682 SFInt32::GetHandlePtr
returnValue(
1683 new SFInt32::GetHandle(
1685 this->getType().getFieldDesc(AttribVaoGLIdFieldId
),
1686 const_cast<GeometryBase
*>(this)));
1691 EditFieldHandlePtr
GeometryBase::editHandleAttribVaoGLId (void)
1693 SFInt32::EditHandlePtr
returnValue(
1694 new SFInt32::EditHandle(
1696 this->getType().getFieldDesc(AttribVaoGLIdFieldId
),
1700 editSField(AttribVaoGLIdFieldMask
);
1706 #ifdef OSG_MT_CPTR_ASPECT
1707 void GeometryBase::execSyncV( FieldContainer
&oFrom
,
1708 ConstFieldMaskArg whichField
,
1709 AspectOffsetStore
&oOffsets
,
1710 ConstFieldMaskArg syncMode
,
1711 const UInt32 uiSyncInfo
)
1713 Geometry
*pThis
= static_cast<Geometry
*>(this);
1715 pThis
->execSync(static_cast<Geometry
*>(&oFrom
),
1724 #ifdef OSG_MT_CPTR_ASPECT
1725 FieldContainer
*GeometryBase::createAspectCopy(
1726 const FieldContainer
*pRefAspect
) const
1728 Geometry
*returnValue
;
1730 newAspectCopy(returnValue
,
1731 dynamic_cast<const Geometry
*>(pRefAspect
),
1732 dynamic_cast<const Geometry
*>(this));
1738 void GeometryBase::resolveLinks(void)
1740 Inherited::resolveLinks();
1742 static_cast<Geometry
*>(this)->setTypes(NULL
);
1744 static_cast<Geometry
*>(this)->setLengths(NULL
);
1746 static_cast<Geometry
*>(this)->clearProperties();
1748 static_cast<Geometry
*>(this)->clearPropIndices();