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_COMPILERENDEROPTIONSINST
00055
00056 #include <stdlib.h>
00057 #include <stdio.h>
00058
00059 #include <OSGConfig.h>
00060
00061 #include "OSGRenderOptionsBase.h"
00062 #include "OSGRenderOptions.h"
00063
00064 #include <OSGGL.h>
00065
00066 OSG_BEGIN_NAMESPACE
00067
00068 const OSG::BitVector RenderOptionsBase::StatisticFieldMask =
00069 (TypeTraits<BitVector>::One << RenderOptionsBase::StatisticFieldId);
00070
00071 const OSG::BitVector RenderOptionsBase::PolygonModeFieldMask =
00072 (TypeTraits<BitVector>::One << RenderOptionsBase::PolygonModeFieldId);
00073
00074 const OSG::BitVector RenderOptionsBase::TwoSidedLightingFieldMask =
00075 (TypeTraits<BitVector>::One << RenderOptionsBase::TwoSidedLightingFieldId);
00076
00077 const OSG::BitVector RenderOptionsBase::SpecTexLightingFieldMask =
00078 (TypeTraits<BitVector>::One << RenderOptionsBase::SpecTexLightingFieldId);
00079
00080 const OSG::BitVector RenderOptionsBase::SortTransFieldMask =
00081 (TypeTraits<BitVector>::One << RenderOptionsBase::SortTransFieldId);
00082
00083 const OSG::BitVector RenderOptionsBase::ZWriteTransFieldMask =
00084 (TypeTraits<BitVector>::One << RenderOptionsBase::ZWriteTransFieldId);
00085
00086 const OSG::BitVector RenderOptionsBase::LocalLightsFieldMask =
00087 (TypeTraits<BitVector>::One << RenderOptionsBase::LocalLightsFieldId);
00088
00089 const OSG::BitVector RenderOptionsBase::CorrectTwoSidedLightingFieldMask =
00090 (TypeTraits<BitVector>::One << RenderOptionsBase::CorrectTwoSidedLightingFieldId);
00091
00092 const OSG::BitVector RenderOptionsBase::OcclusionCullingFieldMask =
00093 (TypeTraits<BitVector>::One << RenderOptionsBase::OcclusionCullingFieldId);
00094
00095 const OSG::BitVector RenderOptionsBase::OcclusionCullingModeFieldMask =
00096 (TypeTraits<BitVector>::One << RenderOptionsBase::OcclusionCullingModeFieldId);
00097
00098 const OSG::BitVector RenderOptionsBase::OcclusionCullingPixelsFieldMask =
00099 (TypeTraits<BitVector>::One << RenderOptionsBase::OcclusionCullingPixelsFieldId);
00100
00101 const OSG::BitVector RenderOptionsBase::AntialiasingFieldMask =
00102 (TypeTraits<BitVector>::One << RenderOptionsBase::AntialiasingFieldId);
00103
00104 const OSG::BitVector RenderOptionsBase::AntialiasingDistanceFieldMask =
00105 (TypeTraits<BitVector>::One << RenderOptionsBase::AntialiasingDistanceFieldId);
00106
00107 const OSG::BitVector RenderOptionsBase::AntialiasingScaleFieldMask =
00108 (TypeTraits<BitVector>::One << RenderOptionsBase::AntialiasingScaleFieldId);
00109
00110 const OSG::BitVector RenderOptionsBase::AntialiasingTriggerFieldMask =
00111 (TypeTraits<BitVector>::One << RenderOptionsBase::AntialiasingTriggerFieldId);
00112
00113 const OSG::BitVector RenderOptionsBase::FrustumCullingFieldMask =
00114 (TypeTraits<BitVector>::One << RenderOptionsBase::FrustumCullingFieldId);
00115
00116 const OSG::BitVector RenderOptionsBase::BackfaceCullingFieldMask =
00117 (TypeTraits<BitVector>::One << RenderOptionsBase::BackfaceCullingFieldId);
00118
00119 const OSG::BitVector RenderOptionsBase::SmallFeatureCullingFieldMask =
00120 (TypeTraits<BitVector>::One << RenderOptionsBase::SmallFeatureCullingFieldId);
00121
00122 const OSG::BitVector RenderOptionsBase::SmallFeaturePixelsFieldMask =
00123 (TypeTraits<BitVector>::One << RenderOptionsBase::SmallFeaturePixelsFieldId);
00124
00125 const OSG::BitVector RenderOptionsBase::SmallFeatureThresholdFieldMask =
00126 (TypeTraits<BitVector>::One << RenderOptionsBase::SmallFeatureThresholdFieldId);
00127
00128 const OSG::BitVector RenderOptionsBase::FirstFrameFieldMask =
00129 (TypeTraits<BitVector>::One << RenderOptionsBase::FirstFrameFieldId);
00130
00131 const OSG::BitVector RenderOptionsBase::MTInfluenceMask =
00132 (Inherited::MTInfluenceMask) |
00133 (static_cast<BitVector>(0x0) << Inherited::NextFieldId);
00134
00135
00136
00137
00202
00203
00204 FieldDescription *RenderOptionsBase::_desc[] =
00205 {
00206 new FieldDescription(SFBool::getClassType(),
00207 "statistic",
00208 StatisticFieldId, StatisticFieldMask,
00209 false,
00210 (FieldAccessMethod) &RenderOptionsBase::getSFStatistic),
00211 new FieldDescription(SFGLenum::getClassType(),
00212 "polygonMode",
00213 PolygonModeFieldId, PolygonModeFieldMask,
00214 false,
00215 (FieldAccessMethod) &RenderOptionsBase::getSFPolygonMode),
00216 new FieldDescription(SFBool::getClassType(),
00217 "twoSidedLighting",
00218 TwoSidedLightingFieldId, TwoSidedLightingFieldMask,
00219 false,
00220 (FieldAccessMethod) &RenderOptionsBase::getSFTwoSidedLighting),
00221 new FieldDescription(SFBool::getClassType(),
00222 "specTexLighting",
00223 SpecTexLightingFieldId, SpecTexLightingFieldMask,
00224 false,
00225 (FieldAccessMethod) &RenderOptionsBase::getSFSpecTexLighting),
00226 new FieldDescription(SFBool::getClassType(),
00227 "sortTrans",
00228 SortTransFieldId, SortTransFieldMask,
00229 false,
00230 (FieldAccessMethod) &RenderOptionsBase::getSFSortTrans),
00231 new FieldDescription(SFBool::getClassType(),
00232 "zWriteTrans",
00233 ZWriteTransFieldId, ZWriteTransFieldMask,
00234 false,
00235 (FieldAccessMethod) &RenderOptionsBase::getSFZWriteTrans),
00236 new FieldDescription(SFBool::getClassType(),
00237 "localLights",
00238 LocalLightsFieldId, LocalLightsFieldMask,
00239 false,
00240 (FieldAccessMethod) &RenderOptionsBase::getSFLocalLights),
00241 new FieldDescription(SFBool::getClassType(),
00242 "correctTwoSidedLighting",
00243 CorrectTwoSidedLightingFieldId, CorrectTwoSidedLightingFieldMask,
00244 false,
00245 (FieldAccessMethod) &RenderOptionsBase::getSFCorrectTwoSidedLighting),
00246 new FieldDescription(SFBool::getClassType(),
00247 "occlusionCulling",
00248 OcclusionCullingFieldId, OcclusionCullingFieldMask,
00249 false,
00250 (FieldAccessMethod) &RenderOptionsBase::getSFOcclusionCulling),
00251 new FieldDescription(SFInt32::getClassType(),
00252 "occlusionCullingMode",
00253 OcclusionCullingModeFieldId, OcclusionCullingModeFieldMask,
00254 false,
00255 (FieldAccessMethod) &RenderOptionsBase::getSFOcclusionCullingMode),
00256 new FieldDescription(SFUInt32::getClassType(),
00257 "occlusionCullingPixels",
00258 OcclusionCullingPixelsFieldId, OcclusionCullingPixelsFieldMask,
00259 false,
00260 (FieldAccessMethod) &RenderOptionsBase::getSFOcclusionCullingPixels),
00261 new FieldDescription(SFBool::getClassType(),
00262 "antialiasing",
00263 AntialiasingFieldId, AntialiasingFieldMask,
00264 false,
00265 (FieldAccessMethod) &RenderOptionsBase::getSFAntialiasing),
00266 new FieldDescription(SFReal32::getClassType(),
00267 "antialiasingDistance",
00268 AntialiasingDistanceFieldId, AntialiasingDistanceFieldMask,
00269 false,
00270 (FieldAccessMethod) &RenderOptionsBase::getSFAntialiasingDistance),
00271 new FieldDescription(SFReal32::getClassType(),
00272 "antialiasingScale",
00273 AntialiasingScaleFieldId, AntialiasingScaleFieldMask,
00274 false,
00275 (FieldAccessMethod) &RenderOptionsBase::getSFAntialiasingScale),
00276 new FieldDescription(SFUInt32::getClassType(),
00277 "antialiasingTrigger",
00278 AntialiasingTriggerFieldId, AntialiasingTriggerFieldMask,
00279 false,
00280 (FieldAccessMethod) &RenderOptionsBase::getSFAntialiasingTrigger),
00281 new FieldDescription(SFBool::getClassType(),
00282 "frustumCulling",
00283 FrustumCullingFieldId, FrustumCullingFieldMask,
00284 false,
00285 (FieldAccessMethod) &RenderOptionsBase::getSFFrustumCulling),
00286 new FieldDescription(SFBool::getClassType(),
00287 "backfaceCulling",
00288 BackfaceCullingFieldId, BackfaceCullingFieldMask,
00289 false,
00290 (FieldAccessMethod) &RenderOptionsBase::getSFBackfaceCulling),
00291 new FieldDescription(SFBool::getClassType(),
00292 "smallFeatureCulling",
00293 SmallFeatureCullingFieldId, SmallFeatureCullingFieldMask,
00294 false,
00295 (FieldAccessMethod) &RenderOptionsBase::getSFSmallFeatureCulling),
00296 new FieldDescription(SFReal32::getClassType(),
00297 "smallFeaturePixels",
00298 SmallFeaturePixelsFieldId, SmallFeaturePixelsFieldMask,
00299 false,
00300 (FieldAccessMethod) &RenderOptionsBase::getSFSmallFeaturePixels),
00301 new FieldDescription(SFUInt32::getClassType(),
00302 "smallFeatureThreshold",
00303 SmallFeatureThresholdFieldId, SmallFeatureThresholdFieldMask,
00304 false,
00305 (FieldAccessMethod) &RenderOptionsBase::getSFSmallFeatureThreshold),
00306 new FieldDescription(SFBool::getClassType(),
00307 "firstFrame",
00308 FirstFrameFieldId, FirstFrameFieldMask,
00309 false,
00310 (FieldAccessMethod) &RenderOptionsBase::getSFFirstFrame)
00311 };
00312
00313
00314 FieldContainerType RenderOptionsBase::_type(
00315 "RenderOptions",
00316 "Attachment",
00317 NULL,
00318 (PrototypeCreateF) &RenderOptionsBase::createEmpty,
00319 RenderOptions::initMethod,
00320 _desc,
00321 sizeof(_desc));
00322
00323
00324
00325
00326
00327 FieldContainerType &RenderOptionsBase::getType(void)
00328 {
00329 return _type;
00330 }
00331
00332 const FieldContainerType &RenderOptionsBase::getType(void) const
00333 {
00334 return _type;
00335 }
00336
00337
00338 FieldContainerPtr RenderOptionsBase::shallowCopy(void) const
00339 {
00340 RenderOptionsPtr returnValue;
00341
00342 newPtr(returnValue, dynamic_cast<const RenderOptions *>(this));
00343
00344 return returnValue;
00345 }
00346
00347 UInt32 RenderOptionsBase::getContainerSize(void) const
00348 {
00349 return sizeof(RenderOptions);
00350 }
00351
00352
00353 #if !defined(OSG_FIXED_MFIELDSYNC)
00354 void RenderOptionsBase::executeSync( FieldContainer &other,
00355 const BitVector &whichField)
00356 {
00357 this->executeSyncImpl((RenderOptionsBase *) &other, whichField);
00358 }
00359 #else
00360 void RenderOptionsBase::executeSync( FieldContainer &other,
00361 const BitVector &whichField, const SyncInfo &sInfo )
00362 {
00363 this->executeSyncImpl((RenderOptionsBase *) &other, whichField, sInfo);
00364 }
00365 void RenderOptionsBase::execBeginEdit(const BitVector &whichField,
00366 UInt32 uiAspect,
00367 UInt32 uiContainerSize)
00368 {
00369 this->execBeginEditImpl(whichField, uiAspect, uiContainerSize);
00370 }
00371
00372 void RenderOptionsBase::onDestroyAspect(UInt32 uiId, UInt32 uiAspect)
00373 {
00374 Inherited::onDestroyAspect(uiId, uiAspect);
00375
00376 }
00377 #endif
00378
00379
00380
00381 #ifdef OSG_WIN32_ICL
00382 #pragma warning (disable : 383)
00383 #endif
00384
00385 RenderOptionsBase::RenderOptionsBase(void) :
00386 _sfStatistic (bool(false)),
00387 _sfPolygonMode (GLenum(GL_FILL)),
00388 _sfTwoSidedLighting (bool(false)),
00389 _sfSpecTexLighting (bool(false)),
00390 _sfSortTrans (bool(true)),
00391 _sfZWriteTrans (bool(true)),
00392 _sfLocalLights (bool(true)),
00393 _sfCorrectTwoSidedLighting(bool(true)),
00394 _sfOcclusionCulling (bool(false)),
00395 _sfOcclusionCullingMode (Int32(1)),
00396 _sfOcclusionCullingPixels (UInt32(0)),
00397 _sfAntialiasing (bool(false)),
00398 _sfAntialiasingDistance (Real32(0.2)),
00399 _sfAntialiasingScale (Real32(2.0)),
00400 _sfAntialiasingTrigger (UInt32(0)),
00401 _sfFrustumCulling (bool(false)),
00402 _sfBackfaceCulling (bool(false)),
00403 _sfSmallFeatureCulling (),
00404 _sfSmallFeaturePixels (),
00405 _sfSmallFeatureThreshold (),
00406 _sfFirstFrame (bool(true)),
00407 Inherited()
00408 {
00409 }
00410
00411 #ifdef OSG_WIN32_ICL
00412 #pragma warning (default : 383)
00413 #endif
00414
00415 RenderOptionsBase::RenderOptionsBase(const RenderOptionsBase &source) :
00416 _sfStatistic (source._sfStatistic ),
00417 _sfPolygonMode (source._sfPolygonMode ),
00418 _sfTwoSidedLighting (source._sfTwoSidedLighting ),
00419 _sfSpecTexLighting (source._sfSpecTexLighting ),
00420 _sfSortTrans (source._sfSortTrans ),
00421 _sfZWriteTrans (source._sfZWriteTrans ),
00422 _sfLocalLights (source._sfLocalLights ),
00423 _sfCorrectTwoSidedLighting(source._sfCorrectTwoSidedLighting),
00424 _sfOcclusionCulling (source._sfOcclusionCulling ),
00425 _sfOcclusionCullingMode (source._sfOcclusionCullingMode ),
00426 _sfOcclusionCullingPixels (source._sfOcclusionCullingPixels ),
00427 _sfAntialiasing (source._sfAntialiasing ),
00428 _sfAntialiasingDistance (source._sfAntialiasingDistance ),
00429 _sfAntialiasingScale (source._sfAntialiasingScale ),
00430 _sfAntialiasingTrigger (source._sfAntialiasingTrigger ),
00431 _sfFrustumCulling (source._sfFrustumCulling ),
00432 _sfBackfaceCulling (source._sfBackfaceCulling ),
00433 _sfSmallFeatureCulling (source._sfSmallFeatureCulling ),
00434 _sfSmallFeaturePixels (source._sfSmallFeaturePixels ),
00435 _sfSmallFeatureThreshold (source._sfSmallFeatureThreshold ),
00436 _sfFirstFrame (source._sfFirstFrame ),
00437 Inherited (source)
00438 {
00439 }
00440
00441
00442
00443 RenderOptionsBase::~RenderOptionsBase(void)
00444 {
00445 }
00446
00447
00448
00449 UInt32 RenderOptionsBase::getBinSize(const BitVector &whichField)
00450 {
00451 UInt32 returnValue = Inherited::getBinSize(whichField);
00452
00453 if(FieldBits::NoField != (StatisticFieldMask & whichField))
00454 {
00455 returnValue += _sfStatistic.getBinSize();
00456 }
00457
00458 if(FieldBits::NoField != (PolygonModeFieldMask & whichField))
00459 {
00460 returnValue += _sfPolygonMode.getBinSize();
00461 }
00462
00463 if(FieldBits::NoField != (TwoSidedLightingFieldMask & whichField))
00464 {
00465 returnValue += _sfTwoSidedLighting.getBinSize();
00466 }
00467
00468 if(FieldBits::NoField != (SpecTexLightingFieldMask & whichField))
00469 {
00470 returnValue += _sfSpecTexLighting.getBinSize();
00471 }
00472
00473 if(FieldBits::NoField != (SortTransFieldMask & whichField))
00474 {
00475 returnValue += _sfSortTrans.getBinSize();
00476 }
00477
00478 if(FieldBits::NoField != (ZWriteTransFieldMask & whichField))
00479 {
00480 returnValue += _sfZWriteTrans.getBinSize();
00481 }
00482
00483 if(FieldBits::NoField != (LocalLightsFieldMask & whichField))
00484 {
00485 returnValue += _sfLocalLights.getBinSize();
00486 }
00487
00488 if(FieldBits::NoField != (CorrectTwoSidedLightingFieldMask & whichField))
00489 {
00490 returnValue += _sfCorrectTwoSidedLighting.getBinSize();
00491 }
00492
00493 if(FieldBits::NoField != (OcclusionCullingFieldMask & whichField))
00494 {
00495 returnValue += _sfOcclusionCulling.getBinSize();
00496 }
00497
00498 if(FieldBits::NoField != (OcclusionCullingModeFieldMask & whichField))
00499 {
00500 returnValue += _sfOcclusionCullingMode.getBinSize();
00501 }
00502
00503 if(FieldBits::NoField != (OcclusionCullingPixelsFieldMask & whichField))
00504 {
00505 returnValue += _sfOcclusionCullingPixels.getBinSize();
00506 }
00507
00508 if(FieldBits::NoField != (AntialiasingFieldMask & whichField))
00509 {
00510 returnValue += _sfAntialiasing.getBinSize();
00511 }
00512
00513 if(FieldBits::NoField != (AntialiasingDistanceFieldMask & whichField))
00514 {
00515 returnValue += _sfAntialiasingDistance.getBinSize();
00516 }
00517
00518 if(FieldBits::NoField != (AntialiasingScaleFieldMask & whichField))
00519 {
00520 returnValue += _sfAntialiasingScale.getBinSize();
00521 }
00522
00523 if(FieldBits::NoField != (AntialiasingTriggerFieldMask & whichField))
00524 {
00525 returnValue += _sfAntialiasingTrigger.getBinSize();
00526 }
00527
00528 if(FieldBits::NoField != (FrustumCullingFieldMask & whichField))
00529 {
00530 returnValue += _sfFrustumCulling.getBinSize();
00531 }
00532
00533 if(FieldBits::NoField != (BackfaceCullingFieldMask & whichField))
00534 {
00535 returnValue += _sfBackfaceCulling.getBinSize();
00536 }
00537
00538 if(FieldBits::NoField != (SmallFeatureCullingFieldMask & whichField))
00539 {
00540 returnValue += _sfSmallFeatureCulling.getBinSize();
00541 }
00542
00543 if(FieldBits::NoField != (SmallFeaturePixelsFieldMask & whichField))
00544 {
00545 returnValue += _sfSmallFeaturePixels.getBinSize();
00546 }
00547
00548 if(FieldBits::NoField != (SmallFeatureThresholdFieldMask & whichField))
00549 {
00550 returnValue += _sfSmallFeatureThreshold.getBinSize();
00551 }
00552
00553 if(FieldBits::NoField != (FirstFrameFieldMask & whichField))
00554 {
00555 returnValue += _sfFirstFrame.getBinSize();
00556 }
00557
00558
00559 return returnValue;
00560 }
00561
00562 void RenderOptionsBase::copyToBin( BinaryDataHandler &pMem,
00563 const BitVector &whichField)
00564 {
00565 Inherited::copyToBin(pMem, whichField);
00566
00567 if(FieldBits::NoField != (StatisticFieldMask & whichField))
00568 {
00569 _sfStatistic.copyToBin(pMem);
00570 }
00571
00572 if(FieldBits::NoField != (PolygonModeFieldMask & whichField))
00573 {
00574 _sfPolygonMode.copyToBin(pMem);
00575 }
00576
00577 if(FieldBits::NoField != (TwoSidedLightingFieldMask & whichField))
00578 {
00579 _sfTwoSidedLighting.copyToBin(pMem);
00580 }
00581
00582 if(FieldBits::NoField != (SpecTexLightingFieldMask & whichField))
00583 {
00584 _sfSpecTexLighting.copyToBin(pMem);
00585 }
00586
00587 if(FieldBits::NoField != (SortTransFieldMask & whichField))
00588 {
00589 _sfSortTrans.copyToBin(pMem);
00590 }
00591
00592 if(FieldBits::NoField != (ZWriteTransFieldMask & whichField))
00593 {
00594 _sfZWriteTrans.copyToBin(pMem);
00595 }
00596
00597 if(FieldBits::NoField != (LocalLightsFieldMask & whichField))
00598 {
00599 _sfLocalLights.copyToBin(pMem);
00600 }
00601
00602 if(FieldBits::NoField != (CorrectTwoSidedLightingFieldMask & whichField))
00603 {
00604 _sfCorrectTwoSidedLighting.copyToBin(pMem);
00605 }
00606
00607 if(FieldBits::NoField != (OcclusionCullingFieldMask & whichField))
00608 {
00609 _sfOcclusionCulling.copyToBin(pMem);
00610 }
00611
00612 if(FieldBits::NoField != (OcclusionCullingModeFieldMask & whichField))
00613 {
00614 _sfOcclusionCullingMode.copyToBin(pMem);
00615 }
00616
00617 if(FieldBits::NoField != (OcclusionCullingPixelsFieldMask & whichField))
00618 {
00619 _sfOcclusionCullingPixels.copyToBin(pMem);
00620 }
00621
00622 if(FieldBits::NoField != (AntialiasingFieldMask & whichField))
00623 {
00624 _sfAntialiasing.copyToBin(pMem);
00625 }
00626
00627 if(FieldBits::NoField != (AntialiasingDistanceFieldMask & whichField))
00628 {
00629 _sfAntialiasingDistance.copyToBin(pMem);
00630 }
00631
00632 if(FieldBits::NoField != (AntialiasingScaleFieldMask & whichField))
00633 {
00634 _sfAntialiasingScale.copyToBin(pMem);
00635 }
00636
00637 if(FieldBits::NoField != (AntialiasingTriggerFieldMask & whichField))
00638 {
00639 _sfAntialiasingTrigger.copyToBin(pMem);
00640 }
00641
00642 if(FieldBits::NoField != (FrustumCullingFieldMask & whichField))
00643 {
00644 _sfFrustumCulling.copyToBin(pMem);
00645 }
00646
00647 if(FieldBits::NoField != (BackfaceCullingFieldMask & whichField))
00648 {
00649 _sfBackfaceCulling.copyToBin(pMem);
00650 }
00651
00652 if(FieldBits::NoField != (SmallFeatureCullingFieldMask & whichField))
00653 {
00654 _sfSmallFeatureCulling.copyToBin(pMem);
00655 }
00656
00657 if(FieldBits::NoField != (SmallFeaturePixelsFieldMask & whichField))
00658 {
00659 _sfSmallFeaturePixels.copyToBin(pMem);
00660 }
00661
00662 if(FieldBits::NoField != (SmallFeatureThresholdFieldMask & whichField))
00663 {
00664 _sfSmallFeatureThreshold.copyToBin(pMem);
00665 }
00666
00667 if(FieldBits::NoField != (FirstFrameFieldMask & whichField))
00668 {
00669 _sfFirstFrame.copyToBin(pMem);
00670 }
00671
00672
00673 }
00674
00675 void RenderOptionsBase::copyFromBin( BinaryDataHandler &pMem,
00676 const BitVector &whichField)
00677 {
00678 Inherited::copyFromBin(pMem, whichField);
00679
00680 if(FieldBits::NoField != (StatisticFieldMask & whichField))
00681 {
00682 _sfStatistic.copyFromBin(pMem);
00683 }
00684
00685 if(FieldBits::NoField != (PolygonModeFieldMask & whichField))
00686 {
00687 _sfPolygonMode.copyFromBin(pMem);
00688 }
00689
00690 if(FieldBits::NoField != (TwoSidedLightingFieldMask & whichField))
00691 {
00692 _sfTwoSidedLighting.copyFromBin(pMem);
00693 }
00694
00695 if(FieldBits::NoField != (SpecTexLightingFieldMask & whichField))
00696 {
00697 _sfSpecTexLighting.copyFromBin(pMem);
00698 }
00699
00700 if(FieldBits::NoField != (SortTransFieldMask & whichField))
00701 {
00702 _sfSortTrans.copyFromBin(pMem);
00703 }
00704
00705 if(FieldBits::NoField != (ZWriteTransFieldMask & whichField))
00706 {
00707 _sfZWriteTrans.copyFromBin(pMem);
00708 }
00709
00710 if(FieldBits::NoField != (LocalLightsFieldMask & whichField))
00711 {
00712 _sfLocalLights.copyFromBin(pMem);
00713 }
00714
00715 if(FieldBits::NoField != (CorrectTwoSidedLightingFieldMask & whichField))
00716 {
00717 _sfCorrectTwoSidedLighting.copyFromBin(pMem);
00718 }
00719
00720 if(FieldBits::NoField != (OcclusionCullingFieldMask & whichField))
00721 {
00722 _sfOcclusionCulling.copyFromBin(pMem);
00723 }
00724
00725 if(FieldBits::NoField != (OcclusionCullingModeFieldMask & whichField))
00726 {
00727 _sfOcclusionCullingMode.copyFromBin(pMem);
00728 }
00729
00730 if(FieldBits::NoField != (OcclusionCullingPixelsFieldMask & whichField))
00731 {
00732 _sfOcclusionCullingPixels.copyFromBin(pMem);
00733 }
00734
00735 if(FieldBits::NoField != (AntialiasingFieldMask & whichField))
00736 {
00737 _sfAntialiasing.copyFromBin(pMem);
00738 }
00739
00740 if(FieldBits::NoField != (AntialiasingDistanceFieldMask & whichField))
00741 {
00742 _sfAntialiasingDistance.copyFromBin(pMem);
00743 }
00744
00745 if(FieldBits::NoField != (AntialiasingScaleFieldMask & whichField))
00746 {
00747 _sfAntialiasingScale.copyFromBin(pMem);
00748 }
00749
00750 if(FieldBits::NoField != (AntialiasingTriggerFieldMask & whichField))
00751 {
00752 _sfAntialiasingTrigger.copyFromBin(pMem);
00753 }
00754
00755 if(FieldBits::NoField != (FrustumCullingFieldMask & whichField))
00756 {
00757 _sfFrustumCulling.copyFromBin(pMem);
00758 }
00759
00760 if(FieldBits::NoField != (BackfaceCullingFieldMask & whichField))
00761 {
00762 _sfBackfaceCulling.copyFromBin(pMem);
00763 }
00764
00765 if(FieldBits::NoField != (SmallFeatureCullingFieldMask & whichField))
00766 {
00767 _sfSmallFeatureCulling.copyFromBin(pMem);
00768 }
00769
00770 if(FieldBits::NoField != (SmallFeaturePixelsFieldMask & whichField))
00771 {
00772 _sfSmallFeaturePixels.copyFromBin(pMem);
00773 }
00774
00775 if(FieldBits::NoField != (SmallFeatureThresholdFieldMask & whichField))
00776 {
00777 _sfSmallFeatureThreshold.copyFromBin(pMem);
00778 }
00779
00780 if(FieldBits::NoField != (FirstFrameFieldMask & whichField))
00781 {
00782 _sfFirstFrame.copyFromBin(pMem);
00783 }
00784
00785
00786 }
00787
00788 #if !defined(OSG_FIXED_MFIELDSYNC)
00789 void RenderOptionsBase::executeSyncImpl( RenderOptionsBase *pOther,
00790 const BitVector &whichField)
00791 {
00792
00793 Inherited::executeSyncImpl(pOther, whichField);
00794
00795 if(FieldBits::NoField != (StatisticFieldMask & whichField))
00796 _sfStatistic.syncWith(pOther->_sfStatistic);
00797
00798 if(FieldBits::NoField != (PolygonModeFieldMask & whichField))
00799 _sfPolygonMode.syncWith(pOther->_sfPolygonMode);
00800
00801 if(FieldBits::NoField != (TwoSidedLightingFieldMask & whichField))
00802 _sfTwoSidedLighting.syncWith(pOther->_sfTwoSidedLighting);
00803
00804 if(FieldBits::NoField != (SpecTexLightingFieldMask & whichField))
00805 _sfSpecTexLighting.syncWith(pOther->_sfSpecTexLighting);
00806
00807 if(FieldBits::NoField != (SortTransFieldMask & whichField))
00808 _sfSortTrans.syncWith(pOther->_sfSortTrans);
00809
00810 if(FieldBits::NoField != (ZWriteTransFieldMask & whichField))
00811 _sfZWriteTrans.syncWith(pOther->_sfZWriteTrans);
00812
00813 if(FieldBits::NoField != (LocalLightsFieldMask & whichField))
00814 _sfLocalLights.syncWith(pOther->_sfLocalLights);
00815
00816 if(FieldBits::NoField != (CorrectTwoSidedLightingFieldMask & whichField))
00817 _sfCorrectTwoSidedLighting.syncWith(pOther->_sfCorrectTwoSidedLighting);
00818
00819 if(FieldBits::NoField != (OcclusionCullingFieldMask & whichField))
00820 _sfOcclusionCulling.syncWith(pOther->_sfOcclusionCulling);
00821
00822 if(FieldBits::NoField != (OcclusionCullingModeFieldMask & whichField))
00823 _sfOcclusionCullingMode.syncWith(pOther->_sfOcclusionCullingMode);
00824
00825 if(FieldBits::NoField != (OcclusionCullingPixelsFieldMask & whichField))
00826 _sfOcclusionCullingPixels.syncWith(pOther->_sfOcclusionCullingPixels);
00827
00828 if(FieldBits::NoField != (AntialiasingFieldMask & whichField))
00829 _sfAntialiasing.syncWith(pOther->_sfAntialiasing);
00830
00831 if(FieldBits::NoField != (AntialiasingDistanceFieldMask & whichField))
00832 _sfAntialiasingDistance.syncWith(pOther->_sfAntialiasingDistance);
00833
00834 if(FieldBits::NoField != (AntialiasingScaleFieldMask & whichField))
00835 _sfAntialiasingScale.syncWith(pOther->_sfAntialiasingScale);
00836
00837 if(FieldBits::NoField != (AntialiasingTriggerFieldMask & whichField))
00838 _sfAntialiasingTrigger.syncWith(pOther->_sfAntialiasingTrigger);
00839
00840 if(FieldBits::NoField != (FrustumCullingFieldMask & whichField))
00841 _sfFrustumCulling.syncWith(pOther->_sfFrustumCulling);
00842
00843 if(FieldBits::NoField != (BackfaceCullingFieldMask & whichField))
00844 _sfBackfaceCulling.syncWith(pOther->_sfBackfaceCulling);
00845
00846 if(FieldBits::NoField != (SmallFeatureCullingFieldMask & whichField))
00847 _sfSmallFeatureCulling.syncWith(pOther->_sfSmallFeatureCulling);
00848
00849 if(FieldBits::NoField != (SmallFeaturePixelsFieldMask & whichField))
00850 _sfSmallFeaturePixels.syncWith(pOther->_sfSmallFeaturePixels);
00851
00852 if(FieldBits::NoField != (SmallFeatureThresholdFieldMask & whichField))
00853 _sfSmallFeatureThreshold.syncWith(pOther->_sfSmallFeatureThreshold);
00854
00855 if(FieldBits::NoField != (FirstFrameFieldMask & whichField))
00856 _sfFirstFrame.syncWith(pOther->_sfFirstFrame);
00857
00858
00859 }
00860 #else
00861 void RenderOptionsBase::executeSyncImpl( RenderOptionsBase *pOther,
00862 const BitVector &whichField,
00863 const SyncInfo &sInfo )
00864 {
00865
00866 Inherited::executeSyncImpl(pOther, whichField, sInfo);
00867
00868 if(FieldBits::NoField != (StatisticFieldMask & whichField))
00869 _sfStatistic.syncWith(pOther->_sfStatistic);
00870
00871 if(FieldBits::NoField != (PolygonModeFieldMask & whichField))
00872 _sfPolygonMode.syncWith(pOther->_sfPolygonMode);
00873
00874 if(FieldBits::NoField != (TwoSidedLightingFieldMask & whichField))
00875 _sfTwoSidedLighting.syncWith(pOther->_sfTwoSidedLighting);
00876
00877 if(FieldBits::NoField != (SpecTexLightingFieldMask & whichField))
00878 _sfSpecTexLighting.syncWith(pOther->_sfSpecTexLighting);
00879
00880 if(FieldBits::NoField != (SortTransFieldMask & whichField))
00881 _sfSortTrans.syncWith(pOther->_sfSortTrans);
00882
00883 if(FieldBits::NoField != (ZWriteTransFieldMask & whichField))
00884 _sfZWriteTrans.syncWith(pOther->_sfZWriteTrans);
00885
00886 if(FieldBits::NoField != (LocalLightsFieldMask & whichField))
00887 _sfLocalLights.syncWith(pOther->_sfLocalLights);
00888
00889 if(FieldBits::NoField != (CorrectTwoSidedLightingFieldMask & whichField))
00890 _sfCorrectTwoSidedLighting.syncWith(pOther->_sfCorrectTwoSidedLighting);
00891
00892 if(FieldBits::NoField != (OcclusionCullingFieldMask & whichField))
00893 _sfOcclusionCulling.syncWith(pOther->_sfOcclusionCulling);
00894
00895 if(FieldBits::NoField != (OcclusionCullingModeFieldMask & whichField))
00896 _sfOcclusionCullingMode.syncWith(pOther->_sfOcclusionCullingMode);
00897
00898 if(FieldBits::NoField != (OcclusionCullingPixelsFieldMask & whichField))
00899 _sfOcclusionCullingPixels.syncWith(pOther->_sfOcclusionCullingPixels);
00900
00901 if(FieldBits::NoField != (AntialiasingFieldMask & whichField))
00902 _sfAntialiasing.syncWith(pOther->_sfAntialiasing);
00903
00904 if(FieldBits::NoField != (AntialiasingDistanceFieldMask & whichField))
00905 _sfAntialiasingDistance.syncWith(pOther->_sfAntialiasingDistance);
00906
00907 if(FieldBits::NoField != (AntialiasingScaleFieldMask & whichField))
00908 _sfAntialiasingScale.syncWith(pOther->_sfAntialiasingScale);
00909
00910 if(FieldBits::NoField != (AntialiasingTriggerFieldMask & whichField))
00911 _sfAntialiasingTrigger.syncWith(pOther->_sfAntialiasingTrigger);
00912
00913 if(FieldBits::NoField != (FrustumCullingFieldMask & whichField))
00914 _sfFrustumCulling.syncWith(pOther->_sfFrustumCulling);
00915
00916 if(FieldBits::NoField != (BackfaceCullingFieldMask & whichField))
00917 _sfBackfaceCulling.syncWith(pOther->_sfBackfaceCulling);
00918
00919 if(FieldBits::NoField != (SmallFeatureCullingFieldMask & whichField))
00920 _sfSmallFeatureCulling.syncWith(pOther->_sfSmallFeatureCulling);
00921
00922 if(FieldBits::NoField != (SmallFeaturePixelsFieldMask & whichField))
00923 _sfSmallFeaturePixels.syncWith(pOther->_sfSmallFeaturePixels);
00924
00925 if(FieldBits::NoField != (SmallFeatureThresholdFieldMask & whichField))
00926 _sfSmallFeatureThreshold.syncWith(pOther->_sfSmallFeatureThreshold);
00927
00928 if(FieldBits::NoField != (FirstFrameFieldMask & whichField))
00929 _sfFirstFrame.syncWith(pOther->_sfFirstFrame);
00930
00931
00932
00933 }
00934
00935 void RenderOptionsBase::execBeginEditImpl (const BitVector &whichField,
00936 UInt32 uiAspect,
00937 UInt32 uiContainerSize)
00938 {
00939 Inherited::execBeginEditImpl(whichField, uiAspect, uiContainerSize);
00940
00941 }
00942 #endif
00943
00944
00945
00946 OSG_END_NAMESPACE
00947
00948 #include <OSGSFieldTypeDef.inl>
00949 #include <OSGMFieldTypeDef.inl>
00950
00951 OSG_BEGIN_NAMESPACE
00952
00953 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
00954 DataType FieldDataTraits<RenderOptionsPtr>::_type("RenderOptionsPtr", "AttachmentPtr");
00955 #endif
00956
00957 OSG_DLLEXPORT_SFIELD_DEF1(RenderOptionsPtr, OSG_SYSTEMLIB_DLLTMPLMAPPING);
00958 OSG_DLLEXPORT_MFIELD_DEF1(RenderOptionsPtr, OSG_SYSTEMLIB_DLLTMPLMAPPING);
00959
00960
00961
00962
00963
00964 #ifdef OSG_SGI_CC
00965 #pragma set woff 1174
00966 #endif
00967
00968 #ifdef OSG_LINUX_ICC
00969 #pragma warning( disable : 177 )
00970 #endif
00971
00972 namespace
00973 {
00974 static Char8 cvsid_cpp [] = "@(#)$Id: OSGRenderOptionsBase.cpp,v 1.7 2007/07/03 09:16:10 yjung Exp $";
00975 static Char8 cvsid_hpp [] = OSGRENDEROPTIONSBASE_HEADER_CVSID;
00976 static Char8 cvsid_inl [] = OSGRENDEROPTIONSBASE_INLINE_CVSID;
00977
00978 static Char8 cvsid_fields_hpp[] = OSGRENDEROPTIONSFIELDS_HEADER_CVSID;
00979 }
00980
00981 OSG_END_NAMESPACE
00982