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 #ifndef _OSGDISPLAYFILTERFOREGROUND_H_ 00040 #define _OSGDISPLAYFILTERFOREGROUND_H_ 00041 #ifdef __sgi 00042 #pragma once 00043 #endif 00044 00045 #include <OSGConfig.h> 00046 00047 #include "OSGDisplayFilterForegroundBase.h" 00048 00049 #include <OSGViewport.h> 00050 #include <OSGViewport.h> 00051 #include <OSGTextureChunk.h> 00052 #include <OSGGeometry.h> 00053 #include <OSGChunkMaterial.h> 00054 #include <OSGComponentTransform.h> 00055 #include <OSGBackground.h> 00056 #include <OSGTextureTransformChunk.h> 00057 00058 OSG_BEGIN_NAMESPACE 00059 00064 class OSG_SYSTEMLIB_DLLMAPPING DisplayFilterForeground : public DisplayFilterForegroundBase 00065 { 00066 private: 00067 00068 typedef DisplayFilterForegroundBase Inherited; 00069 /*========================== PUBLIC =================================*/ 00070 public: 00071 00072 class OSG_SYSTEMLIB_DLLMAPPING DisplayFilterGroup { 00073 public: 00074 DisplayFilterGroup(bool readback,std::vector<ViewportPtr> &ports); 00075 virtual ~DisplayFilterGroup(); 00076 TextureChunkPtr getTexture (void); 00077 GeometryPtr getGeometry (void); 00078 ChunkMaterialPtr getMaterial (void); 00079 ComponentTransformPtr getTransform (void); 00080 TextureTransformChunkPtr getTextureTransform (void); 00081 void createGrid (UInt32 width,UInt32 height); 00082 protected: 00083 ViewportPtr _vp; 00084 NodePtr _root; 00085 TextureChunkPtr _texture; 00086 GeometryPtr _geometry; 00087 ChunkMaterialPtr _material; 00088 ComponentTransformPtr _transform; 00089 BackgroundPtr _background; 00090 TextureTransformChunkPtr _textureTransform; 00091 00092 }; 00093 00094 /*---------------------------------------------------------------------*/ 00098 virtual void changed(BitVector whichField, 00099 UInt32 origin ); 00100 00102 /*---------------------------------------------------------------------*/ 00106 virtual void dump( UInt32 uiIndent = 0, 00107 const BitVector bvFlags = 0) const; 00108 00110 /*---------------------------------------------------------------------*/ 00114 virtual void draw( DrawActionBase * action, Viewport * port ); 00115 00117 /*---------------------------------------------------------------------*/ 00121 DisplayFilterGroup *findReadbackGroup(const std::string &name); 00122 DisplayFilterGroup *findOverlayGroup (const std::string &name); 00123 00125 /*========================= PROTECTED ===============================*/ 00126 protected: 00127 00128 // Variables should all be in DisplayFilterForegroundBase. 00129 00130 /*---------------------------------------------------------------------*/ 00134 DisplayFilterForeground(void); 00135 DisplayFilterForeground(const DisplayFilterForeground &source); 00136 00138 /*---------------------------------------------------------------------*/ 00142 virtual ~DisplayFilterForeground(void); 00143 00145 /*---------------------------------------------------------------------*/ 00149 void clearGroups(); 00150 00153 /*========================== PRIVATE ================================*/ 00154 private: 00155 00156 std::vector<ViewportPtr> _port; 00157 std::map<std::string,DisplayFilterGroup*> _group; 00158 std::vector<UInt32> _changedState; 00159 bool _hasNonPowTwoTex; 00160 00161 friend class FieldContainer; 00162 friend class DisplayFilterForegroundBase; 00163 00164 static void initMethod(void); 00165 00166 // prohibit default functions (move to 'public' if you need one) 00167 00168 void operator =(const DisplayFilterForeground &source); 00169 }; 00170 00171 typedef DisplayFilterForeground *DisplayFilterForegroundP; 00172 00173 OSG_END_NAMESPACE 00174 00175 #include "OSGDisplayFilterForegroundBase.inl" 00176 #include "OSGDisplayFilterForeground.inl" 00177 00178 #define OSGDISPLAYFILTERFOREGROUND_HEADER_CVSID "@(#)$Id: FCTemplate_h.h,v 1.22 2004/08/03 05:53:03 dirk Exp $" 00179 00180 #endif /* _OSGDISPLAYFILTERFOREGROUND_H_ */
1.5.5