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

OSGViewportBase.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 Viewport
00049  **                                                                         **
00050  *****************************************************************************
00051 \*****************************************************************************/
00052 
00053 
00054 #ifndef _OSGVIEWPORTBASE_H_
00055 #define _OSGVIEWPORTBASE_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 <OSGReal32Fields.h> // Left type
00071 #include <OSGReal32Fields.h> // Right type
00072 #include <OSGReal32Fields.h> // Bottom type
00073 #include <OSGReal32Fields.h> // Top type
00074 #include <OSGWindowFields.h> // Parent type
00075 #include <OSGCameraFields.h> // Camera type
00076 #include <OSGNodeFields.h> // Root type
00077 #include <OSGBackgroundFields.h> // Background type
00078 #include <OSGForegroundFields.h> // Foregrounds type
00079 #include <OSGUInt32Fields.h> // TravMask type
00080 #include <OSGReal32Fields.h> // DrawTime type
00081 
00082 #include <OSGViewportFields.h>
00083 
00084 OSG_BEGIN_NAMESPACE
00085 
00086 class Viewport;
00087 class BinaryDataHandler;
00088 
00090 
00091 class OSG_SYSTEMLIB_DLLMAPPING ViewportBase : public AttachmentContainer
00092 {
00093   private:
00094 
00095     typedef AttachmentContainer    Inherited;
00096 
00097     /*==========================  PUBLIC  =================================*/
00098   public:
00099 
00100     typedef ViewportPtr  Ptr;
00101 
00102     enum
00103     {
00104         LeftFieldId        = Inherited::NextFieldId,
00105         RightFieldId       = LeftFieldId        + 1,
00106         BottomFieldId      = RightFieldId       + 1,
00107         TopFieldId         = BottomFieldId      + 1,
00108         ParentFieldId      = TopFieldId         + 1,
00109         CameraFieldId      = ParentFieldId      + 1,
00110         RootFieldId        = CameraFieldId      + 1,
00111         BackgroundFieldId  = RootFieldId        + 1,
00112         ForegroundsFieldId = BackgroundFieldId  + 1,
00113         TravMaskFieldId    = ForegroundsFieldId + 1,
00114         DrawTimeFieldId    = TravMaskFieldId    + 1,
00115         NextFieldId        = DrawTimeFieldId    + 1
00116     };
00117 
00118     static const OSG::BitVector LeftFieldMask;
00119     static const OSG::BitVector RightFieldMask;
00120     static const OSG::BitVector BottomFieldMask;
00121     static const OSG::BitVector TopFieldMask;
00122     static const OSG::BitVector ParentFieldMask;
00123     static const OSG::BitVector CameraFieldMask;
00124     static const OSG::BitVector RootFieldMask;
00125     static const OSG::BitVector BackgroundFieldMask;
00126     static const OSG::BitVector ForegroundsFieldMask;
00127     static const OSG::BitVector TravMaskFieldMask;
00128     static const OSG::BitVector DrawTimeFieldMask;
00129 
00130 
00131     static const OSG::BitVector MTInfluenceMask;
00132 
00133     /*---------------------------------------------------------------------*/
00137     static        FieldContainerType &getClassType    (void); 
00138     static        UInt32              getClassTypeId  (void); 
00139 
00141     /*---------------------------------------------------------------------*/
00145     virtual       FieldContainerType &getType  (void); 
00146     virtual const FieldContainerType &getType  (void) const; 
00147 
00148     virtual       UInt32              getContainerSize(void) const;
00149 
00151     /*---------------------------------------------------------------------*/
00155            SFReal32            *getSFLeft           (void);
00156            SFReal32            *getSFRight          (void);
00157            SFReal32            *getSFBottom         (void);
00158            SFReal32            *getSFTop            (void);
00159            SFWindowPtr         *getSFParent         (void);
00160            SFCameraPtr         *getSFCamera         (void);
00161            SFNodePtr           *getSFRoot           (void);
00162            SFBackgroundPtr     *getSFBackground     (void);
00163            MFForegroundPtr     *getMFForegrounds    (void);
00164            SFUInt32            *getSFTravMask       (void);
00165            SFReal32            *getSFDrawTime       (void);
00166 
00167            Real32              &getLeft           (void);
00168      const Real32              &getLeft           (void) const;
00169            Real32              &getRight          (void);
00170      const Real32              &getRight          (void) const;
00171            Real32              &getBottom         (void);
00172      const Real32              &getBottom         (void) const;
00173            Real32              &getTop            (void);
00174      const Real32              &getTop            (void) const;
00175            WindowPtr           &getParent         (void);
00176      const WindowPtr           &getParent         (void) const;
00177            CameraPtr           &getCamera         (void);
00178      const CameraPtr           &getCamera         (void) const;
00179            NodePtr             &getRoot           (void);
00180      const NodePtr             &getRoot           (void) const;
00181            BackgroundPtr       &getBackground     (void);
00182      const BackgroundPtr       &getBackground     (void) const;
00183            UInt32              &getTravMask       (void);
00184      const UInt32              &getTravMask       (void) const;
00185            Real32              &getDrawTime       (void);
00186      const Real32              &getDrawTime       (void) const;
00187            ForegroundPtr       &getForegrounds    (const UInt32 index);
00188            MFForegroundPtr     &getForegrounds    (void);
00189      const MFForegroundPtr     &getForegrounds    (void) const;
00190 
00192     /*---------------------------------------------------------------------*/
00196      void setLeft           ( const Real32 &value );
00197      void setRight          ( const Real32 &value );
00198      void setBottom         ( const Real32 &value );
00199      void setTop            ( const Real32 &value );
00200      void setParent         ( const WindowPtr &value );
00201      void setCamera         ( const CameraPtr &value );
00202      void setRoot           ( const NodePtr &value );
00203      void setBackground     ( const BackgroundPtr &value );
00204      void setTravMask       ( const UInt32 &value );
00205      void setDrawTime       ( const Real32 &value );
00206 
00208     /*---------------------------------------------------------------------*/
00213     /*---------------------------------------------------------------------*/
00217     virtual UInt32 getBinSize (const BitVector         &whichField);
00218     virtual void   copyToBin  (      BinaryDataHandler &pMem,
00219                                const BitVector         &whichField);
00220     virtual void   copyFromBin(      BinaryDataHandler &pMem,
00221                                const BitVector         &whichField);
00222 
00223 
00225     /*---------------------------------------------------------------------*/
00229     static  ViewportPtr      create          (void); 
00230     static  ViewportPtr      createEmpty     (void); 
00231 
00234     /*---------------------------------------------------------------------*/
00238     virtual FieldContainerPtr     shallowCopy     (void) const; 
00239 
00241     /*=========================  PROTECTED  ===============================*/
00242   protected:
00243 
00244     /*---------------------------------------------------------------------*/
00248     SFReal32            _sfLeft;
00249     SFReal32            _sfRight;
00250     SFReal32            _sfBottom;
00251     SFReal32            _sfTop;
00252     SFWindowPtr         _sfParent;
00253     SFCameraPtr         _sfCamera;
00254     SFNodePtr           _sfRoot;
00255     SFBackgroundPtr     _sfBackground;
00256     MFForegroundPtr     _mfForegrounds;
00257     SFUInt32            _sfTravMask;
00258     SFReal32            _sfDrawTime;
00259 
00261     /*---------------------------------------------------------------------*/
00265     ViewportBase(void);
00266     ViewportBase(const ViewportBase &source);
00267 
00269     /*---------------------------------------------------------------------*/
00273     virtual ~ViewportBase(void); 
00274 
00276     /*---------------------------------------------------------------------*/
00280 #if !defined(OSG_FIXED_MFIELDSYNC)
00281     void executeSyncImpl(      ViewportBase *pOther,
00282                          const BitVector         &whichField);
00283 
00284     virtual void   executeSync(      FieldContainer    &other,
00285                                const BitVector         &whichField);
00286 #else
00287     void executeSyncImpl(      ViewportBase *pOther,
00288                          const BitVector         &whichField,
00289                          const SyncInfo          &sInfo     );
00290 
00291     virtual void   executeSync(      FieldContainer    &other,
00292                                const BitVector         &whichField,
00293                                const SyncInfo          &sInfo);
00294 
00295     virtual void execBeginEdit     (const BitVector &whichField,
00296                                           UInt32     uiAspect,
00297                                           UInt32     uiContainerSize);
00298 
00299             void execBeginEditImpl (const BitVector &whichField,
00300                                           UInt32     uiAspect,
00301                                           UInt32     uiContainerSize);
00302 
00303     virtual void onDestroyAspect(UInt32 uiId, UInt32 uiAspect);
00304 #endif
00305 
00307     /*==========================  PRIVATE  ================================*/
00308   private:
00309 
00310     friend class FieldContainer;
00311 
00312     static FieldDescription   *_desc[];
00313     static FieldContainerType  _type;
00314 
00315 
00316     // prohibit default functions (move to 'public' if you need one)
00317     void operator =(const ViewportBase &source);
00318 };
00319 
00320 //---------------------------------------------------------------------------
00321 //   Exported Types
00322 //---------------------------------------------------------------------------
00323 
00324 
00325 typedef ViewportBase *ViewportBaseP;
00326 
00327 typedef osgIF<ViewportBase::isNodeCore,
00328               CoredNodePtr<Viewport>,
00329               FieldContainer::attempt_to_create_CoredNodePtr_on_non_NodeCore_FC
00330               >::_IRet ViewportNodePtr;
00331 
00332 typedef RefPtr<ViewportPtr> ViewportRefPtr;
00333 
00334 OSG_END_NAMESPACE
00335 
00336 #define OSGVIEWPORTBASE_HEADER_CVSID "@(#)$Id: FCBaseTemplate_h.h,v 1.38 2005/07/08 06:37:35 vossg Exp $"
00337 
00338 #endif /* _OSGVIEWPORTBASE_H_ */

Generated on Thu Aug 25 04:12:05 2005 for OpenSG by  doxygen 1.4.3