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 _OSGDVRISOSHADERBASE_H_
00055 #define _OSGDVRISOSHADERBASE_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 <OSGDVRShader.h>
00069
00070 #include <OSGInt8Fields.h>
00071 #include <OSGInt8Fields.h>
00072
00073 #include <OSGDVRIsoShaderFields.h>
00074
00075 OSG_BEGIN_NAMESPACE
00076
00077 class DVRIsoShader;
00078 class BinaryDataHandler;
00079
00081
00082 class OSG_SYSTEMLIB_DLLMAPPING DVRIsoShaderBase : public DVRShader
00083 {
00084 private:
00085
00086 typedef DVRShader Inherited;
00087
00088
00089 public:
00090
00091 typedef DVRIsoShaderPtr Ptr;
00092
00093 enum
00094 {
00095 ShadeModeFieldId = Inherited::NextFieldId,
00096 ActiveShadeModeFieldId = ShadeModeFieldId + 1,
00097 NextFieldId = ActiveShadeModeFieldId + 1
00098 };
00099
00100 static const OSG::BitVector ShadeModeFieldMask;
00101 static const OSG::BitVector ActiveShadeModeFieldMask;
00102
00103
00104 static const OSG::BitVector MTInfluenceMask;
00105
00106
00110 static FieldContainerType &getClassType (void);
00111 static UInt32 getClassTypeId (void);
00112
00114
00118 virtual FieldContainerType &getType (void);
00119 virtual const FieldContainerType &getType (void) const;
00120
00121 virtual UInt32 getContainerSize(void) const;
00122
00124
00129
00133 virtual UInt32 getBinSize (const BitVector &whichField);
00134 virtual void copyToBin ( BinaryDataHandler &pMem,
00135 const BitVector &whichField);
00136 virtual void copyFromBin( BinaryDataHandler &pMem,
00137 const BitVector &whichField);
00138
00139
00141
00145 static DVRIsoShaderPtr create (void);
00146 static DVRIsoShaderPtr createEmpty (void);
00147
00150
00154 virtual FieldContainerPtr shallowCopy (void) const;
00155
00157
00158 protected:
00159
00160
00164 SFInt8 _sfShadeMode;
00165 SFInt8 _sfActiveShadeMode;
00166
00168
00172 DVRIsoShaderBase(void);
00173 DVRIsoShaderBase(const DVRIsoShaderBase &source);
00174
00176
00180 virtual ~DVRIsoShaderBase(void);
00181
00183
00187 SFInt8 *getSFShadeMode (void);
00188 SFInt8 *getSFActiveShadeMode(void);
00189
00190 Int8 &getShadeMode (void);
00191 const Int8 &getShadeMode (void) const;
00192 Int8 &getActiveShadeMode(void);
00193 const Int8 &getActiveShadeMode(void) const;
00194
00196
00200 void setShadeMode (const Int8 &value);
00201 void setActiveShadeMode(const Int8 &value);
00202
00204
00208 #if !defined(OSG_FIXED_MFIELDSYNC)
00209 void executeSyncImpl( DVRIsoShaderBase *pOther,
00210 const BitVector &whichField);
00211
00212 virtual void executeSync( FieldContainer &other,
00213 const BitVector &whichField);
00214 #else
00215 void executeSyncImpl( DVRIsoShaderBase *pOther,
00216 const BitVector &whichField,
00217 const SyncInfo &sInfo );
00218
00219 virtual void executeSync( FieldContainer &other,
00220 const BitVector &whichField,
00221 const SyncInfo &sInfo);
00222
00223 virtual void execBeginEdit (const BitVector &whichField,
00224 UInt32 uiAspect,
00225 UInt32 uiContainerSize);
00226
00227 void execBeginEditImpl (const BitVector &whichField,
00228 UInt32 uiAspect,
00229 UInt32 uiContainerSize);
00230
00231 virtual void onDestroyAspect(UInt32 uiId, UInt32 uiAspect);
00232 #endif
00233
00235
00236 private:
00237
00238 friend class FieldContainer;
00239
00240 static FieldDescription *_desc[];
00241 static FieldContainerType _type;
00242
00243
00244
00245 void operator =(const DVRIsoShaderBase &source);
00246 };
00247
00248
00249
00250
00251
00252
00253 typedef DVRIsoShaderBase *DVRIsoShaderBaseP;
00254
00255 typedef osgIF<DVRIsoShaderBase::isNodeCore,
00256 CoredNodePtr<DVRIsoShader>,
00257 FieldContainer::attempt_to_create_CoredNodePtr_on_non_NodeCore_FC
00258 >::_IRet DVRIsoShaderNodePtr;
00259
00260 typedef RefPtr<DVRIsoShaderPtr> DVRIsoShaderRefPtr;
00261
00262 OSG_END_NAMESPACE
00263
00264 #define OSGDVRISOSHADERBASE_HEADER_CVSID "@(#)$Id: FCBaseTemplate_h.h,v 1.38 2005/07/08 06:37:35 vossg Exp $"
00265
00266 #endif