1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGSIMPLEMATERIAL_H_
40 #define _OSGSIMPLEMATERIAL_H_
45 #include "OSGConfig.h"
46 #include "OSGMaterialChunk.h"
47 #include "OSGBlendChunk.h"
48 #include "OSGSimpleMaterialBase.h"
52 /*! \brief Simple Material wrapping standard OpenGL lighting. See \ref
53 PageSystemMaterialSimpleMaterial for a description.
55 \ingroup GrpSystemMaterialBase
56 \ingroup GrpLibOSGSystem
60 class OSG_SYSTEM_DLLMAPPING SimpleMaterial
: public SimpleMaterialBase
62 /*========================== PUBLIC =================================*/
66 /*---------------------------------------------------------------------*/
71 virtual void changed(ConstFieldMaskArg whichField
,
76 /*---------------------------------------------------------------------*/
80 virtual void dump( UInt32 uiIndent
= 0,
81 const BitVector bvFlags
= 0) const;
84 /*---------------------------------------------------------------------*/
85 /*! \name Rendering */
88 virtual void rebuildState (void);
90 virtual bool isTransparent(void) const;
93 /*---------------------------------------------------------------------*/
94 /*! \name Rendering */
97 virtual void fill(ChunkBlock
*pBlock
);
100 /*========================= PROTECTED ===============================*/
104 // these chunks are used for rendering the material
106 MaterialChunkUnrecPtr _materialChunk
;
107 BlendChunkUnrecPtr _blendChunk
;
109 /*---------------------------------------------------------------------*/
110 /*! \name Constructors */
113 SimpleMaterial(void);
114 SimpleMaterial(const SimpleMaterial
&source
);
117 /*---------------------------------------------------------------------*/
118 /*! \name Destructors */
121 virtual ~SimpleMaterial(void);
124 /*---------------------------------------------------------------------*/
128 static void initMethod(InitPhase ePhase
);
131 /*---------------------------------------------------------------------*/
135 virtual void resolveLinks(void);
138 /*---------------------------------------------------------------------*/
142 void prepareLocalChunks(void);
145 /*========================== PRIVATE ================================*/
149 typedef SimpleMaterialBase Inherited
;
151 friend class FieldContainer
;
152 friend class SimpleMaterialBase
;
154 // prohibit default functions (move to 'public' if you need one)
155 void operator =(const SimpleMaterial
&source
);
158 typedef SimpleMaterial
*SimpleMaterialP
;
162 #include "OSGSimpleMaterialBase.inl"
163 #include "OSGSimpleMaterial.inl"
165 #endif /* _OSGSIMPLEMATERIAL_H_ */