Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OSGDisplayCalibrationBase.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002  *                                OpenSG                                     *
00003  *                                                                           *
00004  *                                                                           *
00005  *               Copyright (C) 2000-2002 by the OpenSG Forum                 *
00006  *                                                                           *
00007  *                            www.opensg.org                                 *
00008  *                                                                           *
00009  *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          *
00010  *                                                                           *
00011 \*---------------------------------------------------------------------------*/
00012 /*---------------------------------------------------------------------------*\
00013  *                                License                                    *
00014  *                                                                           *
00015  * This library is free software; you can redistribute it and/or modify it   *
00016  * under the terms of the GNU Library General Public License as published    *
00017  * by the Free Software Foundation, version 2.                               *
00018  *                                                                           *
00019  * This library is distributed in the hope that it will be useful, but       *
00020  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00022  * Library General Public License for more details.                          *
00023  *                                                                           *
00024  * You should have received a copy of the GNU Library General Public         *
00025  * License along with this library; if not, write to the Free Software       *
00026  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
00027  *                                                                           *
00028 \*---------------------------------------------------------------------------*/
00029 /*---------------------------------------------------------------------------*\
00030  *                                Changes                                    *
00031  *                                                                           *
00032  *                                                                           *
00033  *                                                                           *
00034  *                                                                           *
00035  *                                                                           *
00036  *                                                                           *
00037 \*---------------------------------------------------------------------------*/
00038 
00039 /*****************************************************************************\
00040  *****************************************************************************
00041  **                                                                         **
00042  **                  This file is automatically generated.                  **
00043  **                                                                         **
00044  **          Any changes made to this file WILL be lost when it is          **
00045  **           regenerated, which can become necessary at any time.          **
00046  **                                                                         **
00047  **     Do not change this file, changes should be done in the derived      **
00048  **     class DisplayCalibration
00049  **                                                                         **
00050  *****************************************************************************
00051 \*****************************************************************************/
00052 
00053 
00054 #ifndef _OSGDISPLAYCALIBRATIONBASE_H_
00055 #define _OSGDISPLAYCALIBRATIONBASE_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 <OSGAttachmentContainer.h> // Parent
00069 
00070 #include <OSGBoolFields.h> // Enabled type
00071 #include <OSGStringFields.h> // Server type
00072 #include <OSGMatrixFields.h> // ColorMatrix type
00073 #include <OSGReal32Fields.h> // Gamma type
00074 #include <OSGColor3fFields.h> // GammaRamp type
00075 #include <OSGUInt32Fields.h> // GridWidth type
00076 #include <OSGUInt32Fields.h> // GridHeight type
00077 #include <OSGVec2fFields.h> // Grid type
00078 #include <OSGReal32Fields.h> // ScaleDown type
00079 
00080 #include <OSGDisplayCalibrationFields.h>
00081 
00082 OSG_BEGIN_NAMESPACE
00083 
00084 class DisplayCalibration;
00085 class BinaryDataHandler;
00086 
00088 
00089 class OSG_SYSTEMLIB_DLLMAPPING DisplayCalibrationBase : public AttachmentContainer
00090 {
00091   private:
00092 
00093     typedef AttachmentContainer    Inherited;
00094 
00095     /*==========================  PUBLIC  =================================*/
00096   public:
00097 
00098     typedef DisplayCalibrationPtr  Ptr;
00099 
00100     enum
00101     {
00102         EnabledFieldId     = Inherited::NextFieldId,
00103         ServerFieldId      = EnabledFieldId     + 1,
00104         ColorMatrixFieldId = ServerFieldId      + 1,
00105         GammaFieldId       = ColorMatrixFieldId + 1,
00106         GammaRampFieldId   = GammaFieldId       + 1,
00107         GridWidthFieldId   = GammaRampFieldId   + 1,
00108         GridHeightFieldId  = GridWidthFieldId   + 1,
00109         GridFieldId        = GridHeightFieldId  + 1,
00110         ScaleDownFieldId   = GridFieldId        + 1,
00111         NextFieldId        = ScaleDownFieldId   + 1
00112     };
00113 
00114     static const OSG::BitVector EnabledFieldMask;
00115     static const OSG::BitVector ServerFieldMask;
00116     static const OSG::BitVector ColorMatrixFieldMask;
00117     static const OSG::BitVector GammaFieldMask;
00118     static const OSG::BitVector GammaRampFieldMask;
00119     static const OSG::BitVector GridWidthFieldMask;
00120     static const OSG::BitVector GridHeightFieldMask;
00121     static const OSG::BitVector GridFieldMask;
00122     static const OSG::BitVector ScaleDownFieldMask;
00123 
00124 
00125     static const OSG::BitVector MTInfluenceMask;
00126 
00127     /*---------------------------------------------------------------------*/
00131     static        FieldContainerType &getClassType    (void); 
00132     static        UInt32              getClassTypeId  (void); 
00133 
00135     /*---------------------------------------------------------------------*/
00139     virtual       FieldContainerType &getType  (void); 
00140     virtual const FieldContainerType &getType  (void) const; 
00141 
00142     virtual       UInt32              getContainerSize(void) const;
00143 
00145     /*---------------------------------------------------------------------*/
00149            SFBool              *getSFEnabled        (void);
00150            SFString            *getSFServer         (void);
00151            SFMatrix            *getSFColorMatrix    (void);
00152            SFReal32            *getSFGamma          (void);
00153            MFColor3f           *getMFGammaRamp      (void);
00154            SFUInt32            *getSFGridWidth      (void);
00155            SFUInt32            *getSFGridHeight     (void);
00156            MFVec2f             *getMFGrid           (void);
00157            SFReal32            *getSFScaleDown      (void);
00158 
00159            bool                &getEnabled        (void);
00160      const bool                &getEnabled        (void) const;
00161            std::string         &getServer         (void);
00162      const std::string         &getServer         (void) const;
00163            Matrix              &getColorMatrix    (void);
00164      const Matrix              &getColorMatrix    (void) const;
00165            Real32              &getGamma          (void);
00166      const Real32              &getGamma          (void) const;
00167            UInt32              &getGridWidth      (void);
00168      const UInt32              &getGridWidth      (void) const;
00169            UInt32              &getGridHeight     (void);
00170      const UInt32              &getGridHeight     (void) const;
00171            Real32              &getScaleDown      (void);
00172      const Real32              &getScaleDown      (void) const;
00173            Color3f             &getGammaRamp      (const UInt32 index);
00174            MFColor3f           &getGammaRamp      (void);
00175      const MFColor3f           &getGammaRamp      (void) const;
00176            Vec2f               &getGrid           (const UInt32 index);
00177            MFVec2f             &getGrid           (void);
00178      const MFVec2f             &getGrid           (void) const;
00179 
00181     /*---------------------------------------------------------------------*/
00185      void setEnabled        ( const bool &value );
00186      void setServer         ( const std::string &value );
00187      void setColorMatrix    ( const Matrix &value );
00188      void setGamma          ( const Real32 &value );
00189      void setGridWidth      ( const UInt32 &value );
00190      void setGridHeight     ( const UInt32 &value );
00191      void setScaleDown      ( const Real32 &value );
00192 
00194     /*---------------------------------------------------------------------*/
00199     /*---------------------------------------------------------------------*/
00203     virtual UInt32 getBinSize (const BitVector         &whichField);
00204     virtual void   copyToBin  (      BinaryDataHandler &pMem,
00205                                const BitVector         &whichField);
00206     virtual void   copyFromBin(      BinaryDataHandler &pMem,
00207                                const BitVector         &whichField);
00208 
00209 
00211     /*---------------------------------------------------------------------*/
00215     static  DisplayCalibrationPtr      create          (void); 
00216     static  DisplayCalibrationPtr      createEmpty     (void); 
00217 
00220     /*---------------------------------------------------------------------*/
00224     virtual FieldContainerPtr     shallowCopy     (void) const; 
00225 
00227     /*=========================  PROTECTED  ===============================*/
00228   protected:
00229 
00230     /*---------------------------------------------------------------------*/
00234     SFBool              _sfEnabled;
00235     SFString            _sfServer;
00236     SFMatrix            _sfColorMatrix;
00237     SFReal32            _sfGamma;
00238     MFColor3f           _mfGammaRamp;
00239     SFUInt32            _sfGridWidth;
00240     SFUInt32            _sfGridHeight;
00241     MFVec2f             _mfGrid;
00242     SFReal32            _sfScaleDown;
00243 
00245     /*---------------------------------------------------------------------*/
00249     DisplayCalibrationBase(void);
00250     DisplayCalibrationBase(const DisplayCalibrationBase &source);
00251 
00253     /*---------------------------------------------------------------------*/
00257     virtual ~DisplayCalibrationBase(void); 
00258 
00260     /*---------------------------------------------------------------------*/
00264 #if !defined(OSG_FIXED_MFIELDSYNC)
00265     void executeSyncImpl(      DisplayCalibrationBase *pOther,
00266                          const BitVector         &whichField);
00267 
00268     virtual void   executeSync(      FieldContainer    &other,
00269                                const BitVector         &whichField);
00270 #else
00271     void executeSyncImpl(      DisplayCalibrationBase *pOther,
00272                          const BitVector         &whichField,
00273                          const SyncInfo          &sInfo     );
00274 
00275     virtual void   executeSync(      FieldContainer    &other,
00276                                const BitVector         &whichField,
00277                                const SyncInfo          &sInfo);
00278 
00279     virtual void execBeginEdit     (const BitVector &whichField,
00280                                           UInt32     uiAspect,
00281                                           UInt32     uiContainerSize);
00282 
00283             void execBeginEditImpl (const BitVector &whichField,
00284                                           UInt32     uiAspect,
00285                                           UInt32     uiContainerSize);
00286 
00287     virtual void onDestroyAspect(UInt32 uiId, UInt32 uiAspect);
00288 #endif
00289 
00291     /*==========================  PRIVATE  ================================*/
00292   private:
00293 
00294     friend class FieldContainer;
00295 
00296     static FieldDescription   *_desc[];
00297     static FieldContainerType  _type;
00298 
00299 
00300     // prohibit default functions (move to 'public' if you need one)
00301     void operator =(const DisplayCalibrationBase &source);
00302 };
00303 
00304 //---------------------------------------------------------------------------
00305 //   Exported Types
00306 //---------------------------------------------------------------------------
00307 
00308 
00309 typedef DisplayCalibrationBase *DisplayCalibrationBaseP;
00310 
00311 typedef osgIF<DisplayCalibrationBase::isNodeCore,
00312               CoredNodePtr<DisplayCalibration>,
00313               FieldContainer::attempt_to_create_CoredNodePtr_on_non_NodeCore_FC
00314               >::_IRet DisplayCalibrationNodePtr;
00315 
00316 typedef RefPtr<DisplayCalibrationPtr> DisplayCalibrationRefPtr;
00317 
00318 OSG_END_NAMESPACE
00319 
00320 #define OSGDISPLAYCALIBRATIONBASE_HEADER_CVSID "@(#)$Id: FCBaseTemplate_h.h,v 1.38 2005/07/08 06:37:35 vossg Exp $"
00321 
00322 #endif /* _OSGDISPLAYCALIBRATIONBASE_H_ */

Generated on Thu Aug 25 04:02:56 2005 for OpenSG by  doxygen 1.4.3