1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
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 /*****************************************************************************\
40 *****************************************************************************
42 ** This file is automatically generated. **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
47 ** Do not change this file, changes should be done in the derived **
48 ** class MultiLightChunk
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGMULTILIGHTCHUNKBASE_H_
55 #define _OSGMULTILIGHTCHUNKBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGSystemDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGShaderStorageBufferObjStdLayoutChunk.h" // Parent
68 #include "OSGSysFields.h" // HasWorldToLightSpaceMatrix type
69 #include "OSGVecFields.h" // Position type
70 #include "OSGBaseFields.h" // Color type
71 #include "OSGNodeFields.h" // Beacon type
72 #include "OSGMathFields.h" // BeaconMatrix type
74 #include "OSGMultiLightChunkFields.h"
79 class MultiLightChunk
;
81 //! \brief MultiLightChunk Base Class.
83 class OSG_SYSTEM_DLLMAPPING MultiLightChunkBase
: public ShaderStorageBufferObjStdLayoutChunk
87 typedef ShaderStorageBufferObjStdLayoutChunk Inherited
;
88 typedef ShaderStorageBufferObjStdLayoutChunk ParentContainer
;
90 typedef Inherited::TypeObject TypeObject
;
91 typedef TypeObject::InitPhase InitPhase
;
93 OSG_GEN_INTERNALPTR(MultiLightChunk
);
95 /*========================== PUBLIC =================================*/
101 HasWorldToLightSpaceMatrixFieldId
= Inherited::NextFieldId
,
102 HasLightToWorldSpaceMatrixFieldId
= HasWorldToLightSpaceMatrixFieldId
+ 1,
103 HasEyeToLightSpaceMatrixFieldId
= HasLightToWorldSpaceMatrixFieldId
+ 1,
104 HasLightToEyeSpaceMatrixFieldId
= HasEyeToLightSpaceMatrixFieldId
+ 1,
105 HasLightPerspectiveMatrixFieldId
= HasLightToEyeSpaceMatrixFieldId
+ 1,
106 HasInvLightPerspectiveMatrixFieldId
= HasLightPerspectiveMatrixFieldId
+ 1,
107 HasColorFieldId
= HasInvLightPerspectiveMatrixFieldId
+ 1,
108 HasIntensityFieldId
= HasColorFieldId
+ 1,
109 HasSeparateIntensitiesFieldId
= HasIntensityFieldId
+ 1,
110 HasAttenuationFieldId
= HasSeparateIntensitiesFieldId
+ 1,
111 AutoCalcRangesFieldId
= HasAttenuationFieldId
+ 1,
112 HasRangeCutOnFieldId
= AutoCalcRangesFieldId
+ 1,
113 HasRangeCutOffFieldId
= HasRangeCutOnFieldId
+ 1,
114 HasRangeNearZoneFieldId
= HasRangeCutOffFieldId
+ 1,
115 HasRangeFarZoneFieldId
= HasRangeNearZoneFieldId
+ 1,
116 HasCosSpotlightAngleFieldId
= HasRangeFarZoneFieldId
+ 1,
117 HasSpotlightAngleFieldId
= HasCosSpotlightAngleFieldId
+ 1,
118 HasSpotExponentFieldId
= HasSpotlightAngleFieldId
+ 1,
119 HasCinemaLightFieldId
= HasSpotExponentFieldId
+ 1,
120 PositionFieldId
= HasCinemaLightFieldId
+ 1,
121 DirectionFieldId
= PositionFieldId
+ 1,
122 ColorFieldId
= DirectionFieldId
+ 1,
123 IntensityFieldId
= ColorFieldId
+ 1,
124 AmbientIntensityFieldId
= IntensityFieldId
+ 1,
125 DiffuseIntensityFieldId
= AmbientIntensityFieldId
+ 1,
126 SpecularIntensityFieldId
= DiffuseIntensityFieldId
+ 1,
127 AttenuationFieldId
= SpecularIntensityFieldId
+ 1,
128 SpotlightAngleFieldId
= AttenuationFieldId
+ 1,
129 SpotExponentFieldId
= SpotlightAngleFieldId
+ 1,
130 InnerSuperEllipsesWidthFieldId
= SpotExponentFieldId
+ 1,
131 InnerSuperEllipsesHeightFieldId
= InnerSuperEllipsesWidthFieldId
+ 1,
132 OuterSuperEllipsesWidthFieldId
= InnerSuperEllipsesHeightFieldId
+ 1,
133 OuterSuperEllipsesHeightFieldId
= OuterSuperEllipsesWidthFieldId
+ 1,
134 SuperEllipsesRoundnessFieldId
= OuterSuperEllipsesHeightFieldId
+ 1,
135 SuperEllipsesTwistFieldId
= SuperEllipsesRoundnessFieldId
+ 1,
136 RangeCutOnFieldId
= SuperEllipsesTwistFieldId
+ 1,
137 RangeCutOffFieldId
= RangeCutOnFieldId
+ 1,
138 RangeNearZoneFieldId
= RangeCutOffFieldId
+ 1,
139 RangeFarZoneFieldId
= RangeNearZoneFieldId
+ 1,
140 TypeFieldId
= RangeFarZoneFieldId
+ 1,
141 EnabledFieldId
= TypeFieldId
+ 1,
142 BeaconFieldId
= EnabledFieldId
+ 1,
143 BeaconMatrixFieldId
= BeaconFieldId
+ 1,
144 EyeSpaceFieldId
= BeaconMatrixFieldId
+ 1,
145 LastCamNearFieldId
= EyeSpaceFieldId
+ 1,
146 LastCamFarFieldId
= LastCamNearFieldId
+ 1,
147 LastCamToWorldFieldId
= LastCamFarFieldId
+ 1,
148 LightBlockNameFieldId
= LastCamToWorldFieldId
+ 1,
149 LightVariableNameFieldId
= LightBlockNameFieldId
+ 1,
150 NextFieldId
= LightVariableNameFieldId
+ 1
153 static const OSG::BitVector HasWorldToLightSpaceMatrixFieldMask
=
154 (TypeTraits
<BitVector
>::One
<< HasWorldToLightSpaceMatrixFieldId
);
155 static const OSG::BitVector HasLightToWorldSpaceMatrixFieldMask
=
156 (TypeTraits
<BitVector
>::One
<< HasLightToWorldSpaceMatrixFieldId
);
157 static const OSG::BitVector HasEyeToLightSpaceMatrixFieldMask
=
158 (TypeTraits
<BitVector
>::One
<< HasEyeToLightSpaceMatrixFieldId
);
159 static const OSG::BitVector HasLightToEyeSpaceMatrixFieldMask
=
160 (TypeTraits
<BitVector
>::One
<< HasLightToEyeSpaceMatrixFieldId
);
161 static const OSG::BitVector HasLightPerspectiveMatrixFieldMask
=
162 (TypeTraits
<BitVector
>::One
<< HasLightPerspectiveMatrixFieldId
);
163 static const OSG::BitVector HasInvLightPerspectiveMatrixFieldMask
=
164 (TypeTraits
<BitVector
>::One
<< HasInvLightPerspectiveMatrixFieldId
);
165 static const OSG::BitVector HasColorFieldMask
=
166 (TypeTraits
<BitVector
>::One
<< HasColorFieldId
);
167 static const OSG::BitVector HasIntensityFieldMask
=
168 (TypeTraits
<BitVector
>::One
<< HasIntensityFieldId
);
169 static const OSG::BitVector HasSeparateIntensitiesFieldMask
=
170 (TypeTraits
<BitVector
>::One
<< HasSeparateIntensitiesFieldId
);
171 static const OSG::BitVector HasAttenuationFieldMask
=
172 (TypeTraits
<BitVector
>::One
<< HasAttenuationFieldId
);
173 static const OSG::BitVector AutoCalcRangesFieldMask
=
174 (TypeTraits
<BitVector
>::One
<< AutoCalcRangesFieldId
);
175 static const OSG::BitVector HasRangeCutOnFieldMask
=
176 (TypeTraits
<BitVector
>::One
<< HasRangeCutOnFieldId
);
177 static const OSG::BitVector HasRangeCutOffFieldMask
=
178 (TypeTraits
<BitVector
>::One
<< HasRangeCutOffFieldId
);
179 static const OSG::BitVector HasRangeNearZoneFieldMask
=
180 (TypeTraits
<BitVector
>::One
<< HasRangeNearZoneFieldId
);
181 static const OSG::BitVector HasRangeFarZoneFieldMask
=
182 (TypeTraits
<BitVector
>::One
<< HasRangeFarZoneFieldId
);
183 static const OSG::BitVector HasCosSpotlightAngleFieldMask
=
184 (TypeTraits
<BitVector
>::One
<< HasCosSpotlightAngleFieldId
);
185 static const OSG::BitVector HasSpotlightAngleFieldMask
=
186 (TypeTraits
<BitVector
>::One
<< HasSpotlightAngleFieldId
);
187 static const OSG::BitVector HasSpotExponentFieldMask
=
188 (TypeTraits
<BitVector
>::One
<< HasSpotExponentFieldId
);
189 static const OSG::BitVector HasCinemaLightFieldMask
=
190 (TypeTraits
<BitVector
>::One
<< HasCinemaLightFieldId
);
191 static const OSG::BitVector PositionFieldMask
=
192 (TypeTraits
<BitVector
>::One
<< PositionFieldId
);
193 static const OSG::BitVector DirectionFieldMask
=
194 (TypeTraits
<BitVector
>::One
<< DirectionFieldId
);
195 static const OSG::BitVector ColorFieldMask
=
196 (TypeTraits
<BitVector
>::One
<< ColorFieldId
);
197 static const OSG::BitVector IntensityFieldMask
=
198 (TypeTraits
<BitVector
>::One
<< IntensityFieldId
);
199 static const OSG::BitVector AmbientIntensityFieldMask
=
200 (TypeTraits
<BitVector
>::One
<< AmbientIntensityFieldId
);
201 static const OSG::BitVector DiffuseIntensityFieldMask
=
202 (TypeTraits
<BitVector
>::One
<< DiffuseIntensityFieldId
);
203 static const OSG::BitVector SpecularIntensityFieldMask
=
204 (TypeTraits
<BitVector
>::One
<< SpecularIntensityFieldId
);
205 static const OSG::BitVector AttenuationFieldMask
=
206 (TypeTraits
<BitVector
>::One
<< AttenuationFieldId
);
207 static const OSG::BitVector SpotlightAngleFieldMask
=
208 (TypeTraits
<BitVector
>::One
<< SpotlightAngleFieldId
);
209 static const OSG::BitVector SpotExponentFieldMask
=
210 (TypeTraits
<BitVector
>::One
<< SpotExponentFieldId
);
211 static const OSG::BitVector InnerSuperEllipsesWidthFieldMask
=
212 (TypeTraits
<BitVector
>::One
<< InnerSuperEllipsesWidthFieldId
);
213 static const OSG::BitVector InnerSuperEllipsesHeightFieldMask
=
214 (TypeTraits
<BitVector
>::One
<< InnerSuperEllipsesHeightFieldId
);
215 static const OSG::BitVector OuterSuperEllipsesWidthFieldMask
=
216 (TypeTraits
<BitVector
>::One
<< OuterSuperEllipsesWidthFieldId
);
217 static const OSG::BitVector OuterSuperEllipsesHeightFieldMask
=
218 (TypeTraits
<BitVector
>::One
<< OuterSuperEllipsesHeightFieldId
);
219 static const OSG::BitVector SuperEllipsesRoundnessFieldMask
=
220 (TypeTraits
<BitVector
>::One
<< SuperEllipsesRoundnessFieldId
);
221 static const OSG::BitVector SuperEllipsesTwistFieldMask
=
222 (TypeTraits
<BitVector
>::One
<< SuperEllipsesTwistFieldId
);
223 static const OSG::BitVector RangeCutOnFieldMask
=
224 (TypeTraits
<BitVector
>::One
<< RangeCutOnFieldId
);
225 static const OSG::BitVector RangeCutOffFieldMask
=
226 (TypeTraits
<BitVector
>::One
<< RangeCutOffFieldId
);
227 static const OSG::BitVector RangeNearZoneFieldMask
=
228 (TypeTraits
<BitVector
>::One
<< RangeNearZoneFieldId
);
229 static const OSG::BitVector RangeFarZoneFieldMask
=
230 (TypeTraits
<BitVector
>::One
<< RangeFarZoneFieldId
);
231 static const OSG::BitVector TypeFieldMask
=
232 (TypeTraits
<BitVector
>::One
<< TypeFieldId
);
233 static const OSG::BitVector EnabledFieldMask
=
234 (TypeTraits
<BitVector
>::One
<< EnabledFieldId
);
235 static const OSG::BitVector BeaconFieldMask
=
236 (TypeTraits
<BitVector
>::One
<< BeaconFieldId
);
237 static const OSG::BitVector BeaconMatrixFieldMask
=
238 (TypeTraits
<BitVector
>::One
<< BeaconMatrixFieldId
);
239 static const OSG::BitVector EyeSpaceFieldMask
=
240 (TypeTraits
<BitVector
>::One
<< EyeSpaceFieldId
);
241 static const OSG::BitVector LastCamNearFieldMask
=
242 (TypeTraits
<BitVector
>::One
<< LastCamNearFieldId
);
243 static const OSG::BitVector LastCamFarFieldMask
=
244 (TypeTraits
<BitVector
>::One
<< LastCamFarFieldId
);
245 static const OSG::BitVector LastCamToWorldFieldMask
=
246 (TypeTraits
<BitVector
>::One
<< LastCamToWorldFieldId
);
247 static const OSG::BitVector LightBlockNameFieldMask
=
248 (TypeTraits
<BitVector
>::One
<< LightBlockNameFieldId
);
249 static const OSG::BitVector LightVariableNameFieldMask
=
250 (TypeTraits
<BitVector
>::One
<< LightVariableNameFieldId
);
251 static const OSG::BitVector NextFieldMask
=
252 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
254 typedef SFBool SFHasWorldToLightSpaceMatrixType
;
255 typedef SFBool SFHasLightToWorldSpaceMatrixType
;
256 typedef SFBool SFHasEyeToLightSpaceMatrixType
;
257 typedef SFBool SFHasLightToEyeSpaceMatrixType
;
258 typedef SFBool SFHasLightPerspectiveMatrixType
;
259 typedef SFBool SFHasInvLightPerspectiveMatrixType
;
260 typedef SFBool SFHasColorType
;
261 typedef SFBool SFHasIntensityType
;
262 typedef SFBool SFHasSeparateIntensitiesType
;
263 typedef SFBool SFHasAttenuationType
;
264 typedef SFBool SFAutoCalcRangesType
;
265 typedef SFBool SFHasRangeCutOnType
;
266 typedef SFBool SFHasRangeCutOffType
;
267 typedef SFBool SFHasRangeNearZoneType
;
268 typedef SFBool SFHasRangeFarZoneType
;
269 typedef SFBool SFHasCosSpotlightAngleType
;
270 typedef SFBool SFHasSpotlightAngleType
;
271 typedef SFBool SFHasSpotExponentType
;
272 typedef SFBool SFHasCinemaLightType
;
273 typedef MFPnt3f MFPositionType
;
274 typedef MFVec3f MFDirectionType
;
275 typedef MFColor3f MFColorType
;
276 typedef MFReal32 MFIntensityType
;
277 typedef MFVec3f MFAmbientIntensityType
;
278 typedef MFVec3f MFDiffuseIntensityType
;
279 typedef MFVec3f MFSpecularIntensityType
;
280 typedef MFVec3f MFAttenuationType
;
281 typedef MFReal32 MFSpotlightAngleType
;
282 typedef MFReal32 MFSpotExponentType
;
283 typedef MFReal32 MFInnerSuperEllipsesWidthType
;
284 typedef MFReal32 MFInnerSuperEllipsesHeightType
;
285 typedef MFReal32 MFOuterSuperEllipsesWidthType
;
286 typedef MFReal32 MFOuterSuperEllipsesHeightType
;
287 typedef MFReal32 MFSuperEllipsesRoundnessType
;
288 typedef MFReal32 MFSuperEllipsesTwistType
;
289 typedef MFReal32 MFRangeCutOnType
;
290 typedef MFReal32 MFRangeCutOffType
;
291 typedef MFReal32 MFRangeNearZoneType
;
292 typedef MFReal32 MFRangeFarZoneType
;
293 typedef MFUInt8 MFTypeType
;
294 typedef MFBool MFEnabledType
;
295 typedef MFWeakNodePtr MFBeaconType
;
296 typedef MFMatrix MFBeaconMatrixType
;
297 typedef SFBool SFEyeSpaceType
;
298 typedef SFReal32 SFLastCamNearType
;
299 typedef SFReal32 SFLastCamFarType
;
300 typedef SFMatrix SFLastCamToWorldType
;
301 typedef SFString SFLightBlockNameType
;
302 typedef SFString SFLightVariableNameType
;
304 /*---------------------------------------------------------------------*/
305 /*! \name Class Get */
308 static FieldContainerType
&getClassType (void);
309 static UInt32
getClassTypeId (void);
310 static UInt16
getClassGroupId(void);
313 /*---------------------------------------------------------------------*/
314 /*! \name FieldContainer Get */
317 virtual FieldContainerType
&getType (void);
318 virtual const FieldContainerType
&getType (void) const;
320 virtual UInt32
getContainerSize(void) const;
323 /*---------------------------------------------------------------------*/
324 /*! \name Field Get */
328 SFBool
*editSFHasWorldToLightSpaceMatrix(void);
329 const SFBool
*getSFHasWorldToLightSpaceMatrix (void) const;
331 SFBool
*editSFHasLightToWorldSpaceMatrix(void);
332 const SFBool
*getSFHasLightToWorldSpaceMatrix (void) const;
334 SFBool
*editSFHasEyeToLightSpaceMatrix(void);
335 const SFBool
*getSFHasEyeToLightSpaceMatrix (void) const;
337 SFBool
*editSFHasLightToEyeSpaceMatrix(void);
338 const SFBool
*getSFHasLightToEyeSpaceMatrix (void) const;
340 SFBool
*editSFHasLightPerspectiveMatrix(void);
341 const SFBool
*getSFHasLightPerspectiveMatrix (void) const;
343 SFBool
*editSFHasInvLightPerspectiveMatrix(void);
344 const SFBool
*getSFHasInvLightPerspectiveMatrix (void) const;
346 SFBool
*editSFHasColor (void);
347 const SFBool
*getSFHasColor (void) const;
349 SFBool
*editSFHasIntensity (void);
350 const SFBool
*getSFHasIntensity (void) const;
352 SFBool
*editSFHasSeparateIntensities(void);
353 const SFBool
*getSFHasSeparateIntensities (void) const;
355 SFBool
*editSFHasAttenuation (void);
356 const SFBool
*getSFHasAttenuation (void) const;
358 SFBool
*editSFAutoCalcRanges (void);
359 const SFBool
*getSFAutoCalcRanges (void) const;
361 SFBool
*editSFHasRangeCutOn (void);
362 const SFBool
*getSFHasRangeCutOn (void) const;
364 SFBool
*editSFHasRangeCutOff (void);
365 const SFBool
*getSFHasRangeCutOff (void) const;
367 SFBool
*editSFHasRangeNearZone(void);
368 const SFBool
*getSFHasRangeNearZone (void) const;
370 SFBool
*editSFHasRangeFarZone(void);
371 const SFBool
*getSFHasRangeFarZone (void) const;
373 SFBool
*editSFHasCosSpotlightAngle(void);
374 const SFBool
*getSFHasCosSpotlightAngle (void) const;
376 SFBool
*editSFHasSpotlightAngle(void);
377 const SFBool
*getSFHasSpotlightAngle (void) const;
379 SFBool
*editSFHasSpotExponent(void);
380 const SFBool
*getSFHasSpotExponent (void) const;
382 SFBool
*editSFHasCinemaLight (void);
383 const SFBool
*getSFHasCinemaLight (void) const;
385 SFBool
*editSFEyeSpace (void);
386 const SFBool
*getSFEyeSpace (void) const;
388 SFString
*editSFLightBlockName (void);
389 const SFString
*getSFLightBlockName (void) const;
391 SFString
*editSFLightVariableName(void);
392 const SFString
*getSFLightVariableName (void) const;
395 bool &editHasWorldToLightSpaceMatrix(void);
396 bool getHasWorldToLightSpaceMatrix (void) const;
398 bool &editHasLightToWorldSpaceMatrix(void);
399 bool getHasLightToWorldSpaceMatrix (void) const;
401 bool &editHasEyeToLightSpaceMatrix(void);
402 bool getHasEyeToLightSpaceMatrix (void) const;
404 bool &editHasLightToEyeSpaceMatrix(void);
405 bool getHasLightToEyeSpaceMatrix (void) const;
407 bool &editHasLightPerspectiveMatrix(void);
408 bool getHasLightPerspectiveMatrix (void) const;
410 bool &editHasInvLightPerspectiveMatrix(void);
411 bool getHasInvLightPerspectiveMatrix (void) const;
413 bool &editHasColor (void);
414 bool getHasColor (void) const;
416 bool &editHasIntensity (void);
417 bool getHasIntensity (void) const;
419 bool &editHasSeparateIntensities(void);
420 bool getHasSeparateIntensities (void) const;
422 bool &editHasAttenuation (void);
423 bool getHasAttenuation (void) const;
425 bool &editAutoCalcRanges (void);
426 bool getAutoCalcRanges (void) const;
428 bool &editHasRangeCutOn (void);
429 bool getHasRangeCutOn (void) const;
431 bool &editHasRangeCutOff (void);
432 bool getHasRangeCutOff (void) const;
434 bool &editHasRangeNearZone(void);
435 bool getHasRangeNearZone (void) const;
437 bool &editHasRangeFarZone(void);
438 bool getHasRangeFarZone (void) const;
440 bool &editHasCosSpotlightAngle(void);
441 bool getHasCosSpotlightAngle (void) const;
443 bool &editHasSpotlightAngle(void);
444 bool getHasSpotlightAngle (void) const;
446 bool &editHasSpotExponent(void);
447 bool getHasSpotExponent (void) const;
449 bool &editHasCinemaLight (void);
450 bool getHasCinemaLight (void) const;
452 bool &editEyeSpace (void);
453 bool getEyeSpace (void) const;
455 std::string
&editLightBlockName (void);
456 const std::string
&getLightBlockName (void) const;
458 std::string
&editLightVariableName(void);
459 const std::string
&getLightVariableName (void) const;
462 /*---------------------------------------------------------------------*/
463 /*! \name Field Set */
466 void setHasWorldToLightSpaceMatrix(const bool value
);
467 void setHasLightToWorldSpaceMatrix(const bool value
);
468 void setHasEyeToLightSpaceMatrix(const bool value
);
469 void setHasLightToEyeSpaceMatrix(const bool value
);
470 void setHasLightPerspectiveMatrix(const bool value
);
471 void setHasInvLightPerspectiveMatrix(const bool value
);
472 void setHasColor (const bool value
);
473 void setHasIntensity (const bool value
);
474 void setHasSeparateIntensities(const bool value
);
475 void setHasAttenuation (const bool value
);
476 void setAutoCalcRanges (const bool value
);
477 void setHasRangeCutOn (const bool value
);
478 void setHasRangeCutOff (const bool value
);
479 void setHasRangeNearZone(const bool value
);
480 void setHasRangeFarZone(const bool value
);
481 void setHasCosSpotlightAngle(const bool value
);
482 void setHasSpotlightAngle(const bool value
);
483 void setHasSpotExponent(const bool value
);
484 void setHasCinemaLight (const bool value
);
485 void setEyeSpace (const bool value
);
486 void setLightBlockName (const std::string
&value
);
487 void setLightVariableName(const std::string
&value
);
490 /*---------------------------------------------------------------------*/
491 /*! \name Ptr Field Set */
495 /*---------------------------------------------------------------------*/
496 /*! \name Ptr MField Set */
500 /*---------------------------------------------------------------------*/
501 /*! \name Binary Access */
504 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
505 virtual void copyToBin (BinaryDataHandler
&pMem
,
506 ConstFieldMaskArg whichField
);
507 virtual void copyFromBin(BinaryDataHandler
&pMem
,
508 ConstFieldMaskArg whichField
);
512 /*---------------------------------------------------------------------*/
513 /*! \name Construction */
516 static MultiLightChunkTransitPtr
create (void);
517 static MultiLightChunk
*createEmpty (void);
519 static MultiLightChunkTransitPtr
createLocal (
520 BitVector bFlags
= FCLocal::All
);
522 static MultiLightChunk
*createEmptyLocal(
523 BitVector bFlags
= FCLocal::All
);
525 static MultiLightChunkTransitPtr
createDependent (BitVector bFlags
);
528 /*---------------------------------------------------------------------*/
532 virtual FieldContainerTransitPtr
shallowCopy (void) const;
533 virtual FieldContainerTransitPtr
shallowCopyLocal(
534 BitVector bFlags
= FCLocal::All
) const;
535 virtual FieldContainerTransitPtr
shallowCopyDependent(
536 BitVector bFlags
) const;
539 /*========================= PROTECTED ===============================*/
543 static TypeObject _type
;
545 static void classDescInserter(TypeObject
&oType
);
546 static const Char8
*getClassname (void );
548 /*---------------------------------------------------------------------*/
552 SFBool _sfHasWorldToLightSpaceMatrix
;
553 SFBool _sfHasLightToWorldSpaceMatrix
;
554 SFBool _sfHasEyeToLightSpaceMatrix
;
555 SFBool _sfHasLightToEyeSpaceMatrix
;
556 SFBool _sfHasLightPerspectiveMatrix
;
557 SFBool _sfHasInvLightPerspectiveMatrix
;
559 SFBool _sfHasIntensity
;
560 SFBool _sfHasSeparateIntensities
;
561 SFBool _sfHasAttenuation
;
562 SFBool _sfAutoCalcRanges
;
563 SFBool _sfHasRangeCutOn
;
564 SFBool _sfHasRangeCutOff
;
565 SFBool _sfHasRangeNearZone
;
566 SFBool _sfHasRangeFarZone
;
567 SFBool _sfHasCosSpotlightAngle
;
568 SFBool _sfHasSpotlightAngle
;
569 SFBool _sfHasSpotExponent
;
570 SFBool _sfHasCinemaLight
;
572 MFVec3f _mfDirection
;
574 MFReal32 _mfIntensity
;
575 MFVec3f _mfAmbientIntensity
;
576 MFVec3f _mfDiffuseIntensity
;
577 MFVec3f _mfSpecularIntensity
;
578 MFVec3f _mfAttenuation
;
579 MFReal32 _mfSpotlightAngle
;
580 MFReal32 _mfSpotExponent
;
581 MFReal32 _mfInnerSuperEllipsesWidth
;
582 MFReal32 _mfInnerSuperEllipsesHeight
;
583 MFReal32 _mfOuterSuperEllipsesWidth
;
584 MFReal32 _mfOuterSuperEllipsesHeight
;
585 MFReal32 _mfSuperEllipsesRoundness
;
586 MFReal32 _mfSuperEllipsesTwist
;
587 MFReal32 _mfRangeCutOn
;
588 MFReal32 _mfRangeCutOff
;
589 MFReal32 _mfRangeNearZone
;
590 MFReal32 _mfRangeFarZone
;
593 MFWeakNodePtr _mfBeacon
;
594 MFMatrix _mfBeaconMatrix
;
596 SFReal32 _sfLastCamNear
;
597 SFReal32 _sfLastCamFar
;
598 SFMatrix _sfLastCamToWorld
;
599 SFString _sfLightBlockName
;
600 SFString _sfLightVariableName
;
603 /*---------------------------------------------------------------------*/
604 /*! \name Constructors */
607 MultiLightChunkBase(void);
608 MultiLightChunkBase(const MultiLightChunkBase
&source
);
611 /*---------------------------------------------------------------------*/
612 /*! \name Destructors */
615 virtual ~MultiLightChunkBase(void);
618 /*---------------------------------------------------------------------*/
619 /*! \name onCreate */
622 void onCreate(const MultiLightChunk
*source
= NULL
);
625 /*---------------------------------------------------------------------*/
626 /*! \name Generic Field Access */
629 GetFieldHandlePtr
getHandleHasWorldToLightSpaceMatrix (void) const;
630 EditFieldHandlePtr
editHandleHasWorldToLightSpaceMatrix(void);
631 GetFieldHandlePtr
getHandleHasLightToWorldSpaceMatrix (void) const;
632 EditFieldHandlePtr
editHandleHasLightToWorldSpaceMatrix(void);
633 GetFieldHandlePtr
getHandleHasEyeToLightSpaceMatrix (void) const;
634 EditFieldHandlePtr
editHandleHasEyeToLightSpaceMatrix(void);
635 GetFieldHandlePtr
getHandleHasLightToEyeSpaceMatrix (void) const;
636 EditFieldHandlePtr
editHandleHasLightToEyeSpaceMatrix(void);
637 GetFieldHandlePtr
getHandleHasLightPerspectiveMatrix (void) const;
638 EditFieldHandlePtr
editHandleHasLightPerspectiveMatrix(void);
639 GetFieldHandlePtr
getHandleHasInvLightPerspectiveMatrix (void) const;
640 EditFieldHandlePtr
editHandleHasInvLightPerspectiveMatrix(void);
641 GetFieldHandlePtr
getHandleHasColor (void) const;
642 EditFieldHandlePtr
editHandleHasColor (void);
643 GetFieldHandlePtr
getHandleHasIntensity (void) const;
644 EditFieldHandlePtr
editHandleHasIntensity (void);
645 GetFieldHandlePtr
getHandleHasSeparateIntensities (void) const;
646 EditFieldHandlePtr
editHandleHasSeparateIntensities(void);
647 GetFieldHandlePtr
getHandleHasAttenuation (void) const;
648 EditFieldHandlePtr
editHandleHasAttenuation (void);
649 GetFieldHandlePtr
getHandleAutoCalcRanges (void) const;
650 EditFieldHandlePtr
editHandleAutoCalcRanges (void);
651 GetFieldHandlePtr
getHandleHasRangeCutOn (void) const;
652 EditFieldHandlePtr
editHandleHasRangeCutOn (void);
653 GetFieldHandlePtr
getHandleHasRangeCutOff (void) const;
654 EditFieldHandlePtr
editHandleHasRangeCutOff (void);
655 GetFieldHandlePtr
getHandleHasRangeNearZone (void) const;
656 EditFieldHandlePtr
editHandleHasRangeNearZone(void);
657 GetFieldHandlePtr
getHandleHasRangeFarZone (void) const;
658 EditFieldHandlePtr
editHandleHasRangeFarZone(void);
659 GetFieldHandlePtr
getHandleHasCosSpotlightAngle (void) const;
660 EditFieldHandlePtr
editHandleHasCosSpotlightAngle(void);
661 GetFieldHandlePtr
getHandleHasSpotlightAngle (void) const;
662 EditFieldHandlePtr
editHandleHasSpotlightAngle(void);
663 GetFieldHandlePtr
getHandleHasSpotExponent (void) const;
664 EditFieldHandlePtr
editHandleHasSpotExponent(void);
665 GetFieldHandlePtr
getHandleHasCinemaLight (void) const;
666 EditFieldHandlePtr
editHandleHasCinemaLight (void);
667 GetFieldHandlePtr
getHandlePosition (void) const;
668 EditFieldHandlePtr
editHandlePosition (void);
669 GetFieldHandlePtr
getHandleDirection (void) const;
670 EditFieldHandlePtr
editHandleDirection (void);
671 GetFieldHandlePtr
getHandleColor (void) const;
672 EditFieldHandlePtr
editHandleColor (void);
673 GetFieldHandlePtr
getHandleIntensity (void) const;
674 EditFieldHandlePtr
editHandleIntensity (void);
675 GetFieldHandlePtr
getHandleAmbientIntensity (void) const;
676 EditFieldHandlePtr
editHandleAmbientIntensity(void);
677 GetFieldHandlePtr
getHandleDiffuseIntensity (void) const;
678 EditFieldHandlePtr
editHandleDiffuseIntensity(void);
679 GetFieldHandlePtr
getHandleSpecularIntensity (void) const;
680 EditFieldHandlePtr
editHandleSpecularIntensity(void);
681 GetFieldHandlePtr
getHandleAttenuation (void) const;
682 EditFieldHandlePtr
editHandleAttenuation (void);
683 GetFieldHandlePtr
getHandleSpotlightAngle (void) const;
684 EditFieldHandlePtr
editHandleSpotlightAngle (void);
685 GetFieldHandlePtr
getHandleSpotExponent (void) const;
686 EditFieldHandlePtr
editHandleSpotExponent (void);
687 GetFieldHandlePtr
getHandleInnerSuperEllipsesWidth (void) const;
688 EditFieldHandlePtr
editHandleInnerSuperEllipsesWidth(void);
689 GetFieldHandlePtr
getHandleInnerSuperEllipsesHeight (void) const;
690 EditFieldHandlePtr
editHandleInnerSuperEllipsesHeight(void);
691 GetFieldHandlePtr
getHandleOuterSuperEllipsesWidth (void) const;
692 EditFieldHandlePtr
editHandleOuterSuperEllipsesWidth(void);
693 GetFieldHandlePtr
getHandleOuterSuperEllipsesHeight (void) const;
694 EditFieldHandlePtr
editHandleOuterSuperEllipsesHeight(void);
695 GetFieldHandlePtr
getHandleSuperEllipsesRoundness (void) const;
696 EditFieldHandlePtr
editHandleSuperEllipsesRoundness(void);
697 GetFieldHandlePtr
getHandleSuperEllipsesTwist (void) const;
698 EditFieldHandlePtr
editHandleSuperEllipsesTwist(void);
699 GetFieldHandlePtr
getHandleRangeCutOn (void) const;
700 EditFieldHandlePtr
editHandleRangeCutOn (void);
701 GetFieldHandlePtr
getHandleRangeCutOff (void) const;
702 EditFieldHandlePtr
editHandleRangeCutOff (void);
703 GetFieldHandlePtr
getHandleRangeNearZone (void) const;
704 EditFieldHandlePtr
editHandleRangeNearZone (void);
705 GetFieldHandlePtr
getHandleRangeFarZone (void) const;
706 EditFieldHandlePtr
editHandleRangeFarZone (void);
707 GetFieldHandlePtr
getHandleType (void) const;
708 EditFieldHandlePtr
editHandleType (void);
709 GetFieldHandlePtr
getHandleEnabled (void) const;
710 EditFieldHandlePtr
editHandleEnabled (void);
711 GetFieldHandlePtr
getHandleBeacon (void) const;
712 EditFieldHandlePtr
editHandleBeacon (void);
713 GetFieldHandlePtr
getHandleBeaconMatrix (void) const;
714 EditFieldHandlePtr
editHandleBeaconMatrix (void);
715 GetFieldHandlePtr
getHandleEyeSpace (void) const;
716 EditFieldHandlePtr
editHandleEyeSpace (void);
717 GetFieldHandlePtr
getHandleLastCamNear (void) const;
718 EditFieldHandlePtr
editHandleLastCamNear (void);
719 GetFieldHandlePtr
getHandleLastCamFar (void) const;
720 EditFieldHandlePtr
editHandleLastCamFar (void);
721 GetFieldHandlePtr
getHandleLastCamToWorld (void) const;
722 EditFieldHandlePtr
editHandleLastCamToWorld (void);
723 GetFieldHandlePtr
getHandleLightBlockName (void) const;
724 EditFieldHandlePtr
editHandleLightBlockName (void);
725 GetFieldHandlePtr
getHandleLightVariableName (void) const;
726 EditFieldHandlePtr
editHandleLightVariableName(void);
729 /*---------------------------------------------------------------------*/
730 /*! \name Field Get */
734 MFPnt3f
*editMFPosition (void);
735 const MFPnt3f
*getMFPosition (void) const;
737 MFVec3f
*editMFDirection (void);
738 const MFVec3f
*getMFDirection (void) const;
740 MFColor3f
*editMFColor (void);
741 const MFColor3f
*getMFColor (void) const;
743 MFReal32
*editMFIntensity (void);
744 const MFReal32
*getMFIntensity (void) const;
746 MFVec3f
*editMFAmbientIntensity(void);
747 const MFVec3f
*getMFAmbientIntensity (void) const;
749 MFVec3f
*editMFDiffuseIntensity(void);
750 const MFVec3f
*getMFDiffuseIntensity (void) const;
752 MFVec3f
*editMFSpecularIntensity(void);
753 const MFVec3f
*getMFSpecularIntensity (void) const;
755 MFVec3f
*editMFAttenuation (void);
756 const MFVec3f
*getMFAttenuation (void) const;
758 MFReal32
*editMFSpotlightAngle (void);
759 const MFReal32
*getMFSpotlightAngle (void) const;
761 MFReal32
*editMFSpotExponent (void);
762 const MFReal32
*getMFSpotExponent (void) const;
764 MFReal32
*editMFInnerSuperEllipsesWidth(void);
765 const MFReal32
*getMFInnerSuperEllipsesWidth (void) const;
767 MFReal32
*editMFInnerSuperEllipsesHeight(void);
768 const MFReal32
*getMFInnerSuperEllipsesHeight (void) const;
770 MFReal32
*editMFOuterSuperEllipsesWidth(void);
771 const MFReal32
*getMFOuterSuperEllipsesWidth (void) const;
773 MFReal32
*editMFOuterSuperEllipsesHeight(void);
774 const MFReal32
*getMFOuterSuperEllipsesHeight (void) const;
776 MFReal32
*editMFSuperEllipsesRoundness(void);
777 const MFReal32
*getMFSuperEllipsesRoundness (void) const;
779 MFReal32
*editMFSuperEllipsesTwist(void);
780 const MFReal32
*getMFSuperEllipsesTwist (void) const;
782 MFReal32
*editMFRangeCutOn (void);
783 const MFReal32
*getMFRangeCutOn (void) const;
785 MFReal32
*editMFRangeCutOff (void);
786 const MFReal32
*getMFRangeCutOff (void) const;
788 MFReal32
*editMFRangeNearZone (void);
789 const MFReal32
*getMFRangeNearZone (void) const;
791 MFReal32
*editMFRangeFarZone (void);
792 const MFReal32
*getMFRangeFarZone (void) const;
794 MFUInt8
*editMFType (void);
795 const MFUInt8
*getMFType (void) const;
797 MFBool
*editMFEnabled (void);
798 const MFBool
*getMFEnabled (void) const;
799 const MFWeakNodePtr
*getMFBeacon (void) const;
800 MFWeakNodePtr
*editMFBeacon (void);
802 MFMatrix
*editMFBeaconMatrix (void);
803 const MFMatrix
*getMFBeaconMatrix (void) const;
805 SFReal32
*editSFLastCamNear (void);
806 const SFReal32
*getSFLastCamNear (void) const;
808 SFReal32
*editSFLastCamFar (void);
809 const SFReal32
*getSFLastCamFar (void) const;
811 SFMatrix
*editSFLastCamToWorld (void);
812 const SFMatrix
*getSFLastCamToWorld (void) const;
815 MFPnt3f ::reference
editPosition (const UInt32 index
);
816 const Pnt3f
&getPosition (const UInt32 index
) const;
818 MFVec3f ::reference
editDirection (const UInt32 index
);
819 const Vec3f
&getDirection (const UInt32 index
) const;
821 MFColor3f ::reference
editColor (const UInt32 index
);
822 const Color3f
&getColor (const UInt32 index
) const;
824 MFReal32 ::reference
editIntensity (const UInt32 index
);
825 Real32
getIntensity (const UInt32 index
) const;
827 MFVec3f ::reference
editAmbientIntensity(const UInt32 index
);
828 const Vec3f
&getAmbientIntensity (const UInt32 index
) const;
830 MFVec3f ::reference
editDiffuseIntensity(const UInt32 index
);
831 const Vec3f
&getDiffuseIntensity (const UInt32 index
) const;
833 MFVec3f ::reference
editSpecularIntensity(const UInt32 index
);
834 const Vec3f
&getSpecularIntensity (const UInt32 index
) const;
836 MFVec3f ::reference
editAttenuation (const UInt32 index
);
837 const Vec3f
&getAttenuation (const UInt32 index
) const;
839 MFReal32 ::reference
editSpotlightAngle (const UInt32 index
);
840 Real32
getSpotlightAngle (const UInt32 index
) const;
842 MFReal32 ::reference
editSpotExponent (const UInt32 index
);
843 Real32
getSpotExponent (const UInt32 index
) const;
845 MFReal32 ::reference
editInnerSuperEllipsesWidth(const UInt32 index
);
846 Real32
getInnerSuperEllipsesWidth (const UInt32 index
) const;
848 MFReal32 ::reference
editInnerSuperEllipsesHeight(const UInt32 index
);
849 Real32
getInnerSuperEllipsesHeight (const UInt32 index
) const;
851 MFReal32 ::reference
editOuterSuperEllipsesWidth(const UInt32 index
);
852 Real32
getOuterSuperEllipsesWidth (const UInt32 index
) const;
854 MFReal32 ::reference
editOuterSuperEllipsesHeight(const UInt32 index
);
855 Real32
getOuterSuperEllipsesHeight (const UInt32 index
) const;
857 MFReal32 ::reference
editSuperEllipsesRoundness(const UInt32 index
);
858 Real32
getSuperEllipsesRoundness (const UInt32 index
) const;
860 MFReal32 ::reference
editSuperEllipsesTwist(const UInt32 index
);
861 Real32
getSuperEllipsesTwist (const UInt32 index
) const;
863 MFReal32 ::reference
editRangeCutOn (const UInt32 index
);
864 Real32
getRangeCutOn (const UInt32 index
) const;
866 MFReal32 ::reference
editRangeCutOff (const UInt32 index
);
867 Real32
getRangeCutOff (const UInt32 index
) const;
869 MFReal32 ::reference
editRangeNearZone (const UInt32 index
);
870 Real32
getRangeNearZone (const UInt32 index
) const;
872 MFReal32 ::reference
editRangeFarZone (const UInt32 index
);
873 Real32
getRangeFarZone (const UInt32 index
) const;
875 MFUInt8 ::reference
editType (const UInt32 index
);
876 UInt8
getType (const UInt32 index
) const;
878 MFBool ::reference
editEnabled (const UInt32 index
);
879 bool getEnabled (const UInt32 index
) const;
881 Node
* getBeacon (const UInt32 index
) const;
883 MFMatrix ::reference
editBeaconMatrix (const UInt32 index
);
884 const Matrix
&getBeaconMatrix (const UInt32 index
) const;
886 Real32
&editLastCamNear (void);
887 Real32
getLastCamNear (void) const;
889 Real32
&editLastCamFar (void);
890 Real32
getLastCamFar (void) const;
892 Matrix
&editLastCamToWorld (void);
893 const Matrix
&getLastCamToWorld (void) const;
896 /*---------------------------------------------------------------------*/
897 /*! \name Field Set */
900 void setLastCamNear (const Real32 value
);
901 void setLastCamFar (const Real32 value
);
902 void setLastCamToWorld (const Matrix
&value
);
905 /*---------------------------------------------------------------------*/
906 /*! \name Ptr MField Set */
909 void pushToBeacon (Node
* const value
);
910 void assignBeacon (const MFWeakNodePtr
&value
);
911 void removeFromBeacon (UInt32 uiIndex
);
912 void removeObjFromBeacon(Node
* const value
);
913 void clearBeacon (void );
916 /*---------------------------------------------------------------------*/
920 #ifdef OSG_MT_CPTR_ASPECT
921 virtual void execSyncV( FieldContainer
&oFrom
,
922 ConstFieldMaskArg whichField
,
923 AspectOffsetStore
&oOffsets
,
924 ConstFieldMaskArg syncMode
,
925 const UInt32 uiSyncInfo
);
927 void execSync ( MultiLightChunkBase
*pFrom
,
928 ConstFieldMaskArg whichField
,
929 AspectOffsetStore
&oOffsets
,
930 ConstFieldMaskArg syncMode
,
931 const UInt32 uiSyncInfo
);
935 /*---------------------------------------------------------------------*/
940 /*---------------------------------------------------------------------*/
941 /*! \name Aspect Create */
944 #ifdef OSG_MT_CPTR_ASPECT
945 virtual FieldContainer
*createAspectCopy(
946 const FieldContainer
*pRefAspect
) const;
950 /*---------------------------------------------------------------------*/
954 /*---------------------------------------------------------------------*/
958 virtual void resolveLinks(void);
961 /*========================== PRIVATE ================================*/
964 /*---------------------------------------------------------------------*/
966 // prohibit default functions (move to 'public' if you need one)
967 void operator =(const MultiLightChunkBase
&source
);
970 typedef MultiLightChunkBase
*MultiLightChunkBaseP
;
974 #endif /* _OSGMULTILIGHTCHUNKBASE_H_ */