fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / NodeCores / Groups / Light / OSGSpotLight.h
blob74afb1fdb95fa8ff55332075aee8e91f6f1f2625
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
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. *
18 * *
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. *
23 * *
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. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGSPOTLIGHT_H_
40 #define _OSGSPOTLIGHT_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGSpotLightBase.h"
47 OSG_BEGIN_NAMESPACE
49 /*! \brief Spot Light
50 \ingroup GrpGroupLightObj
51 \ingroup GrpLibOSGGroup
52 \includebasedoc
55 class OSG_GROUP_DLLMAPPING SpotLight : public SpotLightBase
57 /*========================== PUBLIC =================================*/
59 public:
61 /*---------------------------------------------------------------------*/
62 /*! \name static stat elem */
63 /*! \{ */
65 static StatElemDesc<StatIntElem> statNSpotLights;
67 /*! \} */
68 /*---------------------------------------------------------------------*/
69 /*! \name Set */
70 /*! \{ */
72 void setSpotDirection(Real32 rX,
73 Real32 rY,
74 Real32 rZ );
75 void setSpotCutOffDeg(Real32 angle);
77 /*! \} */
78 /*---------------------------------------------------------------------*/
79 /*! \name Get */
80 /*! \{ */
82 Real32 getSpotCutOffDeg(void);
84 /*! \} */
85 /*---------------------------------------------------------------------*/
86 /*! \name Sync */
87 /*! \{ */
89 virtual void changed(ConstFieldMaskArg whichField,
90 UInt32 origin,
91 BitVector detail);
93 /*! \} */
94 /*---------------------------------------------------------------------*/
95 /*! \name Chunk */
96 /*! \{ */
98 virtual void makeChunk(void);
100 /*! \} */
101 /*---------------------------------------------------------------------*/
102 /*! \name LightEngine */
103 /*! \{ */
105 virtual void callLightEngineEnter(RenderAction *ract);
106 virtual void callLightEngineLeave(RenderAction *ract);
108 /*! \} */
109 /*---------------------------------------------------------------------*/
110 /*! \name Dump */
111 /*! \{ */
113 virtual void dump( UInt32 uiIndent = 0,
114 const BitVector bvFlags = 0) const;
116 /*! \} */
117 /*========================= PROTECTED ===============================*/
119 protected:
121 typedef SpotLightBase Inherited;
123 /*---------------------------------------------------------------------*/
124 /*! \name Constructors */
125 /*! \{ */
127 SpotLight(void);
128 SpotLight(const SpotLight &source);
130 /*! \} */
131 /*---------------------------------------------------------------------*/
132 /*! \name Destructors */
133 /*! \{ */
135 virtual ~SpotLight(void);
137 /*! \} */
138 /*---------------------------------------------------------------------*/
139 /*! \name Init */
140 /*! \{ */
142 static void initMethod(InitPhase ePhase);
144 /*! \} */
145 /*---------------------------------------------------------------------*/
146 /*! \name Actions */
147 /*! \{ */
149 Action::ResultE renderEnter(Action *action);
150 Action::ResultE renderLeave(Action *action);
152 /*! \} */
153 /*========================== PRIVATE ================================*/
155 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;
166 OSG_END_NAMESPACE
168 #include "OSGSpotLightBase.inl"
169 #include "OSGSpotLight.inl"
171 #endif /* _OSGSPOTLIGHT_H_ */