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