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 #ifndef _OSGREGISTERCOMBINERSCHUNKBASE_H_
00055 #define _OSGREGISTERCOMBINERSCHUNKBASE_H_
00056 #ifdef __sgi
00057 #pragma once
00058 #endif
00059
00060
00061 #include <OSGConfig.h>
00062 #include <OSGSystemDef.h>
00063
00064 #include <OSGBaseTypes.h>
00065 #include <OSGRefPtr.h>
00066 #include <OSGCoredNodePtr.h>
00067
00068 #include <OSGStateChunk.h>
00069
00070 #include <OSGColor4fFields.h>
00071 #include <OSGColor4fFields.h>
00072 #include <OSGBoolFields.h>
00073 #include <OSGGLenumFields.h>
00074 #include <OSGGLenumFields.h>
00075 #include <OSGGLenumFields.h>
00076 #include <OSGGLenumFields.h>
00077 #include <OSGGLenumFields.h>
00078 #include <OSGGLenumFields.h>
00079 #include <OSGGLenumFields.h>
00080 #include <OSGGLenumFields.h>
00081 #include <OSGGLenumFields.h>
00082 #include <OSGGLenumFields.h>
00083 #include <OSGGLenumFields.h>
00084 #include <OSGGLenumFields.h>
00085 #include <OSGGLenumFields.h>
00086 #include <OSGGLenumFields.h>
00087 #include <OSGGLenumFields.h>
00088 #include <OSGGLenumFields.h>
00089 #include <OSGUInt8Fields.h>
00090 #include <OSGUInt8Fields.h>
00091 #include <OSGUInt8Fields.h>
00092 #include <OSGGLenumFields.h>
00093 #include <OSGGLenumFields.h>
00094 #include <OSGUInt8Fields.h>
00095 #include <OSGGLenumFields.h>
00096 #include <OSGGLenumFields.h>
00097 #include <OSGGLenumFields.h>
00098 #include <OSGColor4fFields.h>
00099 #include <OSGColor4fFields.h>
00100 #include <OSGUInt8Fields.h>
00101
00102 #include <OSGRegisterCombinersChunkFields.h>
00103
00104 OSG_BEGIN_NAMESPACE
00105
00106 class RegisterCombinersChunk;
00107 class BinaryDataHandler;
00108
00110
00111 class OSG_SYSTEMLIB_DLLMAPPING RegisterCombinersChunkBase : public StateChunk
00112 {
00113 private:
00114
00115 typedef StateChunk Inherited;
00116
00117
00118 public:
00119
00120 typedef RegisterCombinersChunkPtr Ptr;
00121
00122 enum
00123 {
00124 Color0FieldId = Inherited::NextFieldId,
00125 Color1FieldId = Color0FieldId + 1,
00126 ColorSumClampFieldId = Color1FieldId + 1,
00127 VariableArgbFieldId = ColorSumClampFieldId + 1,
00128 VariableBrgbFieldId = VariableArgbFieldId + 1,
00129 VariableCrgbFieldId = VariableBrgbFieldId + 1,
00130 VariableDrgbFieldId = VariableCrgbFieldId + 1,
00131 VariableAalphaFieldId = VariableDrgbFieldId + 1,
00132 VariableBalphaFieldId = VariableAalphaFieldId + 1,
00133 VariableCalphaFieldId = VariableBalphaFieldId + 1,
00134 VariableDalphaFieldId = VariableCalphaFieldId + 1,
00135 OutputABrgbFieldId = VariableDalphaFieldId + 1,
00136 OutputCDrgbFieldId = OutputABrgbFieldId + 1,
00137 OutputSumrgbFieldId = OutputCDrgbFieldId + 1,
00138 ScalergbFieldId = OutputSumrgbFieldId + 1,
00139 BiasrgbFieldId = ScalergbFieldId + 1,
00140 OutputABalphaFieldId = BiasrgbFieldId + 1,
00141 OutputCDalphaFieldId = OutputABalphaFieldId + 1,
00142 OutputSumalphaFieldId = OutputCDalphaFieldId + 1,
00143 DotABrgbFieldId = OutputSumalphaFieldId + 1,
00144 DotCDrgbFieldId = DotABrgbFieldId + 1,
00145 MuxSumrgbFieldId = DotCDrgbFieldId + 1,
00146 ScalealphaFieldId = MuxSumrgbFieldId + 1,
00147 BiasalphaFieldId = ScalealphaFieldId + 1,
00148 MuxSumalphaFieldId = BiasalphaFieldId + 1,
00149 VariableEFieldId = MuxSumalphaFieldId + 1,
00150 VariableFFieldId = VariableEFieldId + 1,
00151 VariableGFieldId = VariableFFieldId + 1,
00152 CombinerColor0FieldId = VariableGFieldId + 1,
00153 CombinerColor1FieldId = CombinerColor0FieldId + 1,
00154 PerStageConstantsFieldId = CombinerColor1FieldId + 1,
00155 NextFieldId = PerStageConstantsFieldId + 1
00156 };
00157
00158 static const OSG::BitVector Color0FieldMask;
00159 static const OSG::BitVector Color1FieldMask;
00160 static const OSG::BitVector ColorSumClampFieldMask;
00161 static const OSG::BitVector VariableArgbFieldMask;
00162 static const OSG::BitVector VariableBrgbFieldMask;
00163 static const OSG::BitVector VariableCrgbFieldMask;
00164 static const OSG::BitVector VariableDrgbFieldMask;
00165 static const OSG::BitVector VariableAalphaFieldMask;
00166 static const OSG::BitVector VariableBalphaFieldMask;
00167 static const OSG::BitVector VariableCalphaFieldMask;
00168 static const OSG::BitVector VariableDalphaFieldMask;
00169 static const OSG::BitVector OutputABrgbFieldMask;
00170 static const OSG::BitVector OutputCDrgbFieldMask;
00171 static const OSG::BitVector OutputSumrgbFieldMask;
00172 static const OSG::BitVector ScalergbFieldMask;
00173 static const OSG::BitVector BiasrgbFieldMask;
00174 static const OSG::BitVector OutputABalphaFieldMask;
00175 static const OSG::BitVector OutputCDalphaFieldMask;
00176 static const OSG::BitVector OutputSumalphaFieldMask;
00177 static const OSG::BitVector DotABrgbFieldMask;
00178 static const OSG::BitVector DotCDrgbFieldMask;
00179 static const OSG::BitVector MuxSumrgbFieldMask;
00180 static const OSG::BitVector ScalealphaFieldMask;
00181 static const OSG::BitVector BiasalphaFieldMask;
00182 static const OSG::BitVector MuxSumalphaFieldMask;
00183 static const OSG::BitVector VariableEFieldMask;
00184 static const OSG::BitVector VariableFFieldMask;
00185 static const OSG::BitVector VariableGFieldMask;
00186 static const OSG::BitVector CombinerColor0FieldMask;
00187 static const OSG::BitVector CombinerColor1FieldMask;
00188 static const OSG::BitVector PerStageConstantsFieldMask;
00189
00190
00191 static const OSG::BitVector MTInfluenceMask;
00192
00193
00197 static FieldContainerType &getClassType (void);
00198 static UInt32 getClassTypeId (void);
00199
00201
00205 virtual FieldContainerType &getType (void);
00206 virtual const FieldContainerType &getType (void) const;
00207
00208 virtual UInt32 getContainerSize(void) const;
00209
00211
00215 SFColor4f *getSFColor0 (void);
00216 SFColor4f *getSFColor1 (void);
00217 SFBool *getSFColorSumClamp (void);
00218 MFGLenum *getMFVariableArgb (void);
00219 MFGLenum *getMFVariableBrgb (void);
00220 MFGLenum *getMFVariableCrgb (void);
00221 MFGLenum *getMFVariableDrgb (void);
00222 MFGLenum *getMFVariableAalpha (void);
00223 MFGLenum *getMFVariableBalpha (void);
00224 MFGLenum *getMFVariableCalpha (void);
00225 MFGLenum *getMFVariableDalpha (void);
00226 MFGLenum *getMFOutputABrgb (void);
00227 MFGLenum *getMFOutputCDrgb (void);
00228 MFGLenum *getMFOutputSumrgb (void);
00229 MFGLenum *getMFScalergb (void);
00230 MFGLenum *getMFBiasrgb (void);
00231 MFGLenum *getMFOutputABalpha (void);
00232 MFGLenum *getMFOutputCDalpha (void);
00233 MFGLenum *getMFOutputSumalpha (void);
00234 MFUInt8 *getMFDotABrgb (void);
00235 MFUInt8 *getMFDotCDrgb (void);
00236 MFUInt8 *getMFMuxSumrgb (void);
00237 MFGLenum *getMFScalealpha (void);
00238 MFGLenum *getMFBiasalpha (void);
00239 MFUInt8 *getMFMuxSumalpha (void);
00240 MFGLenum *getMFVariableE (void);
00241 MFGLenum *getMFVariableF (void);
00242 MFGLenum *getMFVariableG (void);
00243 MFColor4f *getMFCombinerColor0 (void);
00244 MFColor4f *getMFCombinerColor1 (void);
00245 SFUInt8 *getSFPerStageConstants(void);
00246
00247 Color4f &getColor0 (void);
00248 const Color4f &getColor0 (void) const;
00249 Color4f &getColor1 (void);
00250 const Color4f &getColor1 (void) const;
00251 bool &getColorSumClamp (void);
00252 const bool &getColorSumClamp (void) const;
00253 UInt8 &getPerStageConstants(void);
00254 const UInt8 &getPerStageConstants(void) const;
00255 GLenum &getVariableArgb (const UInt32 index);
00256 MFGLenum &getVariableArgb (void);
00257 const MFGLenum &getVariableArgb (void) const;
00258 GLenum &getVariableBrgb (const UInt32 index);
00259 MFGLenum &getVariableBrgb (void);
00260 const MFGLenum &getVariableBrgb (void) const;
00261 GLenum &getVariableCrgb (const UInt32 index);
00262 MFGLenum &getVariableCrgb (void);
00263 const MFGLenum &getVariableCrgb (void) const;
00264 GLenum &getVariableDrgb (const UInt32 index);
00265 MFGLenum &getVariableDrgb (void);
00266 const MFGLenum &getVariableDrgb (void) const;
00267 GLenum &getVariableAalpha (const UInt32 index);
00268 MFGLenum &getVariableAalpha (void);
00269 const MFGLenum &getVariableAalpha (void) const;
00270 GLenum &getVariableBalpha (const UInt32 index);
00271 MFGLenum &getVariableBalpha (void);
00272 const MFGLenum &getVariableBalpha (void) const;
00273 GLenum &getVariableCalpha (const UInt32 index);
00274 MFGLenum &getVariableCalpha (void);
00275 const MFGLenum &getVariableCalpha (void) const;
00276 GLenum &getVariableDalpha (const UInt32 index);
00277 MFGLenum &getVariableDalpha (void);
00278 const MFGLenum &getVariableDalpha (void) const;
00279 GLenum &getOutputABrgb (const UInt32 index);
00280 MFGLenum &getOutputABrgb (void);
00281 const MFGLenum &getOutputABrgb (void) const;
00282 GLenum &getOutputCDrgb (const UInt32 index);
00283 MFGLenum &getOutputCDrgb (void);
00284 const MFGLenum &getOutputCDrgb (void) const;
00285 GLenum &getOutputSumrgb (const UInt32 index);
00286 MFGLenum &getOutputSumrgb (void);
00287 const MFGLenum &getOutputSumrgb (void) const;
00288 GLenum &getScalergb (const UInt32 index);
00289 MFGLenum &getScalergb (void);
00290 const MFGLenum &getScalergb (void) const;
00291 GLenum &getBiasrgb (const UInt32 index);
00292 MFGLenum &getBiasrgb (void);
00293 const MFGLenum &getBiasrgb (void) const;
00294 GLenum &getOutputABalpha (const UInt32 index);
00295 MFGLenum &getOutputABalpha (void);
00296 const MFGLenum &getOutputABalpha (void) const;
00297 GLenum &getOutputCDalpha (const UInt32 index);
00298 MFGLenum &getOutputCDalpha (void);
00299 const MFGLenum &getOutputCDalpha (void) const;
00300 GLenum &getOutputSumalpha (const UInt32 index);
00301 MFGLenum &getOutputSumalpha (void);
00302 const MFGLenum &getOutputSumalpha (void) const;
00303 UInt8 &getDotABrgb (const UInt32 index);
00304 MFUInt8 &getDotABrgb (void);
00305 const MFUInt8 &getDotABrgb (void) const;
00306 UInt8 &getDotCDrgb (const UInt32 index);
00307 MFUInt8 &getDotCDrgb (void);
00308 const MFUInt8 &getDotCDrgb (void) const;
00309 UInt8 &getMuxSumrgb (const UInt32 index);
00310 MFUInt8 &getMuxSumrgb (void);
00311 const MFUInt8 &getMuxSumrgb (void) const;
00312 GLenum &getScalealpha (const UInt32 index);
00313 MFGLenum &getScalealpha (void);
00314 const MFGLenum &getScalealpha (void) const;
00315 GLenum &getBiasalpha (const UInt32 index);
00316 MFGLenum &getBiasalpha (void);
00317 const MFGLenum &getBiasalpha (void) const;
00318 UInt8 &getMuxSumalpha (const UInt32 index);
00319 MFUInt8 &getMuxSumalpha (void);
00320 const MFUInt8 &getMuxSumalpha (void) const;
00321 GLenum &getVariableE (const UInt32 index);
00322 MFGLenum &getVariableE (void);
00323 const MFGLenum &getVariableE (void) const;
00324 GLenum &getVariableF (const UInt32 index);
00325 MFGLenum &getVariableF (void);
00326 const MFGLenum &getVariableF (void) const;
00327 GLenum &getVariableG (const UInt32 index);
00328 MFGLenum &getVariableG (void);
00329 const MFGLenum &getVariableG (void) const;
00330 Color4f &getCombinerColor0 (const UInt32 index);
00331 MFColor4f &getCombinerColor0 (void);
00332 const MFColor4f &getCombinerColor0 (void) const;
00333 Color4f &getCombinerColor1 (const UInt32 index);
00334 MFColor4f &getCombinerColor1 (void);
00335 const MFColor4f &getCombinerColor1 (void) const;
00336
00338
00342 void setColor0 ( const Color4f &value );
00343 void setColor1 ( const Color4f &value );
00344 void setColorSumClamp ( const bool &value );
00345 void setPerStageConstants( const UInt8 &value );
00346
00348
00353
00357 virtual UInt32 getBinSize (const BitVector &whichField);
00358 virtual void copyToBin ( BinaryDataHandler &pMem,
00359 const BitVector &whichField);
00360 virtual void copyFromBin( BinaryDataHandler &pMem,
00361 const BitVector &whichField);
00362
00363
00365
00369 static RegisterCombinersChunkPtr create (void);
00370 static RegisterCombinersChunkPtr createEmpty (void);
00371
00374
00378 virtual FieldContainerPtr shallowCopy (void) const;
00379
00381
00382 protected:
00383
00384
00388 SFColor4f _sfColor0;
00389 SFColor4f _sfColor1;
00390 SFBool _sfColorSumClamp;
00391 MFGLenum _mfVariableArgb;
00392 MFGLenum _mfVariableBrgb;
00393 MFGLenum _mfVariableCrgb;
00394 MFGLenum _mfVariableDrgb;
00395 MFGLenum _mfVariableAalpha;
00396 MFGLenum _mfVariableBalpha;
00397 MFGLenum _mfVariableCalpha;
00398 MFGLenum _mfVariableDalpha;
00399 MFGLenum _mfOutputABrgb;
00400 MFGLenum _mfOutputCDrgb;
00401 MFGLenum _mfOutputSumrgb;
00402 MFGLenum _mfScalergb;
00403 MFGLenum _mfBiasrgb;
00404 MFGLenum _mfOutputABalpha;
00405 MFGLenum _mfOutputCDalpha;
00406 MFGLenum _mfOutputSumalpha;
00407 MFUInt8 _mfDotABrgb;
00408 MFUInt8 _mfDotCDrgb;
00409 MFUInt8 _mfMuxSumrgb;
00410 MFGLenum _mfScalealpha;
00411 MFGLenum _mfBiasalpha;
00412 MFUInt8 _mfMuxSumalpha;
00413 MFGLenum _mfVariableE;
00414 MFGLenum _mfVariableF;
00415 MFGLenum _mfVariableG;
00416 MFColor4f _mfCombinerColor0;
00417 MFColor4f _mfCombinerColor1;
00418 SFUInt8 _sfPerStageConstants;
00419
00421
00425 RegisterCombinersChunkBase(void);
00426 RegisterCombinersChunkBase(const RegisterCombinersChunkBase &source);
00427
00429
00433 virtual ~RegisterCombinersChunkBase(void);
00434
00436
00440 #if !defined(OSG_FIXED_MFIELDSYNC)
00441 void executeSyncImpl( RegisterCombinersChunkBase *pOther,
00442 const BitVector &whichField);
00443
00444 virtual void executeSync( FieldContainer &other,
00445 const BitVector &whichField);
00446 #else
00447 void executeSyncImpl( RegisterCombinersChunkBase *pOther,
00448 const BitVector &whichField,
00449 const SyncInfo &sInfo );
00450
00451 virtual void executeSync( FieldContainer &other,
00452 const BitVector &whichField,
00453 const SyncInfo &sInfo);
00454
00455 virtual void execBeginEdit (const BitVector &whichField,
00456 UInt32 uiAspect,
00457 UInt32 uiContainerSize);
00458
00459 void execBeginEditImpl (const BitVector &whichField,
00460 UInt32 uiAspect,
00461 UInt32 uiContainerSize);
00462
00463 virtual void onDestroyAspect(UInt32 uiId, UInt32 uiAspect);
00464 #endif
00465
00467
00468 private:
00469
00470 friend class FieldContainer;
00471
00472 static FieldDescription *_desc[];
00473 static FieldContainerType _type;
00474
00475
00476
00477 void operator =(const RegisterCombinersChunkBase &source);
00478 };
00479
00480
00481
00482
00483
00484
00485 typedef RegisterCombinersChunkBase *RegisterCombinersChunkBaseP;
00486
00487 typedef osgIF<RegisterCombinersChunkBase::isNodeCore,
00488 CoredNodePtr<RegisterCombinersChunk>,
00489 FieldContainer::attempt_to_create_CoredNodePtr_on_non_NodeCore_FC
00490 >::_IRet RegisterCombinersChunkNodePtr;
00491
00492 typedef RefPtr<RegisterCombinersChunkPtr> RegisterCombinersChunkRefPtr;
00493
00494 OSG_END_NAMESPACE
00495
00496 #define OSGREGISTERCOMBINERSCHUNKBASE_HEADER_CVSID "@(#)$Id: FCBaseTemplate_h.h,v 1.40 2005/07/20 00:10:14 vossg Exp $"
00497
00498 #endif