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 _OSGSHLPARAMETERCHUNK_H_ 00040 #define _OSGSHLPARAMETERCHUNK_H_ 00041 #ifdef __sgi 00042 #pragma once 00043 #endif 00044 00045 #include <OSGConfig.h> 00046 #include <OSGDrawActionBase.h> 00047 #include <OSGWindow.h> 00048 00049 #include "OSGSHLChunk.h" 00050 00051 #include "OSGSHLParameterChunkBase.h" 00052 00053 OSG_BEGIN_NAMESPACE 00054 00059 class OSG_SYSTEMLIB_DLLMAPPING SHLParameterChunk : public SHLParameterChunkBase 00060 { 00061 private: 00062 00063 typedef SHLParameterChunkBase Inherited; 00064 00065 /*========================== PUBLIC =================================*/ 00066 public: 00067 00068 virtual const StateChunkClass * getClass (void) const; 00069 00070 /*---------------------------------------------------------------------*/ 00074 virtual void changed(BitVector whichField, 00075 UInt32 origin ); 00076 00078 /*---------------------------------------------------------------------*/ 00082 virtual void dump( UInt32 uiIndent = 0, 00083 const BitVector bvFlags = 0) const; 00084 00086 /*---------------------------------------------------------------------*/ 00090 virtual void activate ( DrawActionBase * action, UInt32 index = 0 ); 00091 00092 virtual void changeFrom ( DrawActionBase * action, StateChunk * old, 00093 UInt32 index = 0 ); 00094 00095 virtual void deactivate ( DrawActionBase * action, UInt32 index = 0 ); 00096 00098 /*---------------------------------------------------------------------*/ 00102 virtual Real32 switchCost ( StateChunk * chunk ); 00103 00104 virtual bool operator < (const StateChunk &other) const; 00105 00106 virtual bool operator == (const StateChunk &other) const; 00107 virtual bool operator != (const StateChunk &other) const; 00108 00110 /*========================= PROTECTED ===============================*/ 00111 protected: 00112 00113 // Variables should all be in SHLParameterChunkBase. 00114 00115 /*---------------------------------------------------------------------*/ 00119 SHLParameterChunk(void); 00120 SHLParameterChunk(const SHLParameterChunk &source); 00121 00123 /*---------------------------------------------------------------------*/ 00127 virtual ~SHLParameterChunk(void); 00128 00131 /*========================== PRIVATE ================================*/ 00132 private: 00133 00134 friend class FieldContainer; 00135 friend class SHLParameterChunkBase; 00136 00137 // class. Used for indexing in State 00138 static StateChunkClass _class; 00139 00140 /*---------------------------------------------------------------------*/ 00144 static UInt32 _shl_extension; 00145 00148 static void initMethod(void); 00149 00150 // prohibit default functions (move to 'public' if you need one) 00151 void operator =(const SHLParameterChunk &source); 00152 00153 void updateProgram(Window *win); 00154 void updateParameters(Window *win); 00155 }; 00156 00157 typedef SHLParameterChunk *SHLParameterChunkP; 00158 00159 OSG_END_NAMESPACE 00160 00161 #include <OSGSHLParameterChunkBase.inl> 00162 #include <OSGSHLParameterChunk.inl> 00163 00164 #define OSGSHLPARAMETERCHUNK_HEADER_CVSID "@(#)$Id: OSGSHLParameterChunk.h,v 1.2 2004/08/27 12:50:51 a-m-z Exp $" 00165 00166 #endif /* _OSGSHLPARAMETERCHUNK_H_ */
1.5.5