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 _OSGTILECAMERADECORATORBASE_H_
00055 #define _OSGTILECAMERADECORATORBASE_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 <OSGCameraDecorator.h>
00069
00070 #include <OSGReal32Fields.h>
00071 #include <OSGReal32Fields.h>
00072 #include <OSGReal32Fields.h>
00073 #include <OSGReal32Fields.h>
00074 #include <OSGUInt32Fields.h>
00075 #include <OSGUInt32Fields.h>
00076
00077 #include <OSGTileCameraDecoratorFields.h>
00078
00079 OSG_BEGIN_NAMESPACE
00080
00081 class TileCameraDecorator;
00082 class BinaryDataHandler;
00083
00085
00086 class OSG_SYSTEMLIB_DLLMAPPING TileCameraDecoratorBase : public CameraDecorator
00087 {
00088 private:
00089
00090 typedef CameraDecorator Inherited;
00091
00092
00093 public:
00094
00095 typedef TileCameraDecoratorPtr Ptr;
00096
00097 enum
00098 {
00099 LeftFieldId = Inherited::NextFieldId,
00100 RightFieldId = LeftFieldId + 1,
00101 BottomFieldId = RightFieldId + 1,
00102 TopFieldId = BottomFieldId + 1,
00103 FullWidthFieldId = TopFieldId + 1,
00104 FullHeightFieldId = FullWidthFieldId + 1,
00105 NextFieldId = FullHeightFieldId + 1
00106 };
00107
00108 static const OSG::BitVector LeftFieldMask;
00109 static const OSG::BitVector RightFieldMask;
00110 static const OSG::BitVector BottomFieldMask;
00111 static const OSG::BitVector TopFieldMask;
00112 static const OSG::BitVector FullWidthFieldMask;
00113 static const OSG::BitVector FullHeightFieldMask;
00114
00115
00116 static const OSG::BitVector MTInfluenceMask;
00117
00118
00122 static FieldContainerType &getClassType (void);
00123 static UInt32 getClassTypeId (void);
00124
00126
00130 virtual FieldContainerType &getType (void);
00131 virtual const FieldContainerType &getType (void) const;
00132
00133 virtual UInt32 getContainerSize(void) const;
00134
00136
00140 SFReal32 *getSFLeft (void);
00141 SFReal32 *getSFRight (void);
00142 SFReal32 *getSFBottom (void);
00143 SFReal32 *getSFTop (void);
00144 SFUInt32 *getSFFullWidth (void);
00145 SFUInt32 *getSFFullHeight (void);
00146
00147 Real32 &getLeft (void);
00148 const Real32 &getLeft (void) const;
00149 Real32 &getRight (void);
00150 const Real32 &getRight (void) const;
00151 Real32 &getBottom (void);
00152 const Real32 &getBottom (void) const;
00153 Real32 &getTop (void);
00154 const Real32 &getTop (void) const;
00155 UInt32 &getFullWidth (void);
00156 const UInt32 &getFullWidth (void) const;
00157 UInt32 &getFullHeight (void);
00158 const UInt32 &getFullHeight (void) const;
00159
00161
00165 void setLeft ( const Real32 &value );
00166 void setRight ( const Real32 &value );
00167 void setBottom ( const Real32 &value );
00168 void setTop ( const Real32 &value );
00169 void setFullWidth ( const UInt32 &value );
00170 void setFullHeight ( const UInt32 &value );
00171
00173
00178
00182 virtual UInt32 getBinSize (const BitVector &whichField);
00183 virtual void copyToBin ( BinaryDataHandler &pMem,
00184 const BitVector &whichField);
00185 virtual void copyFromBin( BinaryDataHandler &pMem,
00186 const BitVector &whichField);
00187
00188
00190
00194 static TileCameraDecoratorPtr create (void);
00195 static TileCameraDecoratorPtr createEmpty (void);
00196
00199
00203 virtual FieldContainerPtr shallowCopy (void) const;
00204
00206
00207 protected:
00208
00209
00213 SFReal32 _sfLeft;
00214 SFReal32 _sfRight;
00215 SFReal32 _sfBottom;
00216 SFReal32 _sfTop;
00217 SFUInt32 _sfFullWidth;
00218 SFUInt32 _sfFullHeight;
00219
00221
00225 TileCameraDecoratorBase(void);
00226 TileCameraDecoratorBase(const TileCameraDecoratorBase &source);
00227
00229
00233 virtual ~TileCameraDecoratorBase(void);
00234
00236
00240 #if !defined(OSG_FIXED_MFIELDSYNC)
00241 void executeSyncImpl( TileCameraDecoratorBase *pOther,
00242 const BitVector &whichField);
00243
00244 virtual void executeSync( FieldContainer &other,
00245 const BitVector &whichField);
00246 #else
00247 void executeSyncImpl( TileCameraDecoratorBase *pOther,
00248 const BitVector &whichField,
00249 const SyncInfo &sInfo );
00250
00251 virtual void executeSync( FieldContainer &other,
00252 const BitVector &whichField,
00253 const SyncInfo &sInfo);
00254
00255 virtual void execBeginEdit (const BitVector &whichField,
00256 UInt32 uiAspect,
00257 UInt32 uiContainerSize);
00258
00259 void execBeginEditImpl (const BitVector &whichField,
00260 UInt32 uiAspect,
00261 UInt32 uiContainerSize);
00262
00263 virtual void onDestroyAspect(UInt32 uiId, UInt32 uiAspect);
00264 #endif
00265
00267
00268 private:
00269
00270 friend class FieldContainer;
00271
00272 static FieldDescription *_desc[];
00273 static FieldContainerType _type;
00274
00275
00276
00277 void operator =(const TileCameraDecoratorBase &source);
00278 };
00279
00280
00281
00282
00283
00284
00285 typedef TileCameraDecoratorBase *TileCameraDecoratorBaseP;
00286
00287 typedef osgIF<TileCameraDecoratorBase::isNodeCore,
00288 CoredNodePtr<TileCameraDecorator>,
00289 FieldContainer::attempt_to_create_CoredNodePtr_on_non_NodeCore_FC
00290 >::_IRet TileCameraDecoratorNodePtr;
00291
00292 typedef RefPtr<TileCameraDecoratorPtr> TileCameraDecoratorRefPtr;
00293
00294 OSG_END_NAMESPACE
00295
00296 #define OSGTILECAMERADECORATORBASE_HEADER_CVSID "@(#)$Id: FCBaseTemplate_h.h,v 1.40 2005/07/20 00:10:14 vossg Exp $"
00297
00298 #endif