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 _OSGSIMPLEMATERIAL_H_ 00041 #define _OSGSIMPLEMATERIAL_H_ 00042 #ifdef __sgi 00043 #pragma once 00044 #endif 00045 00046 #include <OSGConfig.h> 00047 #include <OSGMaterialChunk.h> 00048 #include <OSGBlendChunk.h> 00049 #include <OSGSimpleMaterialBase.h> 00050 00051 OSG_BEGIN_NAMESPACE 00052 00057 class OSG_SYSTEMLIB_DLLMAPPING SimpleMaterial : public SimpleMaterialBase 00058 { 00059 /*========================== PUBLIC =================================*/ 00060 public: 00061 00062 /*---------------------------------------------------------------------*/ 00066 static const char *getClassname(void) { return "SimpleMaterial"; }; 00067 00069 /*---------------------------------------------------------------------*/ 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 StatePtr makeState (void); 00091 00092 virtual void rebuildState (void); 00093 00094 virtual bool isTransparent (void) const; 00095 00098 /*========================= PROTECTED ===============================*/ 00099 protected: 00100 00101 /*---------------------------------------------------------------------*/ 00105 SimpleMaterial(void); 00106 SimpleMaterial(const SimpleMaterial &source); 00107 00109 /*---------------------------------------------------------------------*/ 00113 virtual ~SimpleMaterial(void); 00114 00116 /*---------------------------------------------------------------------*/ 00120 void prepareLocalChunks(void); 00121 00123 /*========================== PRIVATE ================================*/ 00124 private: 00125 00126 typedef SimpleMaterialBase Inherited; 00127 00128 friend class FieldContainer; 00129 friend class SimpleMaterialBase; 00130 00131 static void initMethod( void ); 00132 00133 // these chunks are used for rendering the material 00134 00135 MaterialChunkPtr _materialChunk; 00136 BlendChunkPtr _blendChunk; 00137 00138 // prohibit default functions (move to 'public' if you need one) 00139 void operator =(const SimpleMaterial &source); 00140 }; 00141 00142 typedef SimpleMaterial *SimpleMaterialP; 00143 00144 OSG_END_NAMESPACE 00145 00146 #include <OSGSimpleMaterialBase.inl> 00147 #include <OSGSimpleMaterial.inl> 00148 00149 #define OSGSIMPLEMATERIAL_HEADER_CVSID "@(#)$Id: FCTemplate_h.h,v 1.15 2002/06/01 10:37:25 vossg Exp $" 00150 00151 #endif /* _OSGSIMPLEMATERIAL_H_ */
1.4.3