00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 #define OSG_COMPILESKYBACKGROUNDINST
00055
00056 #include <stdlib.h>
00057 #include <stdio.h>
00058
00059 #include <OSGConfig.h>
00060
00061 #include "OSGSkyBackgroundBase.h"
00062 #include "OSGSkyBackground.h"
00063
00064
00065 OSG_BEGIN_NAMESPACE
00066
00067 const OSG::BitVector SkyBackgroundBase::SkyColorFieldMask =
00068 (TypeTraits<BitVector>::One << SkyBackgroundBase::SkyColorFieldId);
00069
00070 const OSG::BitVector SkyBackgroundBase::SkyAngleFieldMask =
00071 (TypeTraits<BitVector>::One << SkyBackgroundBase::SkyAngleFieldId);
00072
00073 const OSG::BitVector SkyBackgroundBase::GroundColorFieldMask =
00074 (TypeTraits<BitVector>::One << SkyBackgroundBase::GroundColorFieldId);
00075
00076 const OSG::BitVector SkyBackgroundBase::GroundAngleFieldMask =
00077 (TypeTraits<BitVector>::One << SkyBackgroundBase::GroundAngleFieldId);
00078
00079 const OSG::BitVector SkyBackgroundBase::SphereResFieldMask =
00080 (TypeTraits<BitVector>::One << SkyBackgroundBase::SphereResFieldId);
00081
00082 const OSG::BitVector SkyBackgroundBase::BackTextureFieldMask =
00083 (TypeTraits<BitVector>::One << SkyBackgroundBase::BackTextureFieldId);
00084
00085 const OSG::BitVector SkyBackgroundBase::BottomTextureFieldMask =
00086 (TypeTraits<BitVector>::One << SkyBackgroundBase::BottomTextureFieldId);
00087
00088 const OSG::BitVector SkyBackgroundBase::FrontTextureFieldMask =
00089 (TypeTraits<BitVector>::One << SkyBackgroundBase::FrontTextureFieldId);
00090
00091 const OSG::BitVector SkyBackgroundBase::LeftTextureFieldMask =
00092 (TypeTraits<BitVector>::One << SkyBackgroundBase::LeftTextureFieldId);
00093
00094 const OSG::BitVector SkyBackgroundBase::RightTextureFieldMask =
00095 (TypeTraits<BitVector>::One << SkyBackgroundBase::RightTextureFieldId);
00096
00097 const OSG::BitVector SkyBackgroundBase::TopTextureFieldMask =
00098 (TypeTraits<BitVector>::One << SkyBackgroundBase::TopTextureFieldId);
00099
00100 const OSG::BitVector SkyBackgroundBase::BoxInsideFieldMask =
00101 (TypeTraits<BitVector>::One << SkyBackgroundBase::BoxInsideFieldId);
00102
00103 const OSG::BitVector SkyBackgroundBase::TopTexCoordFieldMask =
00104 (TypeTraits<BitVector>::One << SkyBackgroundBase::TopTexCoordFieldId);
00105
00106 const OSG::BitVector SkyBackgroundBase::BottomTexCoordFieldMask =
00107 (TypeTraits<BitVector>::One << SkyBackgroundBase::BottomTexCoordFieldId);
00108
00109 const OSG::BitVector SkyBackgroundBase::RightTexCoordFieldMask =
00110 (TypeTraits<BitVector>::One << SkyBackgroundBase::RightTexCoordFieldId);
00111
00112 const OSG::BitVector SkyBackgroundBase::LeftTexCoordFieldMask =
00113 (TypeTraits<BitVector>::One << SkyBackgroundBase::LeftTexCoordFieldId);
00114
00115 const OSG::BitVector SkyBackgroundBase::FrontTexCoordFieldMask =
00116 (TypeTraits<BitVector>::One << SkyBackgroundBase::FrontTexCoordFieldId);
00117
00118 const OSG::BitVector SkyBackgroundBase::BackTexCoordFieldMask =
00119 (TypeTraits<BitVector>::One << SkyBackgroundBase::BackTexCoordFieldId);
00120
00121 const OSG::BitVector SkyBackgroundBase::BeaconFieldMask =
00122 (TypeTraits<BitVector>::One << SkyBackgroundBase::BeaconFieldId);
00123
00124 const OSG::BitVector SkyBackgroundBase::ClearStencilBitFieldMask =
00125 (TypeTraits<BitVector>::One << SkyBackgroundBase::ClearStencilBitFieldId);
00126
00127 const OSG::BitVector SkyBackgroundBase::MTInfluenceMask =
00128 (Inherited::MTInfluenceMask) |
00129 (static_cast<BitVector>(0x0) << Inherited::NextFieldId);
00130
00131
00132
00133
00195
00196
00197 FieldDescription *SkyBackgroundBase::_desc[] =
00198 {
00199 new FieldDescription(MFColor4f::getClassType(),
00200 "skyColor",
00201 SkyColorFieldId, SkyColorFieldMask,
00202 false,
00203 (FieldAccessMethod) &SkyBackgroundBase::getMFSkyColor),
00204 new FieldDescription(MFReal32::getClassType(),
00205 "skyAngle",
00206 SkyAngleFieldId, SkyAngleFieldMask,
00207 false,
00208 (FieldAccessMethod) &SkyBackgroundBase::getMFSkyAngle),
00209 new FieldDescription(MFColor4f::getClassType(),
00210 "groundColor",
00211 GroundColorFieldId, GroundColorFieldMask,
00212 false,
00213 (FieldAccessMethod) &SkyBackgroundBase::getMFGroundColor),
00214 new FieldDescription(MFReal32::getClassType(),
00215 "groundAngle",
00216 GroundAngleFieldId, GroundAngleFieldMask,
00217 false,
00218 (FieldAccessMethod) &SkyBackgroundBase::getMFGroundAngle),
00219 new FieldDescription(SFUInt32::getClassType(),
00220 "sphereRes",
00221 SphereResFieldId, SphereResFieldMask,
00222 false,
00223 (FieldAccessMethod) &SkyBackgroundBase::getSFSphereRes),
00224 new FieldDescription(SFTextureChunkPtr::getClassType(),
00225 "backTexture",
00226 BackTextureFieldId, BackTextureFieldMask,
00227 false,
00228 (FieldAccessMethod) &SkyBackgroundBase::getSFBackTexture),
00229 new FieldDescription(SFTextureChunkPtr::getClassType(),
00230 "bottomTexture",
00231 BottomTextureFieldId, BottomTextureFieldMask,
00232 false,
00233 (FieldAccessMethod) &SkyBackgroundBase::getSFBottomTexture),
00234 new FieldDescription(SFTextureChunkPtr::getClassType(),
00235 "frontTexture",
00236 FrontTextureFieldId, FrontTextureFieldMask,
00237 false,
00238 (FieldAccessMethod) &SkyBackgroundBase::getSFFrontTexture),
00239 new FieldDescription(SFTextureChunkPtr::getClassType(),
00240 "leftTexture",
00241 LeftTextureFieldId, LeftTextureFieldMask,
00242 false,
00243 (FieldAccessMethod) &SkyBackgroundBase::getSFLeftTexture),
00244 new FieldDescription(SFTextureChunkPtr::getClassType(),
00245 "rightTexture",
00246 RightTextureFieldId, RightTextureFieldMask,
00247 false,
00248 (FieldAccessMethod) &SkyBackgroundBase::getSFRightTexture),
00249 new FieldDescription(SFTextureChunkPtr::getClassType(),
00250 "topTexture",
00251 TopTextureFieldId, TopTextureFieldMask,
00252 false,
00253 (FieldAccessMethod) &SkyBackgroundBase::getSFTopTexture),
00254 new FieldDescription(SFBool::getClassType(),
00255 "boxInside",
00256 BoxInsideFieldId, BoxInsideFieldMask,
00257 false,
00258 (FieldAccessMethod) &SkyBackgroundBase::getSFBoxInside),
00259 new FieldDescription(MFVec3f::getClassType(),
00260 "topTexCoord",
00261 TopTexCoordFieldId, TopTexCoordFieldMask,
00262 false,
00263 (FieldAccessMethod) &SkyBackgroundBase::getMFTopTexCoord),
00264 new FieldDescription(MFVec3f::getClassType(),
00265 "bottomTexCoord",
00266 BottomTexCoordFieldId, BottomTexCoordFieldMask,
00267 false,
00268 (FieldAccessMethod) &SkyBackgroundBase::getMFBottomTexCoord),
00269 new FieldDescription(MFVec3f::getClassType(),
00270 "rightTexCoord",
00271 RightTexCoordFieldId, RightTexCoordFieldMask,
00272 false,
00273 (FieldAccessMethod) &SkyBackgroundBase::getMFRightTexCoord),
00274 new FieldDescription(MFVec3f::getClassType(),
00275 "leftTexCoord",
00276 LeftTexCoordFieldId, LeftTexCoordFieldMask,
00277 false,
00278 (FieldAccessMethod) &SkyBackgroundBase::getMFLeftTexCoord),
00279 new FieldDescription(MFVec3f::getClassType(),
00280 "frontTexCoord",
00281 FrontTexCoordFieldId, FrontTexCoordFieldMask,
00282 false,
00283 (FieldAccessMethod) &SkyBackgroundBase::getMFFrontTexCoord),
00284 new FieldDescription(MFVec3f::getClassType(),
00285 "backTexCoord",
00286 BackTexCoordFieldId, BackTexCoordFieldMask,
00287 false,
00288 (FieldAccessMethod) &SkyBackgroundBase::getMFBackTexCoord),
00289 new FieldDescription(SFNodePtr::getClassType(),
00290 "beacon",
00291 BeaconFieldId, BeaconFieldMask,
00292 false,
00293 (FieldAccessMethod) &SkyBackgroundBase::getSFBeacon),
00294 new FieldDescription(SFInt32::getClassType(),
00295 "clearStencilBit",
00296 ClearStencilBitFieldId, ClearStencilBitFieldMask,
00297 false,
00298 (FieldAccessMethod) &SkyBackgroundBase::getSFClearStencilBit)
00299 };
00300
00301
00302 FieldContainerType SkyBackgroundBase::_type(
00303 "SkyBackground",
00304 "Background",
00305 NULL,
00306 (PrototypeCreateF) &SkyBackgroundBase::createEmpty,
00307 SkyBackground::initMethod,
00308 _desc,
00309 sizeof(_desc));
00310
00311
00312
00313
00314
00315 FieldContainerType &SkyBackgroundBase::getType(void)
00316 {
00317 return _type;
00318 }
00319
00320 const FieldContainerType &SkyBackgroundBase::getType(void) const
00321 {
00322 return _type;
00323 }
00324
00325
00326 FieldContainerPtr SkyBackgroundBase::shallowCopy(void) const
00327 {
00328 SkyBackgroundPtr returnValue;
00329
00330 newPtr(returnValue, dynamic_cast<const SkyBackground *>(this));
00331
00332 return returnValue;
00333 }
00334
00335 UInt32 SkyBackgroundBase::getContainerSize(void) const
00336 {
00337 return sizeof(SkyBackground);
00338 }
00339
00340
00341 #if !defined(OSG_FIXED_MFIELDSYNC)
00342 void SkyBackgroundBase::executeSync( FieldContainer &other,
00343 const BitVector &whichField)
00344 {
00345 this->executeSyncImpl((SkyBackgroundBase *) &other, whichField);
00346 }
00347 #else
00348 void SkyBackgroundBase::executeSync( FieldContainer &other,
00349 const BitVector &whichField, const SyncInfo &sInfo )
00350 {
00351 this->executeSyncImpl((SkyBackgroundBase *) &other, whichField, sInfo);
00352 }
00353 void SkyBackgroundBase::execBeginEdit(const BitVector &whichField,
00354 UInt32 uiAspect,
00355 UInt32 uiContainerSize)
00356 {
00357 this->execBeginEditImpl(whichField, uiAspect, uiContainerSize);
00358 }
00359
00360 void SkyBackgroundBase::onDestroyAspect(UInt32 uiId, UInt32 uiAspect)
00361 {
00362 Inherited::onDestroyAspect(uiId, uiAspect);
00363
00364 _mfSkyColor.terminateShare(uiAspect, this->getContainerSize());
00365 _mfSkyAngle.terminateShare(uiAspect, this->getContainerSize());
00366 _mfGroundColor.terminateShare(uiAspect, this->getContainerSize());
00367 _mfGroundAngle.terminateShare(uiAspect, this->getContainerSize());
00368 _mfTopTexCoord.terminateShare(uiAspect, this->getContainerSize());
00369 _mfBottomTexCoord.terminateShare(uiAspect, this->getContainerSize());
00370 _mfRightTexCoord.terminateShare(uiAspect, this->getContainerSize());
00371 _mfLeftTexCoord.terminateShare(uiAspect, this->getContainerSize());
00372 _mfFrontTexCoord.terminateShare(uiAspect, this->getContainerSize());
00373 _mfBackTexCoord.terminateShare(uiAspect, this->getContainerSize());
00374 }
00375 #endif
00376
00377
00378
00379 #ifdef OSG_WIN32_ICL
00380 #pragma warning (disable : 383)
00381 #endif
00382
00383 SkyBackgroundBase::SkyBackgroundBase(void) :
00384 _mfSkyColor (),
00385 _mfSkyAngle (),
00386 _mfGroundColor (),
00387 _mfGroundAngle (),
00388 _sfSphereRes (UInt32(8)),
00389 _sfBackTexture (TextureChunkPtr(NullFC)),
00390 _sfBottomTexture (TextureChunkPtr(NullFC)),
00391 _sfFrontTexture (TextureChunkPtr(NullFC)),
00392 _sfLeftTexture (TextureChunkPtr(NullFC)),
00393 _sfRightTexture (TextureChunkPtr(NullFC)),
00394 _sfTopTexture (TextureChunkPtr(NullFC)),
00395 _sfBoxInside (bool(true)),
00396 _mfTopTexCoord (),
00397 _mfBottomTexCoord (),
00398 _mfRightTexCoord (),
00399 _mfLeftTexCoord (),
00400 _mfFrontTexCoord (),
00401 _mfBackTexCoord (),
00402 _sfBeacon (),
00403 _sfClearStencilBit (Int32(-1)),
00404 Inherited()
00405 {
00406 }
00407
00408 #ifdef OSG_WIN32_ICL
00409 #pragma warning (default : 383)
00410 #endif
00411
00412 SkyBackgroundBase::SkyBackgroundBase(const SkyBackgroundBase &source) :
00413 _mfSkyColor (source._mfSkyColor ),
00414 _mfSkyAngle (source._mfSkyAngle ),
00415 _mfGroundColor (source._mfGroundColor ),
00416 _mfGroundAngle (source._mfGroundAngle ),
00417 _sfSphereRes (source._sfSphereRes ),
00418 _sfBackTexture (source._sfBackTexture ),
00419 _sfBottomTexture (source._sfBottomTexture ),
00420 _sfFrontTexture (source._sfFrontTexture ),
00421 _sfLeftTexture (source._sfLeftTexture ),
00422 _sfRightTexture (source._sfRightTexture ),
00423 _sfTopTexture (source._sfTopTexture ),
00424 _sfBoxInside (source._sfBoxInside ),
00425 _mfTopTexCoord (source._mfTopTexCoord ),
00426 _mfBottomTexCoord (source._mfBottomTexCoord ),
00427 _mfRightTexCoord (source._mfRightTexCoord ),
00428 _mfLeftTexCoord (source._mfLeftTexCoord ),
00429 _mfFrontTexCoord (source._mfFrontTexCoord ),
00430 _mfBackTexCoord (source._mfBackTexCoord ),
00431 _sfBeacon (source._sfBeacon ),
00432 _sfClearStencilBit (source._sfClearStencilBit ),
00433 Inherited (source)
00434 {
00435 }
00436
00437
00438
00439 SkyBackgroundBase::~SkyBackgroundBase(void)
00440 {
00441 }
00442
00443
00444
00445 UInt32 SkyBackgroundBase::getBinSize(const BitVector &whichField)
00446 {
00447 UInt32 returnValue = Inherited::getBinSize(whichField);
00448
00449 if(FieldBits::NoField != (SkyColorFieldMask & whichField))
00450 {
00451 returnValue += _mfSkyColor.getBinSize();
00452 }
00453
00454 if(FieldBits::NoField != (SkyAngleFieldMask & whichField))
00455 {
00456 returnValue += _mfSkyAngle.getBinSize();
00457 }
00458
00459 if(FieldBits::NoField != (GroundColorFieldMask & whichField))
00460 {
00461 returnValue += _mfGroundColor.getBinSize();
00462 }
00463
00464 if(FieldBits::NoField != (GroundAngleFieldMask & whichField))
00465 {
00466 returnValue += _mfGroundAngle.getBinSize();
00467 }
00468
00469 if(FieldBits::NoField != (SphereResFieldMask & whichField))
00470 {
00471 returnValue += _sfSphereRes.getBinSize();
00472 }
00473
00474 if(FieldBits::NoField != (BackTextureFieldMask & whichField))
00475 {
00476 returnValue += _sfBackTexture.getBinSize();
00477 }
00478
00479 if(FieldBits::NoField != (BottomTextureFieldMask & whichField))
00480 {
00481 returnValue += _sfBottomTexture.getBinSize();
00482 }
00483
00484 if(FieldBits::NoField != (FrontTextureFieldMask & whichField))
00485 {
00486 returnValue += _sfFrontTexture.getBinSize();
00487 }
00488
00489 if(FieldBits::NoField != (LeftTextureFieldMask & whichField))
00490 {
00491 returnValue += _sfLeftTexture.getBinSize();
00492 }
00493
00494 if(FieldBits::NoField != (RightTextureFieldMask & whichField))
00495 {
00496 returnValue += _sfRightTexture.getBinSize();
00497 }
00498
00499 if(FieldBits::NoField != (TopTextureFieldMask & whichField))
00500 {
00501 returnValue += _sfTopTexture.getBinSize();
00502 }
00503
00504 if(FieldBits::NoField != (BoxInsideFieldMask & whichField))
00505 {
00506 returnValue += _sfBoxInside.getBinSize();
00507 }
00508
00509 if(FieldBits::NoField != (TopTexCoordFieldMask & whichField))
00510 {
00511 returnValue += _mfTopTexCoord.getBinSize();
00512 }
00513
00514 if(FieldBits::NoField != (BottomTexCoordFieldMask & whichField))
00515 {
00516 returnValue += _mfBottomTexCoord.getBinSize();
00517 }
00518
00519 if(FieldBits::NoField != (RightTexCoordFieldMask & whichField))
00520 {
00521 returnValue += _mfRightTexCoord.getBinSize();
00522 }
00523
00524 if(FieldBits::NoField != (LeftTexCoordFieldMask & whichField))
00525 {
00526 returnValue += _mfLeftTexCoord.getBinSize();
00527 }
00528
00529 if(FieldBits::NoField != (FrontTexCoordFieldMask & whichField))
00530 {
00531 returnValue += _mfFrontTexCoord.getBinSize();
00532 }
00533
00534 if(FieldBits::NoField != (BackTexCoordFieldMask & whichField))
00535 {
00536 returnValue += _mfBackTexCoord.getBinSize();
00537 }
00538
00539 if(FieldBits::NoField != (BeaconFieldMask & whichField))
00540 {
00541 returnValue += _sfBeacon.getBinSize();
00542 }
00543
00544 if(FieldBits::NoField != (ClearStencilBitFieldMask & whichField))
00545 {
00546 returnValue += _sfClearStencilBit.getBinSize();
00547 }
00548
00549
00550 return returnValue;
00551 }
00552
00553 void SkyBackgroundBase::copyToBin( BinaryDataHandler &pMem,
00554 const BitVector &whichField)
00555 {
00556 Inherited::copyToBin(pMem, whichField);
00557
00558 if(FieldBits::NoField != (SkyColorFieldMask & whichField))
00559 {
00560 _mfSkyColor.copyToBin(pMem);
00561 }
00562
00563 if(FieldBits::NoField != (SkyAngleFieldMask & whichField))
00564 {
00565 _mfSkyAngle.copyToBin(pMem);
00566 }
00567
00568 if(FieldBits::NoField != (GroundColorFieldMask & whichField))
00569 {
00570 _mfGroundColor.copyToBin(pMem);
00571 }
00572
00573 if(FieldBits::NoField != (GroundAngleFieldMask & whichField))
00574 {
00575 _mfGroundAngle.copyToBin(pMem);
00576 }
00577
00578 if(FieldBits::NoField != (SphereResFieldMask & whichField))
00579 {
00580 _sfSphereRes.copyToBin(pMem);
00581 }
00582
00583 if(FieldBits::NoField != (BackTextureFieldMask & whichField))
00584 {
00585 _sfBackTexture.copyToBin(pMem);
00586 }
00587
00588 if(FieldBits::NoField != (BottomTextureFieldMask & whichField))
00589 {
00590 _sfBottomTexture.copyToBin(pMem);
00591 }
00592
00593 if(FieldBits::NoField != (FrontTextureFieldMask & whichField))
00594 {
00595 _sfFrontTexture.copyToBin(pMem);
00596 }
00597
00598 if(FieldBits::NoField != (LeftTextureFieldMask & whichField))
00599 {
00600 _sfLeftTexture.copyToBin(pMem);
00601 }
00602
00603 if(FieldBits::NoField != (RightTextureFieldMask & whichField))
00604 {
00605 _sfRightTexture.copyToBin(pMem);
00606 }
00607
00608 if(FieldBits::NoField != (TopTextureFieldMask & whichField))
00609 {
00610 _sfTopTexture.copyToBin(pMem);
00611 }
00612
00613 if(FieldBits::NoField != (BoxInsideFieldMask & whichField))
00614 {
00615 _sfBoxInside.copyToBin(pMem);
00616 }
00617
00618 if(FieldBits::NoField != (TopTexCoordFieldMask & whichField))
00619 {
00620 _mfTopTexCoord.copyToBin(pMem);
00621 }
00622
00623 if(FieldBits::NoField != (BottomTexCoordFieldMask & whichField))
00624 {
00625 _mfBottomTexCoord.copyToBin(pMem);
00626 }
00627
00628 if(FieldBits::NoField != (RightTexCoordFieldMask & whichField))
00629 {
00630 _mfRightTexCoord.copyToBin(pMem);
00631 }
00632
00633 if(FieldBits::NoField != (LeftTexCoordFieldMask & whichField))
00634 {
00635 _mfLeftTexCoord.copyToBin(pMem);
00636 }
00637
00638 if(FieldBits::NoField != (FrontTexCoordFieldMask & whichField))
00639 {
00640 _mfFrontTexCoord.copyToBin(pMem);
00641 }
00642
00643 if(FieldBits::NoField != (BackTexCoordFieldMask & whichField))
00644 {
00645 _mfBackTexCoord.copyToBin(pMem);
00646 }
00647
00648 if(FieldBits::NoField != (BeaconFieldMask & whichField))
00649 {
00650 _sfBeacon.copyToBin(pMem);
00651 }
00652
00653 if(FieldBits::NoField != (ClearStencilBitFieldMask & whichField))
00654 {
00655 _sfClearStencilBit.copyToBin(pMem);
00656 }
00657
00658
00659 }
00660
00661 void SkyBackgroundBase::copyFromBin( BinaryDataHandler &pMem,
00662 const BitVector &whichField)
00663 {
00664 Inherited::copyFromBin(pMem, whichField);
00665
00666 if(FieldBits::NoField != (SkyColorFieldMask & whichField))
00667 {
00668 _mfSkyColor.copyFromBin(pMem);
00669 }
00670
00671 if(FieldBits::NoField != (SkyAngleFieldMask & whichField))
00672 {
00673 _mfSkyAngle.copyFromBin(pMem);
00674 }
00675
00676 if(FieldBits::NoField != (GroundColorFieldMask & whichField))
00677 {
00678 _mfGroundColor.copyFromBin(pMem);
00679 }
00680
00681 if(FieldBits::NoField != (GroundAngleFieldMask & whichField))
00682 {
00683 _mfGroundAngle.copyFromBin(pMem);
00684 }
00685
00686 if(FieldBits::NoField != (SphereResFieldMask & whichField))
00687 {
00688 _sfSphereRes.copyFromBin(pMem);
00689 }
00690
00691 if(FieldBits::NoField != (BackTextureFieldMask & whichField))
00692 {
00693 _sfBackTexture.copyFromBin(pMem);
00694 }
00695
00696 if(FieldBits::NoField != (BottomTextureFieldMask & whichField))
00697 {
00698 _sfBottomTexture.copyFromBin(pMem);
00699 }
00700
00701 if(FieldBits::NoField != (FrontTextureFieldMask & whichField))
00702 {
00703 _sfFrontTexture.copyFromBin(pMem);
00704 }
00705
00706 if(FieldBits::NoField != (LeftTextureFieldMask & whichField))
00707 {
00708 _sfLeftTexture.copyFromBin(pMem);
00709 }
00710
00711 if(FieldBits::NoField != (RightTextureFieldMask & whichField))
00712 {
00713 _sfRightTexture.copyFromBin(pMem);
00714 }
00715
00716 if(FieldBits::NoField != (TopTextureFieldMask & whichField))
00717 {
00718 _sfTopTexture.copyFromBin(pMem);
00719 }
00720
00721 if(FieldBits::NoField != (BoxInsideFieldMask & whichField))
00722 {
00723 _sfBoxInside.copyFromBin(pMem);
00724 }
00725
00726 if(FieldBits::NoField != (TopTexCoordFieldMask & whichField))
00727 {
00728 _mfTopTexCoord.copyFromBin(pMem);
00729 }
00730
00731 if(FieldBits::NoField != (BottomTexCoordFieldMask & whichField))
00732 {
00733 _mfBottomTexCoord.copyFromBin(pMem);
00734 }
00735
00736 if(FieldBits::NoField != (RightTexCoordFieldMask & whichField))
00737 {
00738 _mfRightTexCoord.copyFromBin(pMem);
00739 }
00740
00741 if(FieldBits::NoField != (LeftTexCoordFieldMask & whichField))
00742 {
00743 _mfLeftTexCoord.copyFromBin(pMem);
00744 }
00745
00746 if(FieldBits::NoField != (FrontTexCoordFieldMask & whichField))
00747 {
00748 _mfFrontTexCoord.copyFromBin(pMem);
00749 }
00750
00751 if(FieldBits::NoField != (BackTexCoordFieldMask & whichField))
00752 {
00753 _mfBackTexCoord.copyFromBin(pMem);
00754 }
00755
00756 if(FieldBits::NoField != (BeaconFieldMask & whichField))
00757 {
00758 _sfBeacon.copyFromBin(pMem);
00759 }
00760
00761 if(FieldBits::NoField != (ClearStencilBitFieldMask & whichField))
00762 {
00763 _sfClearStencilBit.copyFromBin(pMem);
00764 }
00765
00766
00767 }
00768
00769 #if !defined(OSG_FIXED_MFIELDSYNC)
00770 void SkyBackgroundBase::executeSyncImpl( SkyBackgroundBase *pOther,
00771 const BitVector &whichField)
00772 {
00773
00774 Inherited::executeSyncImpl(pOther, whichField);
00775
00776 if(FieldBits::NoField != (SkyColorFieldMask & whichField))
00777 _mfSkyColor.syncWith(pOther->_mfSkyColor);
00778
00779 if(FieldBits::NoField != (SkyAngleFieldMask & whichField))
00780 _mfSkyAngle.syncWith(pOther->_mfSkyAngle);
00781
00782 if(FieldBits::NoField != (GroundColorFieldMask & whichField))
00783 _mfGroundColor.syncWith(pOther->_mfGroundColor);
00784
00785 if(FieldBits::NoField != (GroundAngleFieldMask & whichField))
00786 _mfGroundAngle.syncWith(pOther->_mfGroundAngle);
00787
00788 if(FieldBits::NoField != (SphereResFieldMask & whichField))
00789 _sfSphereRes.syncWith(pOther->_sfSphereRes);
00790
00791 if(FieldBits::NoField != (BackTextureFieldMask & whichField))
00792 _sfBackTexture.syncWith(pOther->_sfBackTexture);
00793
00794 if(FieldBits::NoField != (BottomTextureFieldMask & whichField))
00795 _sfBottomTexture.syncWith(pOther->_sfBottomTexture);
00796
00797 if(FieldBits::NoField != (FrontTextureFieldMask & whichField))
00798 _sfFrontTexture.syncWith(pOther->_sfFrontTexture);
00799
00800 if(FieldBits::NoField != (LeftTextureFieldMask & whichField))
00801 _sfLeftTexture.syncWith(pOther->_sfLeftTexture);
00802
00803 if(FieldBits::NoField != (RightTextureFieldMask & whichField))
00804 _sfRightTexture.syncWith(pOther->_sfRightTexture);
00805
00806 if(FieldBits::NoField != (TopTextureFieldMask & whichField))
00807 _sfTopTexture.syncWith(pOther->_sfTopTexture);
00808
00809 if(FieldBits::NoField != (BoxInsideFieldMask & whichField))
00810 _sfBoxInside.syncWith(pOther->_sfBoxInside);
00811
00812 if(FieldBits::NoField != (TopTexCoordFieldMask & whichField))
00813 _mfTopTexCoord.syncWith(pOther->_mfTopTexCoord);
00814
00815 if(FieldBits::NoField != (BottomTexCoordFieldMask & whichField))
00816 _mfBottomTexCoord.syncWith(pOther->_mfBottomTexCoord);
00817
00818 if(FieldBits::NoField != (RightTexCoordFieldMask & whichField))
00819 _mfRightTexCoord.syncWith(pOther->_mfRightTexCoord);
00820
00821 if(FieldBits::NoField != (LeftTexCoordFieldMask & whichField))
00822 _mfLeftTexCoord.syncWith(pOther->_mfLeftTexCoord);
00823
00824 if(FieldBits::NoField != (FrontTexCoordFieldMask & whichField))
00825 _mfFrontTexCoord.syncWith(pOther->_mfFrontTexCoord);
00826
00827 if(FieldBits::NoField != (BackTexCoordFieldMask & whichField))
00828 _mfBackTexCoord.syncWith(pOther->_mfBackTexCoord);
00829
00830 if(FieldBits::NoField != (BeaconFieldMask & whichField))
00831 _sfBeacon.syncWith(pOther->_sfBeacon);
00832
00833 if(FieldBits::NoField != (ClearStencilBitFieldMask & whichField))
00834 _sfClearStencilBit.syncWith(pOther->_sfClearStencilBit);
00835
00836
00837 }
00838 #else
00839 void SkyBackgroundBase::executeSyncImpl( SkyBackgroundBase *pOther,
00840 const BitVector &whichField,
00841 const SyncInfo &sInfo )
00842 {
00843
00844 Inherited::executeSyncImpl(pOther, whichField, sInfo);
00845
00846 if(FieldBits::NoField != (SphereResFieldMask & whichField))
00847 _sfSphereRes.syncWith(pOther->_sfSphereRes);
00848
00849 if(FieldBits::NoField != (BackTextureFieldMask & whichField))
00850 _sfBackTexture.syncWith(pOther->_sfBackTexture);
00851
00852 if(FieldBits::NoField != (BottomTextureFieldMask & whichField))
00853 _sfBottomTexture.syncWith(pOther->_sfBottomTexture);
00854
00855 if(FieldBits::NoField != (FrontTextureFieldMask & whichField))
00856 _sfFrontTexture.syncWith(pOther->_sfFrontTexture);
00857
00858 if(FieldBits::NoField != (LeftTextureFieldMask & whichField))
00859 _sfLeftTexture.syncWith(pOther->_sfLeftTexture);
00860
00861 if(FieldBits::NoField != (RightTextureFieldMask & whichField))
00862 _sfRightTexture.syncWith(pOther->_sfRightTexture);
00863
00864 if(FieldBits::NoField != (TopTextureFieldMask & whichField))
00865 _sfTopTexture.syncWith(pOther->_sfTopTexture);
00866
00867 if(FieldBits::NoField != (BoxInsideFieldMask & whichField))
00868 _sfBoxInside.syncWith(pOther->_sfBoxInside);
00869
00870 if(FieldBits::NoField != (BeaconFieldMask & whichField))
00871 _sfBeacon.syncWith(pOther->_sfBeacon);
00872
00873 if(FieldBits::NoField != (ClearStencilBitFieldMask & whichField))
00874 _sfClearStencilBit.syncWith(pOther->_sfClearStencilBit);
00875
00876
00877 if(FieldBits::NoField != (SkyColorFieldMask & whichField))
00878 _mfSkyColor.syncWith(pOther->_mfSkyColor, sInfo);
00879
00880 if(FieldBits::NoField != (SkyAngleFieldMask & whichField))
00881 _mfSkyAngle.syncWith(pOther->_mfSkyAngle, sInfo);
00882
00883 if(FieldBits::NoField != (GroundColorFieldMask & whichField))
00884 _mfGroundColor.syncWith(pOther->_mfGroundColor, sInfo);
00885
00886 if(FieldBits::NoField != (GroundAngleFieldMask & whichField))
00887 _mfGroundAngle.syncWith(pOther->_mfGroundAngle, sInfo);
00888
00889 if(FieldBits::NoField != (TopTexCoordFieldMask & whichField))
00890 _mfTopTexCoord.syncWith(pOther->_mfTopTexCoord, sInfo);
00891
00892 if(FieldBits::NoField != (BottomTexCoordFieldMask & whichField))
00893 _mfBottomTexCoord.syncWith(pOther->_mfBottomTexCoord, sInfo);
00894
00895 if(FieldBits::NoField != (RightTexCoordFieldMask & whichField))
00896 _mfRightTexCoord.syncWith(pOther->_mfRightTexCoord, sInfo);
00897
00898 if(FieldBits::NoField != (LeftTexCoordFieldMask & whichField))
00899 _mfLeftTexCoord.syncWith(pOther->_mfLeftTexCoord, sInfo);
00900
00901 if(FieldBits::NoField != (FrontTexCoordFieldMask & whichField))
00902 _mfFrontTexCoord.syncWith(pOther->_mfFrontTexCoord, sInfo);
00903
00904 if(FieldBits::NoField != (BackTexCoordFieldMask & whichField))
00905 _mfBackTexCoord.syncWith(pOther->_mfBackTexCoord, sInfo);
00906
00907
00908 }
00909
00910 void SkyBackgroundBase::execBeginEditImpl (const BitVector &whichField,
00911 UInt32 uiAspect,
00912 UInt32 uiContainerSize)
00913 {
00914 Inherited::execBeginEditImpl(whichField, uiAspect, uiContainerSize);
00915
00916 if(FieldBits::NoField != (SkyColorFieldMask & whichField))
00917 _mfSkyColor.beginEdit(uiAspect, uiContainerSize);
00918
00919 if(FieldBits::NoField != (SkyAngleFieldMask & whichField))
00920 _mfSkyAngle.beginEdit(uiAspect, uiContainerSize);
00921
00922 if(FieldBits::NoField != (GroundColorFieldMask & whichField))
00923 _mfGroundColor.beginEdit(uiAspect, uiContainerSize);
00924
00925 if(FieldBits::NoField != (GroundAngleFieldMask & whichField))
00926 _mfGroundAngle.beginEdit(uiAspect, uiContainerSize);
00927
00928 if(FieldBits::NoField != (TopTexCoordFieldMask & whichField))
00929 _mfTopTexCoord.beginEdit(uiAspect, uiContainerSize);
00930
00931 if(FieldBits::NoField != (BottomTexCoordFieldMask & whichField))
00932 _mfBottomTexCoord.beginEdit(uiAspect, uiContainerSize);
00933
00934 if(FieldBits::NoField != (RightTexCoordFieldMask & whichField))
00935 _mfRightTexCoord.beginEdit(uiAspect, uiContainerSize);
00936
00937 if(FieldBits::NoField != (LeftTexCoordFieldMask & whichField))
00938 _mfLeftTexCoord.beginEdit(uiAspect, uiContainerSize);
00939
00940 if(FieldBits::NoField != (FrontTexCoordFieldMask & whichField))
00941 _mfFrontTexCoord.beginEdit(uiAspect, uiContainerSize);
00942
00943 if(FieldBits::NoField != (BackTexCoordFieldMask & whichField))
00944 _mfBackTexCoord.beginEdit(uiAspect, uiContainerSize);
00945
00946 }
00947 #endif
00948
00949
00950
00951 OSG_END_NAMESPACE
00952
00953 #include <OSGMFieldTypeDef.inl>
00954
00955 OSG_BEGIN_NAMESPACE
00956
00957 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
00958 DataType FieldDataTraits<SkyBackgroundPtr>::_type("SkyBackgroundPtr", "BackgroundPtr");
00959 #endif
00960
00961 OSG_DLLEXPORT_MFIELD_DEF1(SkyBackgroundPtr, OSG_SYSTEMLIB_DLLTMPLMAPPING);
00962
00963
00964
00965
00966
00967 #ifdef OSG_SGI_CC
00968 #pragma set woff 1174
00969 #endif
00970
00971 #ifdef OSG_LINUX_ICC
00972 #pragma warning( disable : 177 )
00973 #endif
00974
00975 namespace
00976 {
00977 static Char8 cvsid_cpp [] = "@(#)$Id: FCBaseTemplate_cpp.h,v 1.47 2006/03/17 17:03:19 pdaehne Exp $";
00978 static Char8 cvsid_hpp [] = OSGSKYBACKGROUNDBASE_HEADER_CVSID;
00979 static Char8 cvsid_inl [] = OSGSKYBACKGROUNDBASE_INLINE_CVSID;
00980
00981 static Char8 cvsid_fields_hpp[] = OSGSKYBACKGROUNDFIELDS_HEADER_CVSID;
00982 }
00983
00984 OSG_END_NAMESPACE
00985