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 _OSGTEXTUREBACKGROUND_H_ 00040 #define _OSGTEXTUREBACKGROUND_H_ 00041 #ifdef __sgi 00042 #pragma once 00043 #endif 00044 00045 #include <OSGConfig.h> 00046 00047 #include <OSGTextureBackgroundBase.h> 00048 00049 OSG_BEGIN_NAMESPACE 00050 00055 class OSG_SYSTEMLIB_DLLMAPPING TextureBackground : public TextureBackgroundBase 00056 { 00057 private: 00058 00059 typedef TextureBackgroundBase Inherited; 00060 00061 /*========================== PUBLIC =================================*/ 00062 public: 00063 /*---------------------------------------------------------------------*/ 00067 virtual void clear( DrawActionBase * action, Viewport * port ); 00068 00069 /*---------------------------------------------------------------------*/ 00073 virtual void changed(BitVector whichField, 00074 UInt32 origin ); 00075 00077 /*---------------------------------------------------------------------*/ 00081 virtual void dump( UInt32 uiIndent = 0, 00082 const BitVector bvFlags = 0) const; 00083 00085 /*========================= PROTECTED ===============================*/ 00086 protected: 00087 00088 // Variables should all be in TextureBackgroundBase. 00089 00090 /*---------------------------------------------------------------------*/ 00094 TextureBackground(void); 00095 TextureBackground(const TextureBackground &source); 00096 00098 /*---------------------------------------------------------------------*/ 00102 virtual ~TextureBackground(void); 00103 00106 /*========================== PRIVATE ================================*/ 00107 private: 00108 std::vector<Vec2f> _textureCoordArray; 00109 std::vector<Vec2f> _vertexCoordArray; 00110 std::vector<UInt32> _indexArray; 00111 00112 // Values for which the grid has been calculated, 00113 // to check for update necessity 00114 UInt16 _hor, _vert; 00115 Real32 _radialDistortion; 00116 Vec2f _centerOfDistortion; 00117 00118 // Helper method 00119 00120 void updateGrid(void); 00121 00122 friend class FieldContainer; 00123 friend class TextureBackgroundBase; 00124 00125 static void initMethod(void); 00126 00127 // prohibit default functions (move to 'public' if you need one) 00128 00129 void operator =(const TextureBackground &source); 00130 }; 00131 00132 typedef TextureBackground *TextureBackgroundP; 00133 00134 OSG_END_NAMESPACE 00135 00136 #include <OSGTextureBackgroundBase.inl> 00137 #include <OSGTextureBackground.inl> 00138 00139 #define OSGTEXTUREBACKGROUND_HEADER_CVSID "@(#)$Id: OSGTextureBackground.h,v 1.2 2005/07/06 16:00:44 dirk Exp $" 00140 00141 #endif /* _OSGTEXTUREBACKGROUND_H_ */
1.5.5