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 _OSGCAMERADECORATORBASE_H_
00055 #define _OSGCAMERADECORATORBASE_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 <OSGCamera.h>
00069
00070 #include <OSGCameraFields.h>
00071
00072 #include <OSGCameraDecoratorFields.h>
00073
00074 OSG_BEGIN_NAMESPACE
00075
00076 class CameraDecorator;
00077 class BinaryDataHandler;
00078
00080
00081 class OSG_SYSTEMLIB_DLLMAPPING CameraDecoratorBase : public Camera
00082 {
00083 private:
00084
00085 typedef Camera Inherited;
00086
00087
00088 public:
00089
00090 typedef CameraDecoratorPtr Ptr;
00091
00092 enum
00093 {
00094 DecorateeFieldId = Inherited::NextFieldId,
00095 NextFieldId = DecorateeFieldId + 1
00096 };
00097
00098 static const OSG::BitVector DecorateeFieldMask;
00099
00100 static const OSG::BitVector MTInfluenceMask;
00101
00102
00106 static FieldContainerType &getClassType (void);
00107 static UInt32 getClassTypeId (void);
00108
00110
00114 virtual FieldContainerType &getType (void);
00115 virtual const FieldContainerType &getType (void) const;
00116
00117 virtual UInt32 getContainerSize(void) const;
00118
00120
00124 SFCameraPtr *getSFDecoratee(void);
00125 SFNodePtr *getSFBeacon (void);
00126 SFReal32 *getSFNear (void);
00127 SFReal32 *getSFFar (void);
00128
00129 CameraPtr &getDecoratee(void);
00130 const CameraPtr &getDecoratee(void) const;
00131 NodePtr &getBeacon (void);
00132 const NodePtr &getBeacon (void) const;
00133 Real32 &getNear (void);
00134 const Real32 &getNear (void) const;
00135 Real32 &getFar (void);
00136 const Real32 &getFar (void) const;
00137
00139
00143 void setDecoratee ( const CameraPtr &value );
00144 void setBeacon ( const NodePtr &value );
00145 void setNear ( const Real32 &value );
00146 void setFar ( const Real32 &value );
00147
00149
00154
00158 virtual UInt32 getBinSize (const BitVector &whichField);
00159 virtual void copyToBin ( BinaryDataHandler &pMem,
00160 const BitVector &whichField);
00161 virtual void copyFromBin( BinaryDataHandler &pMem,
00162 const BitVector &whichField);
00163
00164
00166
00167 protected:
00168
00169
00173 SFCameraPtr _sfDecoratee;
00174
00176
00180 CameraDecoratorBase(void);
00181 CameraDecoratorBase(const CameraDecoratorBase &source);
00182
00184
00188 virtual ~CameraDecoratorBase(void);
00189
00191
00195 #if !defined(OSG_FIXED_MFIELDSYNC)
00196 void executeSyncImpl( CameraDecoratorBase *pOther,
00197 const BitVector &whichField);
00198
00199 virtual void executeSync( FieldContainer &other,
00200 const BitVector &whichField);
00201 #else
00202 void executeSyncImpl( CameraDecoratorBase *pOther,
00203 const BitVector &whichField,
00204 const SyncInfo &sInfo );
00205
00206 virtual void executeSync( FieldContainer &other,
00207 const BitVector &whichField,
00208 const SyncInfo &sInfo);
00209
00210 virtual void execBeginEdit (const BitVector &whichField,
00211 UInt32 uiAspect,
00212 UInt32 uiContainerSize);
00213
00214 void execBeginEditImpl (const BitVector &whichField,
00215 UInt32 uiAspect,
00216 UInt32 uiContainerSize);
00217
00218 virtual void onDestroyAspect(UInt32 uiId, UInt32 uiAspect);
00219 #endif
00220
00222
00223 private:
00224
00225 friend class FieldContainer;
00226
00227 static FieldDescription *_desc[];
00228 static FieldContainerType _type;
00229
00230
00231
00232 void operator =(const CameraDecoratorBase &source);
00233 };
00234
00235
00236
00237
00238
00239
00240 typedef CameraDecoratorBase *CameraDecoratorBaseP;
00241
00242 typedef osgIF<CameraDecoratorBase::isNodeCore,
00243 CoredNodePtr<CameraDecorator>,
00244 FieldContainer::attempt_to_create_CoredNodePtr_on_non_NodeCore_FC
00245 >::_IRet CameraDecoratorNodePtr;
00246
00247 typedef RefPtr<CameraDecoratorPtr> CameraDecoratorRefPtr;
00248
00249 OSG_END_NAMESPACE
00250
00251 #define OSGCAMERADECORATORBASE_HEADER_CVSID "@(#)$Id: FCBaseTemplate_h.h,v 1.38 2005/07/08 06:37:35 vossg Exp $"
00252
00253 #endif