Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OSGSurfaceBase.cpp

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002  *                                OpenSG                                     *
00003  *                                                                           *
00004  *                                                                           *
00005  *               Copyright (C) 2000-2002 by the OpenSG Forum                 *
00006  *                                                                           *
00007  *                            www.opensg.org                                 *
00008  *                                                                           *
00009  *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          *
00010  *                                                                           *
00011 \*---------------------------------------------------------------------------*/
00012 /*---------------------------------------------------------------------------*\
00013  *                                License                                    *
00014  *                                                                           *
00015  * This library is free software; you can redistribute it and/or modify it   *
00016  * under the terms of the GNU Library General Public License as published    *
00017  * by the Free Software Foundation, version 2.                               *
00018  *                                                                           *
00019  * This library is distributed in the hope that it will be useful, but       *
00020  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00022  * Library General Public License for more details.                          *
00023  *                                                                           *
00024  * You should have received a copy of the GNU Library General Public         *
00025  * License along with this library; if not, write to the Free Software       *
00026  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
00027  *                                                                           *
00028 \*---------------------------------------------------------------------------*/
00029 /*---------------------------------------------------------------------------*\
00030  *                                Changes                                    *
00031  *                                                                           *
00032  *                                                                           *
00033  *                                                                           *
00034  *                                                                           *
00035  *                                                                           *
00036  *                                                                           *
00037 \*---------------------------------------------------------------------------*/
00038 
00039 /*****************************************************************************\
00040  *****************************************************************************
00041  **                                                                         **
00042  **                  This file is automatically generated.                  **
00043  **                                                                         **
00044  **          Any changes made to this file WILL be lost when it is          **
00045  **           regenerated, which can become necessary at any time.          **
00046  **                                                                         **
00047  **     Do not change this file, changes should be done in the derived      **
00048  **     class Surface!
00049  **                                                                         **
00050  *****************************************************************************
00051 \*****************************************************************************/
00052 
00053 
00054 #define OSG_COMPILESURFACEINST
00055 
00056 #include <stdlib.h>
00057 #include <stdio.h>
00058 
00059 #include <OSGConfig.h>
00060 
00061 #include "OSGSurfaceBase.h"
00062 #include "OSGSurface.h"
00063 
00064 
00065 OSG_USING_NAMESPACE
00066 
00067 const OSG::BitVector  SurfaceBase::DimUFieldMask = 
00068     (TypeTraits<BitVector>::One << SurfaceBase::DimUFieldId);
00069 
00070 const OSG::BitVector  SurfaceBase::DimVFieldMask = 
00071     (TypeTraits<BitVector>::One << SurfaceBase::DimVFieldId);
00072 
00073 const OSG::BitVector  SurfaceBase::KnotsUFieldMask = 
00074     (TypeTraits<BitVector>::One << SurfaceBase::KnotsUFieldId);
00075 
00076 const OSG::BitVector  SurfaceBase::KnotsVFieldMask = 
00077     (TypeTraits<BitVector>::One << SurfaceBase::KnotsVFieldId);
00078 
00079 const OSG::BitVector  SurfaceBase::ControlPointsFieldMask = 
00080     (TypeTraits<BitVector>::One << SurfaceBase::ControlPointsFieldId);
00081 
00082 const OSG::BitVector  SurfaceBase::ErrorFieldMask = 
00083     (TypeTraits<BitVector>::One << SurfaceBase::ErrorFieldId);
00084 
00085 const OSG::BitVector  SurfaceBase::NumCurvesFieldMask = 
00086     (TypeTraits<BitVector>::One << SurfaceBase::NumCurvesFieldId);
00087 
00088 const OSG::BitVector  SurfaceBase::KnotLengthsFieldMask = 
00089     (TypeTraits<BitVector>::One << SurfaceBase::KnotLengthsFieldId);
00090 
00091 const OSG::BitVector  SurfaceBase::DimensionsFieldMask = 
00092     (TypeTraits<BitVector>::One << SurfaceBase::DimensionsFieldId);
00093 
00094 const OSG::BitVector  SurfaceBase::CurveControlPointsFieldMask = 
00095     (TypeTraits<BitVector>::One << SurfaceBase::CurveControlPointsFieldId);
00096 
00097 const OSG::BitVector  SurfaceBase::KnotsFieldMask = 
00098     (TypeTraits<BitVector>::One << SurfaceBase::KnotsFieldId);
00099 
00100 const OSG::BitVector  SurfaceBase::CurvesPerLoopFieldMask = 
00101     (TypeTraits<BitVector>::One << SurfaceBase::CurvesPerLoopFieldId);
00102 
00103 const OSG::BitVector  SurfaceBase::IsDelaunayFieldMask = 
00104     (TypeTraits<BitVector>::One << SurfaceBase::IsDelaunayFieldId);
00105 
00106 const OSG::BitVector  SurfaceBase::TextureControlPointsFieldMask = 
00107     (TypeTraits<BitVector>::One << SurfaceBase::TextureControlPointsFieldId);
00108 
00109 const OSG::BitVector  SurfaceBase::DirtyMaskFieldMask = 
00110     (TypeTraits<BitVector>::One << SurfaceBase::DirtyMaskFieldId);
00111 
00112 const OSG::BitVector  SurfaceBase::SurfaceGLIdFieldMask = 
00113     (TypeTraits<BitVector>::One << SurfaceBase::SurfaceGLIdFieldId);
00114 
00115 const OSG::BitVector SurfaceBase::MTInfluenceMask = 
00116     (Inherited::MTInfluenceMask) | 
00117     (static_cast<BitVector>(0x0) << Inherited::NextFieldId); 
00118 
00119 
00120 // Field descriptions
00121 
00171 
00172 
00173 FieldDescription *SurfaceBase::_desc[] = 
00174 {
00175     new FieldDescription(SFUInt32::getClassType(), 
00176                      "dimU", 
00177                      DimUFieldId, DimUFieldMask,
00178                      false,
00179                      (FieldAccessMethod) &SurfaceBase::getSFDimU),
00180     new FieldDescription(SFUInt32::getClassType(), 
00181                      "dimV", 
00182                      DimVFieldId, DimVFieldMask,
00183                      false,
00184                      (FieldAccessMethod) &SurfaceBase::getSFDimV),
00185     new FieldDescription(MFReal32::getClassType(), 
00186                      "knotsU", 
00187                      KnotsUFieldId, KnotsUFieldMask,
00188                      false,
00189                      (FieldAccessMethod) &SurfaceBase::getMFKnotsU),
00190     new FieldDescription(MFReal32::getClassType(), 
00191                      "knotsV", 
00192                      KnotsVFieldId, KnotsVFieldMask,
00193                      false,
00194                      (FieldAccessMethod) &SurfaceBase::getMFKnotsV),
00195     new FieldDescription(SFGeoPositionsPtr::getClassType(), 
00196                      "controlPoints", 
00197                      ControlPointsFieldId, ControlPointsFieldMask,
00198                      false,
00199                      (FieldAccessMethod) &SurfaceBase::getSFControlPoints),
00200     new FieldDescription(SFReal32::getClassType(), 
00201                      "error", 
00202                      ErrorFieldId, ErrorFieldMask,
00203                      false,
00204                      (FieldAccessMethod) &SurfaceBase::getSFError),
00205     new FieldDescription(SFUInt32::getClassType(), 
00206                      "numCurves", 
00207                      NumCurvesFieldId, NumCurvesFieldMask,
00208                      false,
00209                      (FieldAccessMethod) &SurfaceBase::getSFNumCurves),
00210     new FieldDescription(MFUInt32::getClassType(), 
00211                      "knotLengths", 
00212                      KnotLengthsFieldId, KnotLengthsFieldMask,
00213                      false,
00214                      (FieldAccessMethod) &SurfaceBase::getMFKnotLengths),
00215     new FieldDescription(MFUInt32::getClassType(), 
00216                      "dimensions", 
00217                      DimensionsFieldId, DimensionsFieldMask,
00218                      false,
00219                      (FieldAccessMethod) &SurfaceBase::getMFDimensions),
00220     new FieldDescription(MFPnt3f::getClassType(), 
00221                      "curveControlPoints", 
00222                      CurveControlPointsFieldId, CurveControlPointsFieldMask,
00223                      false,
00224                      (FieldAccessMethod) &SurfaceBase::getMFCurveControlPoints),
00225     new FieldDescription(MFReal32::getClassType(), 
00226                      "knots", 
00227                      KnotsFieldId, KnotsFieldMask,
00228                      false,
00229                      (FieldAccessMethod) &SurfaceBase::getMFKnots),
00230     new FieldDescription(MFUInt32::getClassType(), 
00231                      "curvesPerLoop", 
00232                      CurvesPerLoopFieldId, CurvesPerLoopFieldMask,
00233                      false,
00234                      (FieldAccessMethod) &SurfaceBase::getMFCurvesPerLoop),
00235     new FieldDescription(SFBool::getClassType(), 
00236                      "isDelaunay", 
00237                      IsDelaunayFieldId, IsDelaunayFieldMask,
00238                      false,
00239                      (FieldAccessMethod) &SurfaceBase::getSFIsDelaunay),
00240     new FieldDescription(SFGeoTexCoordsPtr::getClassType(), 
00241                      "textureControlPoints", 
00242                      TextureControlPointsFieldId, TextureControlPointsFieldMask,
00243                      false,
00244                      (FieldAccessMethod) &SurfaceBase::getSFTextureControlPoints),
00245     new FieldDescription(SFUInt32::getClassType(), 
00246                      "dirtyMask", 
00247                      DirtyMaskFieldId, DirtyMaskFieldMask,
00248                      true,
00249                      (FieldAccessMethod) &SurfaceBase::getSFDirtyMask),
00250     new FieldDescription(SFInt32::getClassType(), 
00251                      "SurfaceGLId", 
00252                      SurfaceGLIdFieldId, SurfaceGLIdFieldMask,
00253                      true,
00254                      (FieldAccessMethod) &SurfaceBase::getSFSurfaceGLId)
00255 };
00256 
00257 
00258 FieldContainerType SurfaceBase::_type(
00259     "Surface",
00260     "Geometry",
00261     NULL,
00262     (PrototypeCreateF) &SurfaceBase::createEmpty,
00263     Surface::initMethod,
00264     _desc,
00265     sizeof(_desc));
00266 
00267 //OSG_FIELD_CONTAINER_DEF(SurfaceBase, SurfacePtr)
00268 
00269 /*------------------------------ get -----------------------------------*/
00270 
00271 FieldContainerType &SurfaceBase::getType(void) 
00272 {
00273     return _type; 
00274 } 
00275 
00276 const FieldContainerType &SurfaceBase::getType(void) const 
00277 {
00278     return _type;
00279 } 
00280 
00281 
00282 FieldContainerPtr SurfaceBase::shallowCopy(void) const 
00283 { 
00284     SurfacePtr returnValue; 
00285 
00286     newPtr(returnValue, dynamic_cast<const Surface *>(this)); 
00287 
00288     return returnValue; 
00289 }
00290 
00291 UInt32 SurfaceBase::getContainerSize(void) const 
00292 { 
00293     return sizeof(Surface); 
00294 }
00295 
00296 
00297 #if !defined(OSG_FIXED_MFIELDSYNC)
00298 void SurfaceBase::executeSync(      FieldContainer &other,
00299                                     const BitVector      &whichField)
00300 {
00301     this->executeSyncImpl((SurfaceBase *) &other, whichField);
00302 }
00303 #else
00304 void SurfaceBase::executeSync(      FieldContainer &other,
00305                                     const BitVector      &whichField,                                    const SyncInfo       &sInfo     )
00306 {
00307     this->executeSyncImpl((SurfaceBase *) &other, whichField, sInfo);
00308 }
00309 void SurfaceBase::execBeginEdit(const BitVector &whichField, 
00310                                             UInt32     uiAspect,
00311                                             UInt32     uiContainerSize) 
00312 {
00313     this->execBeginEditImpl(whichField, uiAspect, uiContainerSize);
00314 }
00315 
00316 void SurfaceBase::onDestroyAspect(UInt32 uiId, UInt32 uiAspect)
00317 {
00318     Inherited::onDestroyAspect(uiId, uiAspect);
00319 
00320     _mfKnotsU.terminateShare(uiAspect, this->getContainerSize());
00321     _mfKnotsV.terminateShare(uiAspect, this->getContainerSize());
00322     _mfKnotLengths.terminateShare(uiAspect, this->getContainerSize());
00323     _mfDimensions.terminateShare(uiAspect, this->getContainerSize());
00324     _mfCurveControlPoints.terminateShare(uiAspect, this->getContainerSize());
00325     _mfKnots.terminateShare(uiAspect, this->getContainerSize());
00326     _mfCurvesPerLoop.terminateShare(uiAspect, this->getContainerSize());
00327 }
00328 #endif
00329 
00330 /*------------------------- constructors ----------------------------------*/
00331 
00332 #ifdef OSG_WIN32_ICL
00333 #pragma warning (disable : 383)
00334 #endif
00335 
00336 SurfaceBase::SurfaceBase(void) :
00337     _sfDimU                   (UInt32(0)), 
00338     _sfDimV                   (UInt32(0)), 
00339     _mfKnotsU                 (), 
00340     _mfKnotsV                 (), 
00341     _sfControlPoints          (), 
00342     _sfError                  (Real32(0.5)), 
00343     _sfNumCurves              (UInt32(0)), 
00344     _mfKnotLengths            (), 
00345     _mfDimensions             (), 
00346     _mfCurveControlPoints     (), 
00347     _mfKnots                  (), 
00348     _mfCurvesPerLoop          (), 
00349     _sfIsDelaunay             (bool(false)), 
00350     _sfTextureControlPoints   (), 
00351     _sfDirtyMask              (), 
00352     _sfSurfaceGLId            (), 
00353     Inherited() 
00354 {
00355 }
00356 
00357 #ifdef OSG_WIN32_ICL
00358 #pragma warning (default : 383)
00359 #endif
00360 
00361 SurfaceBase::SurfaceBase(const SurfaceBase &source) :
00362     _sfDimU                   (source._sfDimU                   ), 
00363     _sfDimV                   (source._sfDimV                   ), 
00364     _mfKnotsU                 (source._mfKnotsU                 ), 
00365     _mfKnotsV                 (source._mfKnotsV                 ), 
00366     _sfControlPoints          (source._sfControlPoints          ), 
00367     _sfError                  (source._sfError                  ), 
00368     _sfNumCurves              (source._sfNumCurves              ), 
00369     _mfKnotLengths            (source._mfKnotLengths            ), 
00370     _mfDimensions             (source._mfDimensions             ), 
00371     _mfCurveControlPoints     (source._mfCurveControlPoints     ), 
00372     _mfKnots                  (source._mfKnots                  ), 
00373     _mfCurvesPerLoop          (source._mfCurvesPerLoop          ), 
00374     _sfIsDelaunay             (source._sfIsDelaunay             ), 
00375     _sfTextureControlPoints   (source._sfTextureControlPoints   ), 
00376     _sfDirtyMask              (source._sfDirtyMask              ), 
00377     _sfSurfaceGLId            (source._sfSurfaceGLId            ), 
00378     Inherited                 (source)
00379 {
00380 }
00381 
00382 /*-------------------------- destructors ----------------------------------*/
00383 
00384 SurfaceBase::~SurfaceBase(void)
00385 {
00386 }
00387 
00388 /*------------------------------ access -----------------------------------*/
00389 
00390 UInt32 SurfaceBase::getBinSize(const BitVector &whichField)
00391 {
00392     UInt32 returnValue = Inherited::getBinSize(whichField);
00393 
00394     if(FieldBits::NoField != (DimUFieldMask & whichField))
00395     {
00396         returnValue += _sfDimU.getBinSize();
00397     }
00398 
00399     if(FieldBits::NoField != (DimVFieldMask & whichField))
00400     {
00401         returnValue += _sfDimV.getBinSize();
00402     }
00403 
00404     if(FieldBits::NoField != (KnotsUFieldMask & whichField))
00405     {
00406         returnValue += _mfKnotsU.getBinSize();
00407     }
00408 
00409     if(FieldBits::NoField != (KnotsVFieldMask & whichField))
00410     {
00411         returnValue += _mfKnotsV.getBinSize();
00412     }
00413 
00414     if(FieldBits::NoField != (ControlPointsFieldMask & whichField))
00415     {
00416         returnValue += _sfControlPoints.getBinSize();
00417     }
00418 
00419     if(FieldBits::NoField != (ErrorFieldMask & whichField))
00420     {
00421         returnValue += _sfError.getBinSize();
00422     }
00423 
00424     if(FieldBits::NoField != (NumCurvesFieldMask & whichField))
00425     {
00426         returnValue += _sfNumCurves.getBinSize();
00427     }
00428 
00429     if(FieldBits::NoField != (KnotLengthsFieldMask & whichField))
00430     {
00431         returnValue += _mfKnotLengths.getBinSize();
00432     }
00433 
00434     if(FieldBits::NoField != (DimensionsFieldMask & whichField))
00435     {
00436         returnValue += _mfDimensions.getBinSize();
00437     }
00438 
00439     if(FieldBits::NoField != (CurveControlPointsFieldMask & whichField))
00440     {
00441         returnValue += _mfCurveControlPoints.getBinSize();
00442     }
00443 
00444     if(FieldBits::NoField != (KnotsFieldMask & whichField))
00445     {
00446         returnValue += _mfKnots.getBinSize();
00447     }
00448 
00449     if(FieldBits::NoField != (CurvesPerLoopFieldMask & whichField))
00450     {
00451         returnValue += _mfCurvesPerLoop.getBinSize();
00452     }
00453 
00454     if(FieldBits::NoField != (IsDelaunayFieldMask & whichField))
00455     {
00456         returnValue += _sfIsDelaunay.getBinSize();
00457     }
00458 
00459     if(FieldBits::NoField != (TextureControlPointsFieldMask & whichField))
00460     {
00461         returnValue += _sfTextureControlPoints.getBinSize();
00462     }
00463 
00464     if(FieldBits::NoField != (DirtyMaskFieldMask & whichField))
00465     {
00466         returnValue += _sfDirtyMask.getBinSize();
00467     }
00468 
00469     if(FieldBits::NoField != (SurfaceGLIdFieldMask & whichField))
00470     {
00471         returnValue += _sfSurfaceGLId.getBinSize();
00472     }
00473 
00474 
00475     return returnValue;
00476 }
00477 
00478 void SurfaceBase::copyToBin(      BinaryDataHandler &pMem,
00479                                   const BitVector         &whichField)
00480 {
00481     Inherited::copyToBin(pMem, whichField);
00482 
00483     if(FieldBits::NoField != (DimUFieldMask & whichField))
00484     {
00485         _sfDimU.copyToBin(pMem);
00486     }
00487 
00488     if(FieldBits::NoField != (DimVFieldMask & whichField))
00489     {
00490         _sfDimV.copyToBin(pMem);
00491     }
00492 
00493     if(FieldBits::NoField != (KnotsUFieldMask & whichField))
00494     {
00495         _mfKnotsU.copyToBin(pMem);
00496     }
00497 
00498     if(FieldBits::NoField != (KnotsVFieldMask & whichField))
00499     {
00500         _mfKnotsV.copyToBin(pMem);
00501     }
00502 
00503     if(FieldBits::NoField != (ControlPointsFieldMask & whichField))
00504     {
00505         _sfControlPoints.copyToBin(pMem);
00506     }
00507 
00508     if(FieldBits::NoField != (ErrorFieldMask & whichField))
00509     {
00510         _sfError.copyToBin(pMem);
00511     }
00512 
00513     if(FieldBits::NoField != (NumCurvesFieldMask & whichField))
00514     {
00515         _sfNumCurves.copyToBin(pMem);
00516     }
00517 
00518     if(FieldBits::NoField != (KnotLengthsFieldMask & whichField))
00519     {
00520         _mfKnotLengths.copyToBin(pMem);
00521     }
00522 
00523     if(FieldBits::NoField != (DimensionsFieldMask & whichField))
00524     {
00525         _mfDimensions.copyToBin(pMem);
00526     }
00527 
00528     if(FieldBits::NoField != (CurveControlPointsFieldMask & whichField))
00529     {
00530         _mfCurveControlPoints.copyToBin(pMem);
00531     }
00532 
00533     if(FieldBits::NoField != (KnotsFieldMask & whichField))
00534     {
00535         _mfKnots.copyToBin(pMem);
00536     }
00537 
00538     if(FieldBits::NoField != (CurvesPerLoopFieldMask & whichField))
00539     {
00540         _mfCurvesPerLoop.copyToBin(pMem);
00541     }
00542 
00543     if(FieldBits::NoField != (IsDelaunayFieldMask & whichField))
00544     {
00545         _sfIsDelaunay.copyToBin(pMem);
00546     }
00547 
00548     if(FieldBits::NoField != (TextureControlPointsFieldMask & whichField))
00549     {
00550         _sfTextureControlPoints.copyToBin(pMem);
00551     }
00552 
00553     if(FieldBits::NoField != (DirtyMaskFieldMask & whichField))
00554     {
00555         _sfDirtyMask.copyToBin(pMem);
00556     }
00557 
00558     if(FieldBits::NoField != (SurfaceGLIdFieldMask & whichField))
00559     {
00560         _sfSurfaceGLId.copyToBin(pMem);
00561     }
00562 
00563 
00564 }
00565 
00566 void SurfaceBase::copyFromBin(      BinaryDataHandler &pMem,
00567                                     const BitVector    &whichField)
00568 {
00569     Inherited::copyFromBin(pMem, whichField);
00570 
00571     if(FieldBits::NoField != (DimUFieldMask & whichField))
00572     {
00573         _sfDimU.copyFromBin(pMem);
00574     }
00575 
00576     if(FieldBits::NoField != (DimVFieldMask & whichField))
00577     {
00578         _sfDimV.copyFromBin(pMem);
00579     }
00580 
00581     if(FieldBits::NoField != (KnotsUFieldMask & whichField))
00582     {
00583         _mfKnotsU.copyFromBin(pMem);
00584     }
00585 
00586     if(FieldBits::NoField != (KnotsVFieldMask & whichField))
00587     {
00588         _mfKnotsV.copyFromBin(pMem);
00589     }
00590 
00591     if(FieldBits::NoField != (ControlPointsFieldMask & whichField))
00592     {
00593         _sfControlPoints.copyFromBin(pMem);
00594     }
00595 
00596     if(FieldBits::NoField != (ErrorFieldMask & whichField))
00597     {
00598         _sfError.copyFromBin(pMem);
00599     }
00600 
00601     if(FieldBits::NoField != (NumCurvesFieldMask & whichField))
00602     {
00603         _sfNumCurves.copyFromBin(pMem);
00604     }
00605 
00606     if(FieldBits::NoField != (KnotLengthsFieldMask & whichField))
00607     {
00608         _mfKnotLengths.copyFromBin(pMem);
00609     }
00610 
00611     if(FieldBits::NoField != (DimensionsFieldMask & whichField))
00612     {
00613         _mfDimensions.copyFromBin(pMem);
00614     }
00615 
00616     if(FieldBits::NoField != (CurveControlPointsFieldMask & whichField))
00617     {
00618         _mfCurveControlPoints.copyFromBin(pMem);
00619     }
00620 
00621     if(FieldBits::NoField != (KnotsFieldMask & whichField))
00622     {
00623         _mfKnots.copyFromBin(pMem);
00624     }
00625 
00626     if(FieldBits::NoField != (CurvesPerLoopFieldMask & whichField))
00627     {
00628         _mfCurvesPerLoop.copyFromBin(pMem);
00629     }
00630 
00631     if(FieldBits::NoField != (IsDelaunayFieldMask & whichField))
00632     {
00633         _sfIsDelaunay.copyFromBin(pMem);
00634     }
00635 
00636     if(FieldBits::NoField != (TextureControlPointsFieldMask & whichField))
00637     {
00638         _sfTextureControlPoints.copyFromBin(pMem);
00639     }
00640 
00641     if(FieldBits::NoField != (DirtyMaskFieldMask & whichField))
00642     {
00643         _sfDirtyMask.copyFromBin(pMem);
00644     }
00645 
00646     if(FieldBits::NoField != (SurfaceGLIdFieldMask & whichField))
00647     {
00648         _sfSurfaceGLId.copyFromBin(pMem);
00649     }
00650 
00651 
00652 }
00653 
00654 #if !defined(OSG_FIXED_MFIELDSYNC)
00655 void SurfaceBase::executeSyncImpl(      SurfaceBase *pOther,
00656                                         const BitVector         &whichField)
00657 {
00658 
00659     Inherited::executeSyncImpl(pOther, whichField);
00660 
00661     if(FieldBits::NoField != (DimUFieldMask & whichField))
00662         _sfDimU.syncWith(pOther->_sfDimU);
00663 
00664     if(FieldBits::NoField != (DimVFieldMask & whichField))
00665         _sfDimV.syncWith(pOther->_sfDimV);
00666 
00667     if(FieldBits::NoField != (KnotsUFieldMask & whichField))
00668         _mfKnotsU.syncWith(pOther->_mfKnotsU);
00669 
00670     if(FieldBits::NoField != (KnotsVFieldMask & whichField))
00671         _mfKnotsV.syncWith(pOther->_mfKnotsV);
00672 
00673     if(FieldBits::NoField != (ControlPointsFieldMask & whichField))
00674         _sfControlPoints.syncWith(pOther->_sfControlPoints);
00675 
00676     if(FieldBits::NoField != (ErrorFieldMask & whichField))
00677         _sfError.syncWith(pOther->_sfError);
00678 
00679     if(FieldBits::NoField != (NumCurvesFieldMask & whichField))
00680         _sfNumCurves.syncWith(pOther->_sfNumCurves);
00681 
00682     if(FieldBits::NoField != (KnotLengthsFieldMask & whichField))
00683         _mfKnotLengths.syncWith(pOther->_mfKnotLengths);
00684 
00685     if(FieldBits::NoField != (DimensionsFieldMask & whichField))
00686         _mfDimensions.syncWith(pOther->_mfDimensions);
00687 
00688     if(FieldBits::NoField != (CurveControlPointsFieldMask & whichField))
00689         _mfCurveControlPoints.syncWith(pOther->_mfCurveControlPoints);
00690 
00691     if(FieldBits::NoField != (KnotsFieldMask & whichField))
00692         _mfKnots.syncWith(pOther->_mfKnots);
00693 
00694     if(FieldBits::NoField != (CurvesPerLoopFieldMask & whichField))
00695         _mfCurvesPerLoop.syncWith(pOther->_mfCurvesPerLoop);
00696 
00697     if(FieldBits::NoField != (IsDelaunayFieldMask & whichField))
00698         _sfIsDelaunay.syncWith(pOther->_sfIsDelaunay);
00699 
00700     if(FieldBits::NoField != (TextureControlPointsFieldMask & whichField))
00701         _sfTextureControlPoints.syncWith(pOther->_sfTextureControlPoints);
00702 
00703     if(FieldBits::NoField != (DirtyMaskFieldMask & whichField))
00704         _sfDirtyMask.syncWith(pOther->_sfDirtyMask);
00705 
00706     if(FieldBits::NoField != (SurfaceGLIdFieldMask & whichField))
00707         _sfSurfaceGLId.syncWith(pOther->_sfSurfaceGLId);
00708 
00709 
00710 }
00711 #else
00712 void SurfaceBase::executeSyncImpl(      SurfaceBase *pOther,
00713                                         const BitVector         &whichField,
00714                                         const SyncInfo          &sInfo      )
00715 {
00716 
00717     Inherited::executeSyncImpl(pOther, whichField, sInfo);
00718 
00719     if(FieldBits::NoField != (DimUFieldMask & whichField))
00720         _sfDimU.syncWith(pOther->_sfDimU);
00721 
00722     if(FieldBits::NoField != (DimVFieldMask & whichField))
00723         _sfDimV.syncWith(pOther->_sfDimV);
00724 
00725     if(FieldBits::NoField != (ControlPointsFieldMask & whichField))
00726         _sfControlPoints.syncWith(pOther->_sfControlPoints);
00727 
00728     if(FieldBits::NoField != (ErrorFieldMask & whichField))
00729         _sfError.syncWith(pOther->_sfError);
00730 
00731     if(FieldBits::NoField != (NumCurvesFieldMask & whichField))
00732         _sfNumCurves.syncWith(pOther->_sfNumCurves);
00733 
00734     if(FieldBits::NoField != (IsDelaunayFieldMask & whichField))
00735         _sfIsDelaunay.syncWith(pOther->_sfIsDelaunay);
00736 
00737     if(FieldBits::NoField != (TextureControlPointsFieldMask & whichField))
00738         _sfTextureControlPoints.syncWith(pOther->_sfTextureControlPoints);
00739 
00740     if(FieldBits::NoField != (DirtyMaskFieldMask & whichField))
00741         _sfDirtyMask.syncWith(pOther->_sfDirtyMask);
00742 
00743     if(FieldBits::NoField != (SurfaceGLIdFieldMask & whichField))
00744         _sfSurfaceGLId.syncWith(pOther->_sfSurfaceGLId);
00745 
00746 
00747     if(FieldBits::NoField != (KnotsUFieldMask & whichField))
00748         _mfKnotsU.syncWith(pOther->_mfKnotsU, sInfo);
00749 
00750     if(FieldBits::NoField != (KnotsVFieldMask & whichField))
00751         _mfKnotsV.syncWith(pOther->_mfKnotsV, sInfo);
00752 
00753     if(FieldBits::NoField != (KnotLengthsFieldMask & whichField))
00754         _mfKnotLengths.syncWith(pOther->_mfKnotLengths, sInfo);
00755 
00756     if(FieldBits::NoField != (DimensionsFieldMask & whichField))
00757         _mfDimensions.syncWith(pOther->_mfDimensions, sInfo);
00758 
00759     if(FieldBits::NoField != (CurveControlPointsFieldMask & whichField))
00760         _mfCurveControlPoints.syncWith(pOther->_mfCurveControlPoints, sInfo);
00761 
00762     if(FieldBits::NoField != (KnotsFieldMask & whichField))
00763         _mfKnots.syncWith(pOther->_mfKnots, sInfo);
00764 
00765     if(FieldBits::NoField != (CurvesPerLoopFieldMask & whichField))
00766         _mfCurvesPerLoop.syncWith(pOther->_mfCurvesPerLoop, sInfo);
00767 
00768 
00769 }
00770 
00771 void SurfaceBase::execBeginEditImpl (const BitVector &whichField, 
00772                                                  UInt32     uiAspect,
00773                                                  UInt32     uiContainerSize)
00774 {
00775     Inherited::execBeginEditImpl(whichField, uiAspect, uiContainerSize);
00776 
00777     if(FieldBits::NoField != (KnotsUFieldMask & whichField))
00778         _mfKnotsU.beginEdit(uiAspect, uiContainerSize);
00779 
00780     if(FieldBits::NoField != (KnotsVFieldMask & whichField))
00781         _mfKnotsV.beginEdit(uiAspect, uiContainerSize);
00782 
00783     if(FieldBits::NoField != (KnotLengthsFieldMask & whichField))
00784         _mfKnotLengths.beginEdit(uiAspect, uiContainerSize);
00785 
00786     if(FieldBits::NoField != (DimensionsFieldMask & whichField))
00787         _mfDimensions.beginEdit(uiAspect, uiContainerSize);
00788 
00789     if(FieldBits::NoField != (CurveControlPointsFieldMask & whichField))
00790         _mfCurveControlPoints.beginEdit(uiAspect, uiContainerSize);
00791 
00792     if(FieldBits::NoField != (KnotsFieldMask & whichField))
00793         _mfKnots.beginEdit(uiAspect, uiContainerSize);
00794 
00795     if(FieldBits::NoField != (CurvesPerLoopFieldMask & whichField))
00796         _mfCurvesPerLoop.beginEdit(uiAspect, uiContainerSize);
00797 
00798 }
00799 #endif
00800 
00801 
00802 
00803 #include <OSGSFieldTypeDef.inl>
00804 #include <OSGMFieldTypeDef.inl>
00805 
00806 OSG_BEGIN_NAMESPACE
00807 
00808 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
00809 DataType FieldDataTraits<SurfacePtr>::_type("SurfacePtr", "GeometryPtr");
00810 #endif
00811 
00812 OSG_DLLEXPORT_SFIELD_DEF1(SurfacePtr, OSG_SYSTEMLIB_DLLTMPLMAPPING);
00813 OSG_DLLEXPORT_MFIELD_DEF1(SurfacePtr, OSG_SYSTEMLIB_DLLTMPLMAPPING);
00814 
00815 OSG_END_NAMESPACE
00816 
00817 
00818 /*------------------------------------------------------------------------*/
00819 /*                              cvs id's                                  */
00820 
00821 #ifdef OSG_SGI_CC
00822 #pragma set woff 1174
00823 #endif
00824 
00825 #ifdef OSG_LINUX_ICC
00826 #pragma warning( disable : 177 )
00827 #endif
00828 
00829 namespace
00830 {
00831     static Char8 cvsid_cpp       [] = "@(#)$Id: FCBaseTemplate_cpp.h,v 1.42 2004/08/03 05:53:03 dirk Exp $";
00832     static Char8 cvsid_hpp       [] = OSGSURFACEBASE_HEADER_CVSID;
00833     static Char8 cvsid_inl       [] = OSGSURFACEBASE_INLINE_CVSID;
00834 
00835     static Char8 cvsid_fields_hpp[] = OSGSURFACEFIELDS_HEADER_CVSID;
00836 }
00837 

Generated on Thu Aug 25 04:11:09 2005 for OpenSG by  doxygen 1.4.3