changed: gcc8 base update
[opensg.git] / Source / System / NodeCores / Groups / Light / OSGSpotLightBase.h
blobb1d473479030f110b2dada9cccb734637135634c
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
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 /*****************************************************************************\
40 *****************************************************************************
41 ** **
42 ** This file is automatically generated. **
43 ** **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
46 ** **
47 ** Do not change this file, changes should be done in the derived **
48 ** class SpotLight
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGSPOTLIGHTBASE_H_
55 #define _OSGSPOTLIGHTBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGGroupDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGPointLight.h" // Parent
68 #include "OSGVecFields.h" // Direction type
69 #include "OSGSysFields.h" // SpotExponent type
71 #include "OSGSpotLightFields.h"
73 OSG_BEGIN_NAMESPACE
76 class SpotLight;
78 //! \brief SpotLight Base Class.
80 class OSG_GROUP_DLLMAPPING SpotLightBase : public PointLight
82 public:
84 typedef PointLight Inherited;
85 typedef PointLight ParentContainer;
87 typedef Inherited::TypeObject TypeObject;
88 typedef TypeObject::InitPhase InitPhase;
90 OSG_GEN_INTERNALPTR(SpotLight);
92 /*========================== PUBLIC =================================*/
94 public:
96 enum
98 DirectionFieldId = Inherited::NextFieldId,
99 SpotExponentFieldId = DirectionFieldId + 1,
100 SpotCutOffFieldId = SpotExponentFieldId + 1,
101 NextFieldId = SpotCutOffFieldId + 1
104 static const OSG::BitVector DirectionFieldMask =
105 (TypeTraits<BitVector>::One << DirectionFieldId);
106 static const OSG::BitVector SpotExponentFieldMask =
107 (TypeTraits<BitVector>::One << SpotExponentFieldId);
108 static const OSG::BitVector SpotCutOffFieldMask =
109 (TypeTraits<BitVector>::One << SpotCutOffFieldId);
110 static const OSG::BitVector NextFieldMask =
111 (TypeTraits<BitVector>::One << NextFieldId);
113 typedef SFVec3f SFDirectionType;
114 typedef SFReal32 SFSpotExponentType;
115 typedef SFReal32 SFSpotCutOffType;
117 /*---------------------------------------------------------------------*/
118 /*! \name Class Get */
119 /*! \{ */
121 static FieldContainerType &getClassType (void);
122 static UInt32 getClassTypeId (void);
123 static UInt16 getClassGroupId(void);
125 /*! \} */
126 /*---------------------------------------------------------------------*/
127 /*! \name FieldContainer Get */
128 /*! \{ */
130 virtual FieldContainerType &getType (void);
131 virtual const FieldContainerType &getType (void) const;
133 virtual UInt32 getContainerSize(void) const;
135 /*! \} */
136 /*---------------------------------------------------------------------*/
137 /*! \name Field Get */
138 /*! \{ */
141 SFVec3f *editSFDirection (void);
142 const SFVec3f *getSFDirection (void) const;
144 SFReal32 *editSFSpotExponent (void);
145 const SFReal32 *getSFSpotExponent (void) const;
147 SFReal32 *editSFSpotCutOff (void);
148 const SFReal32 *getSFSpotCutOff (void) const;
151 Vec3f &editDirection (void);
152 const Vec3f &getDirection (void) const;
154 Real32 &editSpotExponent (void);
155 Real32 getSpotExponent (void) const;
157 Real32 &editSpotCutOff (void);
158 Real32 getSpotCutOff (void) const;
160 /*! \} */
161 /*---------------------------------------------------------------------*/
162 /*! \name Field Set */
163 /*! \{ */
165 void setDirection (const Vec3f &value);
166 void setSpotExponent (const Real32 value);
167 void setSpotCutOff (const Real32 value);
169 /*! \} */
170 /*---------------------------------------------------------------------*/
171 /*! \name Ptr MField Set */
172 /*! \{ */
174 /*! \} */
175 /*---------------------------------------------------------------------*/
176 /*! \name Binary Access */
177 /*! \{ */
179 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
180 virtual void copyToBin (BinaryDataHandler &pMem,
181 ConstFieldMaskArg whichField);
182 virtual void copyFromBin(BinaryDataHandler &pMem,
183 ConstFieldMaskArg whichField);
186 /*! \} */
187 /*---------------------------------------------------------------------*/
188 /*! \name Construction */
189 /*! \{ */
191 static SpotLightTransitPtr create (void);
192 static SpotLight *createEmpty (void);
194 static SpotLightTransitPtr createLocal (
195 BitVector bFlags = FCLocal::All);
197 static SpotLight *createEmptyLocal(
198 BitVector bFlags = FCLocal::All);
200 static SpotLightTransitPtr createDependent (BitVector bFlags);
202 /*! \} */
203 /*---------------------------------------------------------------------*/
204 /*! \name Copy */
205 /*! \{ */
207 virtual FieldContainerTransitPtr shallowCopy (void) const;
208 virtual FieldContainerTransitPtr shallowCopyLocal(
209 BitVector bFlags = FCLocal::All) const;
210 virtual FieldContainerTransitPtr shallowCopyDependent(
211 BitVector bFlags) const;
213 /*! \} */
214 /*========================= PROTECTED ===============================*/
216 protected:
218 static TypeObject _type;
220 static void classDescInserter(TypeObject &oType);
221 static const Char8 *getClassname (void );
223 /*---------------------------------------------------------------------*/
224 /*! \name Fields */
225 /*! \{ */
227 SFVec3f _sfDirection;
228 SFReal32 _sfSpotExponent;
229 SFReal32 _sfSpotCutOff;
231 /*! \} */
232 /*---------------------------------------------------------------------*/
233 /*! \name Constructors */
234 /*! \{ */
236 SpotLightBase(void);
237 SpotLightBase(const SpotLightBase &source);
239 /*! \} */
240 /*---------------------------------------------------------------------*/
241 /*! \name Destructors */
242 /*! \{ */
244 virtual ~SpotLightBase(void);
246 /*! \} */
247 /*---------------------------------------------------------------------*/
248 /*! \name onCreate */
249 /*! \{ */
252 /*! \} */
253 /*---------------------------------------------------------------------*/
254 /*! \name Generic Field Access */
255 /*! \{ */
257 GetFieldHandlePtr getHandleDirection (void) const;
258 EditFieldHandlePtr editHandleDirection (void);
259 GetFieldHandlePtr getHandleSpotExponent (void) const;
260 EditFieldHandlePtr editHandleSpotExponent (void);
261 GetFieldHandlePtr getHandleSpotCutOff (void) const;
262 EditFieldHandlePtr editHandleSpotCutOff (void);
264 /*! \} */
265 /*---------------------------------------------------------------------*/
266 /*! \name Sync */
267 /*! \{ */
269 #ifdef OSG_MT_CPTR_ASPECT
270 virtual void execSyncV( FieldContainer &oFrom,
271 ConstFieldMaskArg whichField,
272 AspectOffsetStore &oOffsets,
273 ConstFieldMaskArg syncMode ,
274 const UInt32 uiSyncInfo);
276 void execSync ( SpotLightBase *pFrom,
277 ConstFieldMaskArg whichField,
278 AspectOffsetStore &oOffsets,
279 ConstFieldMaskArg syncMode ,
280 const UInt32 uiSyncInfo);
281 #endif
283 /*! \} */
284 /*---------------------------------------------------------------------*/
285 /*! \name Edit */
286 /*! \{ */
288 /*! \} */
289 /*---------------------------------------------------------------------*/
290 /*! \name Aspect Create */
291 /*! \{ */
293 #ifdef OSG_MT_CPTR_ASPECT
294 virtual FieldContainer *createAspectCopy(
295 const FieldContainer *pRefAspect) const;
296 #endif
298 /*! \} */
299 /*---------------------------------------------------------------------*/
300 /*! \name Edit */
301 /*! \{ */
302 /*! \} */
303 /*---------------------------------------------------------------------*/
304 /*! \name Sync */
305 /*! \{ */
307 virtual void resolveLinks(void);
309 /*! \} */
310 /*========================== PRIVATE ================================*/
312 private:
313 /*---------------------------------------------------------------------*/
315 // prohibit default functions (move to 'public' if you need one)
316 void operator =(const SpotLightBase &source);
319 typedef SpotLightBase *SpotLightBaseP;
321 typedef CoredNodeRefPtr <SpotLight> SpotLightNodeRefPtr;
322 typedef CoredNodeMTRefPtr<SpotLight> SpotLightNodeMTRefPtr;
324 OSG_END_NAMESPACE
326 #endif /* _OSGSPOTLIGHTBASE_H_ */