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 _OSGSHADOWMAPENGINE_H_
40 #define _OSGSHADOWMAPENGINE_H_
45 #include "OSGShadowMapEngineBase.h"
46 #include "OSGChunkMaterialFields.h"
52 /*! \brief ShadowMapEngine is the basic NodeCore for inner nodes in the tree.
53 \ingroup GrpGroupLightShadowBaseObj
54 \ingroup GrpLibOSGGroup
58 class OSG_GROUP_DLLMAPPING ShadowMapEngine
: public ShadowMapEngineBase
60 /*========================== PUBLIC =================================*/
64 /*---------------------------------------------------------------------*/
68 virtual void changed(ConstFieldMaskArg whichField
,
73 /*---------------------------------------------------------------------*/
77 virtual Action::ResultE
runOnEnter(Light
*pLight
,
79 RenderAction
*pAction
) = 0;
80 virtual Action::ResultE
runOnLeave(Light
*pLight
,
82 RenderAction
*pAction
) = 0;
85 /*---------------------------------------------------------------------*/
89 virtual void dump( UInt32 uiIndent
= 0,
90 const BitVector bvFlags
= 0) const;
93 /*========================= PROTECTED ===============================*/
97 typedef ShadowMapEngineBase Inherited
;
99 static ChunkMaterialUnrecPtr _pLightPassMat
;
101 /*---------------------------------------------------------------------*/
102 /*! \name Constructors */
105 ShadowMapEngine(void);
106 ShadowMapEngine(const ShadowMapEngine
&source
);
109 /*---------------------------------------------------------------------*/
110 /*! \name Destructors */
113 virtual ~ShadowMapEngine(void);
116 /*---------------------------------------------------------------------*/
120 static void initMethod(InitPhase ePhase
);
121 static void exitMethod(InitPhase ePhase
);
124 /*---------------------------------------------------------------------*/
125 /*! \name Action Callbacks */
128 static BitVector bvLightPassMask
;
129 static BitVector bvAmbientPassMask
;
130 static BitVector bvDiffusePassMask
;
133 /*---------------------------------------------------------------------*/
138 /*========================== PRIVATE ================================*/
142 friend class FieldContainer
;
143 friend class ShadowMapEngineBase
;
145 /*---------------------------------------------------------------------*/
147 /*!\brief prohibit default function (move to 'public' if needed) */
148 void operator =(const ShadowMapEngine
&source
);
151 typedef ShadowMapEngine
*ShadowMapEngineP
;
155 #include "OSGShadowMapEngineBase.inl"
156 #include "OSGShadowMapEngine.inl"
158 #endif /* _OSGSHADOWMAPENGINE_H_ */