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 #ifndef _OSGBLENDCHUNK_H_ 00041 #define _OSGBLENDCHUNK_H_ 00042 #ifdef __sgi 00043 #pragma once 00044 #endif 00045 00046 #include <OSGConfig.h> 00047 #include <OSGBlendChunkBase.h> 00048 00049 OSG_BEGIN_NAMESPACE 00050 00055 class OSG_SYSTEMLIB_DLLMAPPING BlendChunk : public BlendChunkBase 00056 { 00057 /*========================== PUBLIC =================================*/ 00058 public: 00059 00060 /*---------------------------------------------------------------------*/ 00064 virtual const StateChunkClass * getClass (void) const; 00065 00067 /*---------------------------------------------------------------------*/ 00071 inline static UInt32 getStaticClassId (void); 00072 inline static const StateChunkClass * getStaticClass (void); 00073 00075 /*---------------------------------------------------------------------*/ 00079 virtual void changed(BitVector whichField, 00080 UInt32 origin ); 00081 00083 /*---------------------------------------------------------------------*/ 00087 virtual void dump( UInt32 uiIndent = 0, 00088 const BitVector bvFlags = 0) const; 00089 00091 /*---------------------------------------------------------------------*/ 00095 virtual void activate ( DrawActionBase * action, UInt32 index = 0 ); 00096 00097 virtual void changeFrom ( DrawActionBase * action, StateChunk * old, 00098 UInt32 index = 0 ); 00099 00100 virtual void deactivate ( DrawActionBase * action, UInt32 index = 0 ); 00101 00102 virtual bool isTransparent (void) const; 00103 00105 /*---------------------------------------------------------------------*/ 00109 virtual Real32 switchCost ( StateChunk * chunk ); 00110 00111 virtual bool operator < (const StateChunk &other) const; 00112 00113 virtual bool operator == (const StateChunk &other) const; 00114 virtual bool operator != (const StateChunk &other) const; 00115 00118 /*========================= PROTECTED ===============================*/ 00119 protected: 00120 00121 /*---------------------------------------------------------------------*/ 00125 BlendChunk(void); 00126 BlendChunk(const BlendChunk &source); 00127 00129 /*---------------------------------------------------------------------*/ 00133 virtual ~BlendChunk(void); 00134 00137 /*========================== PRIVATE ================================*/ 00138 private: 00139 00140 typedef BlendChunkBase Inherited; 00141 00142 friend class FieldContainer; 00143 friend class BlendChunkBase; 00144 00145 static StateChunkClass _class; 00146 00147 /*---------------------------------------------------------------------*/ 00151 static UInt32 _extBlend; 00152 static UInt32 _extImaging; 00153 static UInt32 _extBlendSubtract; 00154 static UInt32 _extBlendMinMax; 00155 static UInt32 _extBlendLogicOp; 00156 static UInt32 _extBlendFuncSeparate; 00157 static UInt32 _funcBlendColor; 00158 static UInt32 _funcBlendEquation; 00159 static UInt32 _funcBlendEquationExt; 00160 static UInt32 _funcBlendFuncSeparateExt; 00161 00164 static void initMethod(void); 00165 00166 // prohibit default functions (move to 'public' if you need one) 00167 void operator =(const BlendChunk &source); 00168 }; 00169 00170 typedef BlendChunk *BlendChunkP; 00171 00172 OSG_END_NAMESPACE 00173 00174 #include <OSGBlendChunkBase.inl> 00175 #include <OSGBlendChunk.inl> 00176 00177 #define OSGBLENDCHUNK_HEADER_CVSID "@(#)$Id: FCTemplate_h.h,v 1.15 2002/06/01 10:37:25 vossg Exp $" 00178 00179 #endif /* _OSGBLENDCHUNK_H_ */
1.5.5