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

OSGColorBufferViewportBase.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 ColorBufferViewport
00049  **                                                                         **
00050  *****************************************************************************
00051 \*****************************************************************************/
00052 
00053 
00054 #ifndef _OSGCOLORBUFFERVIEWPORTBASE_H_
00055 #define _OSGCOLORBUFFERVIEWPORTBASE_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 <OSGViewport.h> // Parent
00069 
00070 #include <OSGBoolFields.h> // Red type
00071 #include <OSGBoolFields.h> // Blue type
00072 #include <OSGBoolFields.h> // Green type
00073 #include <OSGBoolFields.h> // Alpha type
00074 
00075 #include <OSGColorBufferViewportFields.h>
00076 
00077 OSG_BEGIN_NAMESPACE
00078 
00079 class ColorBufferViewport;
00080 class BinaryDataHandler;
00081 
00083 
00084 class OSG_SYSTEMLIB_DLLMAPPING ColorBufferViewportBase : public Viewport
00085 {
00086   private:
00087 
00088     typedef Viewport    Inherited;
00089 
00090     /*==========================  PUBLIC  =================================*/
00091   public:
00092 
00093     typedef ColorBufferViewportPtr  Ptr;
00094 
00095     enum
00096     {
00097         RedFieldId   = Inherited::NextFieldId,
00098         BlueFieldId  = RedFieldId   + 1,
00099         GreenFieldId = BlueFieldId  + 1,
00100         AlphaFieldId = GreenFieldId + 1,
00101         NextFieldId  = AlphaFieldId + 1
00102     };
00103 
00104     static const OSG::BitVector RedFieldMask;
00105     static const OSG::BitVector BlueFieldMask;
00106     static const OSG::BitVector GreenFieldMask;
00107     static const OSG::BitVector AlphaFieldMask;
00108 
00109 
00110     static const OSG::BitVector MTInfluenceMask;
00111 
00112     /*---------------------------------------------------------------------*/
00116     static        FieldContainerType &getClassType    (void); 
00117     static        UInt32              getClassTypeId  (void); 
00118 
00120     /*---------------------------------------------------------------------*/
00124     virtual       FieldContainerType &getType  (void); 
00125     virtual const FieldContainerType &getType  (void) const; 
00126 
00127     virtual       UInt32              getContainerSize(void) const;
00128 
00130     /*---------------------------------------------------------------------*/
00134            SFBool              *getSFRed            (void);
00135            SFBool              *getSFBlue           (void);
00136            SFBool              *getSFGreen          (void);
00137            SFBool              *getSFAlpha          (void);
00138 
00139            bool                &getRed            (void);
00140      const bool                &getRed            (void) const;
00141            bool                &getBlue           (void);
00142      const bool                &getBlue           (void) const;
00143            bool                &getGreen          (void);
00144      const bool                &getGreen          (void) const;
00145            bool                &getAlpha          (void);
00146      const bool                &getAlpha          (void) const;
00147 
00149     /*---------------------------------------------------------------------*/
00153      void setRed            ( const bool &value );
00154      void setBlue           ( const bool &value );
00155      void setGreen          ( const bool &value );
00156      void setAlpha          ( const bool &value );
00157 
00159     /*---------------------------------------------------------------------*/
00164     /*---------------------------------------------------------------------*/
00168     virtual UInt32 getBinSize (const BitVector         &whichField);
00169     virtual void   copyToBin  (      BinaryDataHandler &pMem,
00170                                const BitVector         &whichField);
00171     virtual void   copyFromBin(      BinaryDataHandler &pMem,
00172                                const BitVector         &whichField);
00173 
00174 
00176     /*---------------------------------------------------------------------*/
00180     static  ColorBufferViewportPtr      create          (void); 
00181     static  ColorBufferViewportPtr      createEmpty     (void); 
00182 
00185     /*---------------------------------------------------------------------*/
00189     virtual FieldContainerPtr     shallowCopy     (void) const; 
00190 
00192     /*=========================  PROTECTED  ===============================*/
00193   protected:
00194 
00195     /*---------------------------------------------------------------------*/
00199     SFBool              _sfRed;
00200     SFBool              _sfBlue;
00201     SFBool              _sfGreen;
00202     SFBool              _sfAlpha;
00203 
00205     /*---------------------------------------------------------------------*/
00209     ColorBufferViewportBase(void);
00210     ColorBufferViewportBase(const ColorBufferViewportBase &source);
00211 
00213     /*---------------------------------------------------------------------*/
00217     virtual ~ColorBufferViewportBase(void); 
00218 
00220     /*---------------------------------------------------------------------*/
00224 #if !defined(OSG_FIXED_MFIELDSYNC)
00225     void executeSyncImpl(      ColorBufferViewportBase *pOther,
00226                          const BitVector         &whichField);
00227 
00228     virtual void   executeSync(      FieldContainer    &other,
00229                                const BitVector         &whichField);
00230 #else
00231     void executeSyncImpl(      ColorBufferViewportBase *pOther,
00232                          const BitVector         &whichField,
00233                          const SyncInfo          &sInfo     );
00234 
00235     virtual void   executeSync(      FieldContainer    &other,
00236                                const BitVector         &whichField,
00237                                const SyncInfo          &sInfo);
00238 
00239     virtual void execBeginEdit     (const BitVector &whichField,
00240                                           UInt32     uiAspect,
00241                                           UInt32     uiContainerSize);
00242 
00243             void execBeginEditImpl (const BitVector &whichField,
00244                                           UInt32     uiAspect,
00245                                           UInt32     uiContainerSize);
00246 
00247     virtual void onDestroyAspect(UInt32 uiId, UInt32 uiAspect);
00248 #endif
00249 
00251     /*==========================  PRIVATE  ================================*/
00252   private:
00253 
00254     friend class FieldContainer;
00255 
00256     static FieldDescription   *_desc[];
00257     static FieldContainerType  _type;
00258 
00259 
00260     // prohibit default functions (move to 'public' if you need one)
00261     void operator =(const ColorBufferViewportBase &source);
00262 };
00263 
00264 //---------------------------------------------------------------------------
00265 //   Exported Types
00266 //---------------------------------------------------------------------------
00267 
00268 
00269 typedef ColorBufferViewportBase *ColorBufferViewportBaseP;
00270 
00271 typedef osgIF<ColorBufferViewportBase::isNodeCore,
00272               CoredNodePtr<ColorBufferViewport>,
00273               FieldContainer::attempt_to_create_CoredNodePtr_on_non_NodeCore_FC
00274               >::_IRet ColorBufferViewportNodePtr;
00275 
00276 typedef RefPtr<ColorBufferViewportPtr> ColorBufferViewportRefPtr;
00277 
00278 OSG_END_NAMESPACE
00279 
00280 #define OSGCOLORBUFFERVIEWPORTBASE_HEADER_CVSID "@(#)$Id: FCBaseTemplate_h.h,v 1.38 2005/07/08 06:37:35 vossg Exp $"
00281 
00282 #endif /* _OSGCOLORBUFFERVIEWPORTBASE_H_ */

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