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_COMPILECAMERADECORATORINST
00055
00056 #include <stdlib.h>
00057 #include <stdio.h>
00058
00059 #include <OSGConfig.h>
00060
00061 #include "OSGCameraDecoratorBase.h"
00062 #include "OSGCameraDecorator.h"
00063
00064
00065 OSG_USING_NAMESPACE
00066
00067 const OSG::BitVector CameraDecoratorBase::DecorateeFieldMask =
00068 (TypeTraits<BitVector>::One << CameraDecoratorBase::DecorateeFieldId);
00069 const OSG::BitVector CameraDecoratorBase::MTInfluenceMask =
00070 (Inherited::MTInfluenceMask) |
00071 (static_cast<BitVector>(0x0) << Inherited::NextFieldId);
00072
00073
00074
00079
00080
00081 FieldDescription *CameraDecoratorBase::_desc[] =
00082 {
00083 new FieldDescription(SFCameraPtr::getClassType(),
00084 "decoratee",
00085 DecorateeFieldId, DecorateeFieldMask,
00086 true,
00087 (FieldAccessMethod) &CameraDecoratorBase::getSFDecoratee)
00088 };
00089
00090
00091 FieldContainerType CameraDecoratorBase::_type(
00092 "CameraDecorator",
00093 "Camera",
00094 NULL,
00095 NULL,
00096 CameraDecorator::initMethod,
00097 _desc,
00098 sizeof(_desc));
00099
00100
00101
00102
00103
00104 FieldContainerType &CameraDecoratorBase::getType(void)
00105 {
00106 return _type;
00107 }
00108
00109 const FieldContainerType &CameraDecoratorBase::getType(void) const
00110 {
00111 return _type;
00112 }
00113
00114
00115 UInt32 CameraDecoratorBase::getContainerSize(void) const
00116 {
00117 return sizeof(CameraDecorator);
00118 }
00119
00120
00121 #if !defined(OSG_FIXED_MFIELDSYNC)
00122 void CameraDecoratorBase::executeSync( FieldContainer &other,
00123 const BitVector &whichField)
00124 {
00125 this->executeSyncImpl((CameraDecoratorBase *) &other, whichField);
00126 }
00127 #else
00128 void CameraDecoratorBase::executeSync( FieldContainer &other,
00129 const BitVector &whichField, const SyncInfo &sInfo )
00130 {
00131 this->executeSyncImpl((CameraDecoratorBase *) &other, whichField, sInfo);
00132 }
00133 void CameraDecoratorBase::execBeginEdit(const BitVector &whichField,
00134 UInt32 uiAspect,
00135 UInt32 uiContainerSize)
00136 {
00137 this->execBeginEditImpl(whichField, uiAspect, uiContainerSize);
00138 }
00139
00140 void CameraDecoratorBase::onDestroyAspect(UInt32 uiId, UInt32 uiAspect)
00141 {
00142 Inherited::onDestroyAspect(uiId, uiAspect);
00143
00144 }
00145 #endif
00146
00147
00148
00149 #ifdef OSG_WIN32_ICL
00150 #pragma warning (disable : 383)
00151 #endif
00152
00153 CameraDecoratorBase::CameraDecoratorBase(void) :
00154 _sfDecoratee(),
00155 Inherited()
00156 {
00157 }
00158
00159 #ifdef OSG_WIN32_ICL
00160 #pragma warning (default : 383)
00161 #endif
00162
00163 CameraDecoratorBase::CameraDecoratorBase(const CameraDecoratorBase &source) :
00164 _sfDecoratee(source._sfDecoratee),
00165 Inherited (source)
00166 {
00167 }
00168
00169
00170
00171 CameraDecoratorBase::~CameraDecoratorBase(void)
00172 {
00173 }
00174
00175
00176
00177 UInt32 CameraDecoratorBase::getBinSize(const BitVector &whichField)
00178 {
00179 UInt32 returnValue = Inherited::getBinSize(whichField);
00180
00181 if(FieldBits::NoField != (DecorateeFieldMask & whichField))
00182 {
00183 returnValue += _sfDecoratee.getBinSize();
00184 }
00185
00186 return returnValue;
00187 }
00188
00189 void CameraDecoratorBase::copyToBin( BinaryDataHandler &pMem,
00190 const BitVector &whichField)
00191 {
00192 Inherited::copyToBin(pMem, whichField);
00193
00194 if(FieldBits::NoField != (DecorateeFieldMask & whichField))
00195 {
00196 _sfDecoratee.copyToBin(pMem);
00197 }
00198
00199 }
00200
00201 void CameraDecoratorBase::copyFromBin( BinaryDataHandler &pMem,
00202 const BitVector &whichField)
00203 {
00204 Inherited::copyFromBin(pMem, whichField);
00205
00206 if(FieldBits::NoField != (DecorateeFieldMask & whichField))
00207 {
00208 _sfDecoratee.copyFromBin(pMem);
00209 }
00210
00211 }
00212
00213 #if !defined(OSG_FIXED_MFIELDSYNC)
00214 void CameraDecoratorBase::executeSyncImpl( CameraDecoratorBase *pOther,
00215 const BitVector &whichField)
00216 {
00217
00218 Inherited::executeSyncImpl(pOther, whichField);
00219
00220 if(FieldBits::NoField != (DecorateeFieldMask & whichField))
00221 {
00222 _sfDecoratee.syncWith(pOther->_sfDecoratee);
00223 }
00224
00225 }
00226 #else
00227 void CameraDecoratorBase::executeSyncImpl( CameraDecoratorBase *pOther,
00228 const BitVector &whichField,
00229 const SyncInfo &sInfo )
00230 {
00231
00232 Inherited::executeSyncImpl(pOther, whichField, sInfo);
00233
00234 if(FieldBits::NoField != (DecorateeFieldMask & whichField))
00235 {
00236 _sfDecoratee.syncWith(pOther->_sfDecoratee);
00237 }
00238
00239 }
00240
00241 void CameraDecoratorBase::execBeginEditImpl (const BitVector &whichField,
00242 UInt32 uiAspect,
00243 UInt32 uiContainerSize)
00244 {
00245 Inherited::execBeginEditImpl(whichField, uiAspect, uiContainerSize);
00246
00247 }
00248 #endif
00249
00250
00251
00252 #include <OSGSFieldTypeDef.inl>
00253 #include <OSGMFieldTypeDef.inl>
00254
00255 OSG_BEGIN_NAMESPACE
00256
00257 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
00258 DataType FieldDataTraits<CameraDecoratorPtr>::_type("CameraDecoratorPtr", "CameraPtr");
00259 #endif
00260
00261 OSG_DLLEXPORT_SFIELD_DEF1(CameraDecoratorPtr, OSG_SYSTEMLIB_DLLTMPLMAPPING);
00262 OSG_DLLEXPORT_MFIELD_DEF1(CameraDecoratorPtr, OSG_SYSTEMLIB_DLLTMPLMAPPING);
00263
00264 OSG_END_NAMESPACE
00265
00266
00267
00268
00269
00270 #ifdef OSG_SGI_CC
00271 #pragma set woff 1174
00272 #endif
00273
00274 #ifdef OSG_LINUX_ICC
00275 #pragma warning( disable : 177 )
00276 #endif
00277
00278 namespace
00279 {
00280 static Char8 cvsid_cpp [] = "@(#)$Id: FCBaseTemplate_cpp.h,v 1.42 2004/08/03 05:53:03 dirk Exp $";
00281 static Char8 cvsid_hpp [] = OSGCAMERADECORATORBASE_HEADER_CVSID;
00282 static Char8 cvsid_inl [] = OSGCAMERADECORATORBASE_INLINE_CVSID;
00283
00284 static Char8 cvsid_fields_hpp[] = OSGCAMERADECORATORFIELDS_HEADER_CVSID;
00285 }
00286