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 _OSGSPOTLIGHT_H_
40 #define _OSGSPOTLIGHT_H_
45 #include "OSGSpotLightBase.h"
50 \ingroup GrpGroupLightObj
51 \ingroup GrpLibOSGGroup
55 class OSG_GROUP_DLLMAPPING SpotLight
: public SpotLightBase
57 /*========================== PUBLIC =================================*/
61 /*---------------------------------------------------------------------*/
62 /*! \name static stat elem */
65 static StatElemDesc
<StatIntElem
> statNSpotLights
;
68 /*---------------------------------------------------------------------*/
72 void setSpotDirection(Real32 rX
,
75 void setSpotCutOffDeg(Real32 angle
);
78 /*---------------------------------------------------------------------*/
82 Real32
getSpotCutOffDeg(void);
85 /*---------------------------------------------------------------------*/
89 virtual void changed(ConstFieldMaskArg whichField
,
94 /*---------------------------------------------------------------------*/
98 virtual void makeChunk(void);
101 /*---------------------------------------------------------------------*/
102 /*! \name LightEngine */
105 virtual void callLightEngineEnter(RenderAction
*ract
);
106 virtual void callLightEngineLeave(RenderAction
*ract
);
109 /*---------------------------------------------------------------------*/
113 virtual void dump( UInt32 uiIndent
= 0,
114 const BitVector bvFlags
= 0) const;
117 /*========================= PROTECTED ===============================*/
121 typedef SpotLightBase Inherited
;
123 /*---------------------------------------------------------------------*/
124 /*! \name Constructors */
128 SpotLight(const SpotLight
&source
);
131 /*---------------------------------------------------------------------*/
132 /*! \name Destructors */
135 virtual ~SpotLight(void);
138 /*---------------------------------------------------------------------*/
142 static void initMethod(InitPhase ePhase
);
145 /*---------------------------------------------------------------------*/
149 Action::ResultE
renderEnter(Action
*action
);
150 Action::ResultE
renderLeave(Action
*action
);
153 /*========================== PRIVATE ================================*/
157 friend class FieldContainer
;
158 friend class SpotLightBase
;
160 /*! \brief prohibit default function (move to 'public' if needed) */
161 void operator =(const SpotLight
&source
);
164 typedef SpotLight
*SpotLightP
;
168 #include "OSGSpotLightBase.inl"
169 #include "OSGSpotLight.inl"
171 #endif /* _OSGSPOTLIGHT_H_ */