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 _OSGDIRECTIONALLIGHT_H_
40 #define _OSGDIRECTIONALLIGHT_H_
45 #include "OSGDirectionalLightBase.h"
46 #include "OSGStatIntElem.h"
47 #include "OSGStatElemDesc.h"
51 /*! \brief Directional light
52 \ingroup GrpGroupLightObj
53 \ingroup GrpLibOSGGroup
57 class OSG_GROUP_DLLMAPPING DirectionalLight
: public DirectionalLightBase
59 /*========================== PUBLIC =================================*/
63 /*---------------------------------------------------------------------*/
64 /*! \name static stat elem */
67 static StatElemDesc
<StatIntElem
> statNDirectionalLights
;
70 /*---------------------------------------------------------------------*/
74 void setDirection( Real32 rX
,
77 void setDirection(const Vec3f
&direction
);
80 /*---------------------------------------------------------------------*/
84 virtual void changed(ConstFieldMaskArg whichField
,
89 /*---------------------------------------------------------------------*/
93 virtual void makeChunk(void);
96 /*---------------------------------------------------------------------*/
97 /*! \name LightEngine */
100 virtual void callLightEngineEnter(RenderAction
*ract
);
101 virtual void callLightEngineLeave(RenderAction
*ract
);
104 /*---------------------------------------------------------------------*/
108 virtual void dump( UInt32 uiIndent
= 0,
109 const BitVector bvFlags
= 0) const;
112 /*========================= PROTECTED ===============================*/
116 typedef DirectionalLightBase Inherited
;
118 /*---------------------------------------------------------------------*/
119 /*! \name Constructors */
122 DirectionalLight(void);
123 DirectionalLight(const DirectionalLight
&source
);
126 /*---------------------------------------------------------------------*/
127 /*! \name Destructors */
130 virtual ~DirectionalLight(void);
133 /*---------------------------------------------------------------------*/
137 static void initMethod(InitPhase ePhase
);
140 /*---------------------------------------------------------------------*/
144 Action::ResultE
renderEnter(Action
*action
);
145 Action::ResultE
renderLeave(Action
*action
);
148 /*========================== PRIVATE ================================*/
152 friend class FieldContainer
;
153 friend class DirectionalLightBase
;
155 /*! \brief prohibit default function (move to 'public' if needed) */
156 void operator =(const DirectionalLight
&source
);
159 typedef DirectionalLight
*DirectionalLightP
;
163 #include "OSGDirectionalLightBase.inl"
164 #include "OSGDirectionalLight.inl"
166 #endif /* _OSGDIRECTIONALLIGHT_H_ */