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 _OSGDVRCLIPOBJECTSBASE_H_
00055 #define _OSGDVRCLIPOBJECTSBASE_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 <OSGAttachment.h>
00069
00070 #include <OSGDVRClipGeometry.h>
00071 #include <OSGInt32Fields.h>
00072 #include <OSGBoolFields.h>
00073
00074 #include <OSGDVRClipObjectsFields.h>
00075
00076 OSG_BEGIN_NAMESPACE
00077
00078 class DVRClipObjects;
00079 class BinaryDataHandler;
00080
00082
00083 class OSG_SYSTEMLIB_DLLMAPPING DVRClipObjectsBase : public Attachment
00084 {
00085 private:
00086
00087 typedef Attachment Inherited;
00088
00089
00090 public:
00091
00092 typedef DVRClipObjectsPtr Ptr;
00093
00094 enum
00095 {
00096 ClipObjectsFieldId = Inherited::NextFieldId,
00097 ClipModeFieldId = ClipObjectsFieldId + 1,
00098 DoContoursFieldId = ClipModeFieldId + 1,
00099 NextFieldId = DoContoursFieldId + 1
00100 };
00101
00102 static const OSG::BitVector ClipObjectsFieldMask;
00103 static const OSG::BitVector ClipModeFieldMask;
00104 static const OSG::BitVector DoContoursFieldMask;
00105
00106
00107 static const OSG::BitVector MTInfluenceMask;
00108
00109
00113 static FieldContainerType &getClassType (void);
00114 static UInt32 getClassTypeId (void);
00115
00117
00121 virtual FieldContainerType &getType (void);
00122 virtual const FieldContainerType &getType (void) const;
00123
00124 virtual UInt32 getContainerSize(void) const;
00125
00127
00131 SFInt32 *getSFClipMode (void);
00132 SFBool *getSFDoContours (void);
00133
00134 Int32 &getClipMode (void);
00135 const Int32 &getClipMode (void) const;
00136 bool &getDoContours (void);
00137 const bool &getDoContours (void) const;
00138
00140
00144 void setClipMode ( const Int32 &value );
00145 void setDoContours ( const bool &value );
00146
00148
00153
00157 virtual UInt32 getBinSize (const BitVector &whichField);
00158 virtual void copyToBin ( BinaryDataHandler &pMem,
00159 const BitVector &whichField);
00160 virtual void copyFromBin( BinaryDataHandler &pMem,
00161 const BitVector &whichField);
00162
00163
00165
00169 static DVRClipObjectsPtr create (void);
00170 static DVRClipObjectsPtr createEmpty (void);
00171
00174
00178 virtual FieldContainerPtr shallowCopy (void) const;
00179
00181
00182 protected:
00183
00184
00188 MFDVRClipGeometryPtr _mfClipObjects;
00189 SFInt32 _sfClipMode;
00190 SFBool _sfDoContours;
00191
00193
00197 DVRClipObjectsBase(void);
00198 DVRClipObjectsBase(const DVRClipObjectsBase &source);
00199
00201
00205 virtual ~DVRClipObjectsBase(void);
00206
00208
00212 MFDVRClipGeometryPtr *getMFClipObjects (void);
00213
00214 DVRClipGeometryPtr &getClipObjects (UInt32 index);
00215 MFDVRClipGeometryPtr &getClipObjects (void);
00216 const MFDVRClipGeometryPtr &getClipObjects (void) const;
00217
00219
00225
00229 #if !defined(OSG_FIXED_MFIELDSYNC)
00230 void executeSyncImpl( DVRClipObjectsBase *pOther,
00231 const BitVector &whichField);
00232
00233 virtual void executeSync( FieldContainer &other,
00234 const BitVector &whichField);
00235 #else
00236 void executeSyncImpl( DVRClipObjectsBase *pOther,
00237 const BitVector &whichField,
00238 const SyncInfo &sInfo );
00239
00240 virtual void executeSync( FieldContainer &other,
00241 const BitVector &whichField,
00242 const SyncInfo &sInfo);
00243
00244 virtual void execBeginEdit (const BitVector &whichField,
00245 UInt32 uiAspect,
00246 UInt32 uiContainerSize);
00247
00248 void execBeginEditImpl (const BitVector &whichField,
00249 UInt32 uiAspect,
00250 UInt32 uiContainerSize);
00251
00252 virtual void onDestroyAspect(UInt32 uiId, UInt32 uiAspect);
00253 #endif
00254
00256
00257 private:
00258
00259 friend class FieldContainer;
00260
00261 static FieldDescription *_desc[];
00262 static FieldContainerType _type;
00263
00264
00265
00266 void operator =(const DVRClipObjectsBase &source);
00267 };
00268
00269
00270
00271
00272
00273
00274 typedef DVRClipObjectsBase *DVRClipObjectsBaseP;
00275
00276 typedef osgIF<DVRClipObjectsBase::isNodeCore,
00277 CoredNodePtr<DVRClipObjects>,
00278 FieldContainer::attempt_to_create_CoredNodePtr_on_non_NodeCore_FC
00279 >::_IRet DVRClipObjectsNodePtr;
00280
00281 typedef RefPtr<DVRClipObjectsPtr> DVRClipObjectsRefPtr;
00282
00283 OSG_END_NAMESPACE
00284
00285 #define OSGDVRCLIPOBJECTSBASE_HEADER_CVSID "@(#)$Id: FCBaseTemplate_h.h,v 1.38 2005/07/08 06:37:35 vossg Exp $"
00286
00287 #endif