changed: gcc8 base update
[opensg.git] / Source / System / State / Base / OSGMultiLightChunkBase.cpp
blob6ec10f7a39fa75d8f6abca00904812923c0eac68
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 MultiLightChunk!
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
53 #include <cstdlib>
54 #include <cstdio>
56 #ifdef WIN32
57 #pragma warning(disable: 4355) // turn off 'this' : used in base member initializer list warning
58 #pragma warning(disable: 4290) // disable exception specification warning
59 #endif
61 #include "OSGConfig.h"
65 #include "OSGNode.h" // Beacon Class
67 #include "OSGMultiLightChunkBase.h"
68 #include "OSGMultiLightChunk.h"
70 #include <boost/bind.hpp>
72 OSG_BEGIN_NAMESPACE
74 /***************************************************************************\
75 * Description *
76 \***************************************************************************/
78 /*! \class OSG::MultiLightChunk
79 See \ref PageSystemMultiLightChunk for a description.
81 This chunk represents a number of lights that are exposed to shader code
82 in form of a buffer in OpenGL std430 layout format.
83 A shader, binding a shader storage block to the very same binding point,
84 is expected to respect the corresponding block layout. The layout is regulated
85 by the hasXXX fields of the chunk. If one is set to false the corresponding
86 struct entry is omitted.
88 struct Light
90 mat4 worldToLightSpaceMatrix;
91 mat4 lightToWorldSpaceMatrix;
92 mat4 eyeToLightSpaceMatrix;
93 mat4 lightToEyeSpaceMatrix;
94 mat4 lightPerspectiveMatrix;
95 mat4 invLightPerspectiveMatrix;
96 vec3 position;
97 vec3 direction;
98 vec3 color;
99 vec3 ambientIntensity;
100 vec3 diffuseIntensity;
101 vec3 specularIntensity;
102 float intensity;
103 float constantAttenuation;
104 float linearAttenuation;
105 float quadraticAttenuation;
106 float rangeCutOn;
107 float rangeCutOff;
108 float rangeNearZone;
109 float rangeFarZone;
110 float cosSpotlightAngle;
111 float spotlightAngle;
112 float spotExponent;
113 float innerSuperEllipsesWidth;
114 float innerSuperEllipsesHeight;
115 float outerSuperEllipsesWidth;
116 float outerSuperEllipsesHeight;
117 float superEllipsesRoundness;
118 float superEllipsesTwist;
119 int type;
120 bool enabled;
123 layout (std430) buffer Lights
125 Light light[];
126 } lights;
128 The chunk provides a convenient function that allows to adjust the struct layout
129 for standard OpenGL lights
131 struct Light
133 vec3 position;
134 vec3 direction;
135 vec3 ambientIntensity;
136 vec3 diffuseIntensity;
137 vec3 specularIntensity;
138 float constantAttenuation;
139 float linearAttenuation;
140 float quadraticAttenuation;
141 float cosSpotlightAngle;
142 float spotExponent;
143 int type;
144 bool enabled;
147 or for simple range lights:
149 struct Light
151 vec3 position;
152 vec3 direction;
153 vec3 color;
154 float intensity;
155 float rangeCutOff;
156 float cosSpotlightAngle;
157 int type;
158 bool enabled;
162 /***************************************************************************\
163 * Field Documentation *
164 \***************************************************************************/
166 /*! \var bool MultiLightChunkBase::_sfHasWorldToLightSpaceMatrix
167 This flag determines if the worldToLightSpaceMatrix attribute is part of
168 the shader storage block, i.e. if the "mat4 worldToLightSpaceMatrix;"
169 entry is contained in the shader struct for the Light.
172 /*! \var bool MultiLightChunkBase::_sfHasLightToWorldSpaceMatrix
173 This flag determines if the lightToWorldSpaceMatrix attribute is part of
174 the shader storage block, i.e. if the "mat4 lightToWorldSpaceMatrix;"
175 entry is contained in the shader struct for the Light.
178 /*! \var bool MultiLightChunkBase::_sfHasEyeToLightSpaceMatrix
179 This flag determines if the eyeToLightSpaceMatrix attribute is part of
180 the shader storage block, i.e. if the "mat4 eyeToLightSpaceMatrix;"
181 entry is contained in the shader struct for the Light.
182 Attention: If this flag is set the light shader storage block has to
183 be updated with every redraw operation.
186 /*! \var bool MultiLightChunkBase::_sfHasLightToEyeSpaceMatrix
187 This flag determines if the lightToEyeSpaceMatrix attribute is part of
188 the shader storage block, i.e. if the "mat4 lightToEyeSpaceMatrix;"
189 entry is contained in the shader struct for the Light.
190 Attention: If this flag is set the light shader storage block has to
191 be updated with every redraw operation.
194 /*! \var bool MultiLightChunkBase::_sfHasLightPerspectiveMatrix
195 This flag determines if the lightPerspectiveMatrix attribute is part of
196 the shader storage block, i.e. if the "mat4 lightPerspectiveMatrix;"
197 entry is contained in the shader struct for the Light.
200 /*! \var bool MultiLightChunkBase::_sfHasInvLightPerspectiveMatrix
201 This flag determines if the lightToEyeSpaceMatrix attribute is part of
202 the shader storage block, i.e. if the "mat4 invLightToEyeSpaceMatrix;"
203 entry is contained in the shader struct for the Light.
206 /*! \var bool MultiLightChunkBase::_sfHasColor
207 This flag determines if the color attribute is part of the shader storage block, i.e.
208 if the "vec3 color;" entry is contained in the shader struct for the Light.
211 /*! \var bool MultiLightChunkBase::_sfHasIntensity
212 This flag determines if the intensity attribute is part of the shader storage block, i.e.
213 if the "float intensity;" entry is contained in the shader struct for the Light.
216 /*! \var bool MultiLightChunkBase::_sfHasSeparateIntensities
217 This flag determines if the color intensity attributes are part of the shader storage block, i.e.
218 if the "vec3 Ia;", "vec3 Id;" and "vec3 Is;" entries are contained in the shader struct for the Light.
221 /*! \var bool MultiLightChunkBase::_sfHasAttenuation
222 This flag determines if the attenuation attributes are part of the shader storage block, i.e.
223 if the "float constantAttenuation;", "float linearAttenuation;" and "float quadraticAttenuation;"
224 entries are contained in the shader struct for the Light.
227 /*! \var bool MultiLightChunkBase::_sfAutoCalcRanges
228 If this flag is active and the lights have attenuations, then the cut on and cut off ranges
229 are automatically calculated. They are, however, not provided automatically to the shader.
230 For that, you have to set the hasRangeCutOn and hasRangeCutOff flags, respectively.
233 /*! \var bool MultiLightChunkBase::_sfHasRangeCutOn
234 This flag determines if the rangeCutOn attribute is part of the shader storage block, i.e.
235 if the "float rangeCutOn;" entry is contained in the shader struct for the Light.
238 /*! \var bool MultiLightChunkBase::_sfHasRangeCutOff
239 This flag determines if the hasRangeCutOff attribute is part of the shader storage block, i.e.
240 if the "float hasRangeCutOff;" entry is contained in the shader struct for the Light.
243 /*! \var bool MultiLightChunkBase::_sfHasRangeNearZone
244 This flag determines if the hasRangeNearZone attribute is part of the shader storage block, i.e.
245 if the "float hasRangeNearZone;" entry is contained in the shader struct for the Light.
248 /*! \var bool MultiLightChunkBase::_sfHasRangeFarZone
249 This flag determines if the hasRangeFarZone attribute is part of the shader storage block, i.e.
250 if the "float hasRangeFarZone;" entry is contained in the shader struct for the Light.
253 /*! \var bool MultiLightChunkBase::_sfHasCosSpotlightAngle
254 This flag determines if the cosine of the spot light angle attribute is part of the shader storage block, i.e.
255 if the "float cosSpotlightAngle;" entry is contained in the shader struct for the Light. If neither this flag
256 nor the hasSpotlightAngle flag is true, then this flag is treated as if it has value true.
259 /*! \var bool MultiLightChunkBase::_sfHasSpotlightAngle
260 This flag determines if the spot light angle attribute is part of the shader storage block, i.e.
261 if the "float spotlightAngle;" entry is contained in the shader struct for the Light. If neither this flag
262 nor the hasCosSpotlightAngle flag is true, then the hasCosSpotlightAngle flag is treated as if it has value true.
265 /*! \var bool MultiLightChunkBase::_sfHasSpotExponent
266 This flag determines if the spot expenent attribute is part of the shader storage block, i.e.
267 if the "float spotExponent;" entry is contained in the shader struct for the Light.
270 /*! \var bool MultiLightChunkBase::_sfHasCinemaLight
271 This flag determines if the cinema light attributes are part of the shader storage block, i.e.
272 if the "float innerSuperEllipsesWidth;", ... entries are contained in the shader struct for the Light.
273 If true this flag overrides the hasRangeCutOn, hasRangeCutOff, hasRangeNearZone and hasRangeFarZone
274 flags, because cinema lights are described the corresponding attributes.
275 See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html
276 http://www.yaldex.com/open-gl/ch12lev1sec4.html
277 https://en.wikipedia.org/wiki/Superellipse
280 /*! \var Pnt3f MultiLightChunkBase::_mfPosition
281 The light's position for point and spotlights in beacon space.
284 /*! \var Vec3f MultiLightChunkBase::_mfDirection
285 The light's direction for directional and spotlights in beacon space.
288 /*! \var Color3f MultiLightChunkBase::_mfColor
289 The light's color.
292 /*! \var Real32 MultiLightChunkBase::_mfIntensity
293 The light's intensity.
296 /*! \var Vec3f MultiLightChunkBase::_mfAmbientIntensity
297 The light's ambient intensity.
300 /*! \var Vec3f MultiLightChunkBase::_mfDiffuseIntensity
301 The light's diffuse intensity.
304 /*! \var Vec3f MultiLightChunkBase::_mfSpecularIntensity
305 The light's specular intensity.
308 /*! \var Vec3f MultiLightChunkBase::_mfAttenuation
309 The light's attenuation consiting of the constant, linear and quadratic attenuation parts.
312 /*! \var Real32 MultiLightChunkBase::_mfSpotlightAngle
313 The spot angle in degree.
316 /*! \var Real32 MultiLightChunkBase::_mfSpotExponent
317 The spot angle in degree.
320 /*! \var Real32 MultiLightChunkBase::_mfInnerSuperEllipsesWidth
321 The cinema light is described among others by an inner ellipses. This is
322 the width of this ellipse.
323 See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html
324 http://www.yaldex.com/open-gl/ch12lev1sec4.html
325 https://en.wikipedia.org/wiki/Superellipse
328 /*! \var Real32 MultiLightChunkBase::_mfInnerSuperEllipsesHeight
329 The cinema light is described among others by an inner ellipses. This is
330 the height of this ellipse.
331 See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html
332 http://www.yaldex.com/open-gl/ch12lev1sec4.html
333 https://en.wikipedia.org/wiki/Superellipse
336 /*! \var Real32 MultiLightChunkBase::_mfOuterSuperEllipsesWidth
337 The cinema light is described among others by an outer ellipses. This is
338 the width of this ellipse.
339 See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html
340 http://www.yaldex.com/open-gl/ch12lev1sec4.html
341 https://en.wikipedia.org/wiki/Superellipse
344 /*! \var Real32 MultiLightChunkBase::_mfOuterSuperEllipsesHeight
345 The cinema light is described among others by an outer ellipses. This is
346 the height of this ellipse.
347 See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html
348 http://www.yaldex.com/open-gl/ch12lev1sec4.html
349 https://en.wikipedia.org/wiki/Superellipse
352 /*! \var Real32 MultiLightChunkBase::_mfSuperEllipsesRoundness
353 The cinema light is described among others by a roundness parameter.
354 See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html
355 http://www.yaldex.com/open-gl/ch12lev1sec4.html
356 https://en.wikipedia.org/wiki/Superellipse
359 /*! \var Real32 MultiLightChunkBase::_mfSuperEllipsesTwist
360 The twist angle in degree by which the superellipses is rotatet in the xy-plane.
363 /*! \var Real32 MultiLightChunkBase::_mfRangeCutOn
364 The cinema light is described among others by a rangeCutOn parameter.
365 In the interval rangeCutOn to rangeCutOff the lighted fragments are
366 fully lit.
367 See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html
368 http://www.yaldex.com/open-gl/ch12lev1sec4.html
369 https://en.wikipedia.org/wiki/Superellipse
372 /*! \var Real32 MultiLightChunkBase::_mfRangeCutOff
373 The cinema light is described among others by a rangeCutOff parameter.
374 In the interval rangeCutOn to rangeCutOff the lighted fragments are
375 fully lit.
376 See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html
377 http://www.yaldex.com/open-gl/ch12lev1sec4.html
378 https://en.wikipedia.org/wiki/Superellipse
381 /*! \var Real32 MultiLightChunkBase::_mfRangeNearZone
382 The cinema light is described among others by a rangeNearZone parameter.
383 In the interval rangeCutOn-rangeNearZone to rangeCutOn the lighted fragments are
384 partly lit.
385 See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html
386 http://www.yaldex.com/open-gl/ch12lev1sec4.html
387 https://en.wikipedia.org/wiki/Superellipse
390 /*! \var Real32 MultiLightChunkBase::_mfRangeFarZone
391 In the interval rangeCutOff to rangeCutOff+rangeFarZone the lighted fragments are
392 partly lit.
395 /*! \var UInt8 MultiLightChunkBase::_mfType
396 Stores the light's type. This can be any of the set {POINT_LIGHT, DIRECTIONAL_LIGHT, SPOT_LIGHT, CINEMA_LIGHT}.
399 /*! \var bool MultiLightChunkBase::_mfEnabled
400 The on/off state of the light.
403 /*! \var Node * MultiLightChunkBase::_mfBeacon
404 The light's beacon determining its position or direction.
407 /*! \var Matrix MultiLightChunkBase::_mfBeaconMatrix
408 The beacon matrices used for the last render pass.
411 /*! \var bool MultiLightChunkBase::_sfEyeSpace
412 The lights position and direction are transformed to eye space before loading into the shader.
413 On default they are provided in world space.
416 /*! \var Real32 MultiLightChunkBase::_sfLastCamNear
417 The camera last near value.
420 /*! \var Real32 MultiLightChunkBase::_sfLastCamFar
421 The camera last far value.
424 /*! \var Matrix MultiLightChunkBase::_sfLastCamToWorld
425 The camera last to world matrix.
428 /*! \var std::string MultiLightChunkBase::_sfLightBlockName
429 The shader storage buffer block name for the light buffer.
432 /*! \var std::string MultiLightChunkBase::_sfLightVariableName
433 The shader variable name for the light buffer.
437 /***************************************************************************\
438 * FieldType/FieldTrait Instantiation *
439 \***************************************************************************/
441 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
442 PointerType FieldTraits<MultiLightChunk *, nsOSG>::_type(
443 "MultiLightChunkPtr",
444 "ShaderStorageBufferObjStdLayoutChunkPtr",
445 MultiLightChunk::getClassType(),
446 nsOSG);
447 #endif
449 OSG_FIELDTRAITS_GETTYPE_NS(MultiLightChunk *, nsOSG)
451 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField,
452 MultiLightChunk *,
453 nsOSG)
455 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField,
456 MultiLightChunk *,
457 nsOSG)
459 /***************************************************************************\
460 * Field Description *
461 \***************************************************************************/
463 void MultiLightChunkBase::classDescInserter(TypeObject &oType)
465 FieldDescriptionBase *pDesc = NULL;
468 pDesc = new SFBool::Description(
469 SFBool::getClassType(),
470 "hasWorldToLightSpaceMatrix",
471 "This flag determines if the worldToLightSpaceMatrix attribute is part of \n"
472 "the shader storage block, i.e. if the \"mat4 worldToLightSpaceMatrix;\" \n"
473 "entry is contained in the shader struct for the Light.\n",
474 HasWorldToLightSpaceMatrixFieldId, HasWorldToLightSpaceMatrixFieldMask,
475 false,
476 (Field::SFDefaultFlags | Field::FStdAccess),
477 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleHasWorldToLightSpaceMatrix),
478 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleHasWorldToLightSpaceMatrix));
480 oType.addInitialDesc(pDesc);
482 pDesc = new SFBool::Description(
483 SFBool::getClassType(),
484 "hasLightToWorldSpaceMatrix",
485 "This flag determines if the lightToWorldSpaceMatrix attribute is part of \n"
486 "the shader storage block, i.e. if the \"mat4 lightToWorldSpaceMatrix;\" \n"
487 "entry is contained in the shader struct for the Light.\n",
488 HasLightToWorldSpaceMatrixFieldId, HasLightToWorldSpaceMatrixFieldMask,
489 false,
490 (Field::SFDefaultFlags | Field::FStdAccess),
491 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleHasLightToWorldSpaceMatrix),
492 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleHasLightToWorldSpaceMatrix));
494 oType.addInitialDesc(pDesc);
496 pDesc = new SFBool::Description(
497 SFBool::getClassType(),
498 "hasEyeToLightSpaceMatrix",
499 "This flag determines if the eyeToLightSpaceMatrix attribute is part of \n"
500 "the shader storage block, i.e. if the \"mat4 eyeToLightSpaceMatrix;\" \n"
501 "entry is contained in the shader struct for the Light.\n"
502 "Attention: If this flag is set the light shader storage block has to\n"
503 "be updated with every redraw operation.\n",
504 HasEyeToLightSpaceMatrixFieldId, HasEyeToLightSpaceMatrixFieldMask,
505 false,
506 (Field::SFDefaultFlags | Field::FStdAccess),
507 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleHasEyeToLightSpaceMatrix),
508 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleHasEyeToLightSpaceMatrix));
510 oType.addInitialDesc(pDesc);
512 pDesc = new SFBool::Description(
513 SFBool::getClassType(),
514 "hasLightToEyeSpaceMatrix",
515 "This flag determines if the lightToEyeSpaceMatrix attribute is part of \n"
516 "the shader storage block, i.e. if the \"mat4 lightToEyeSpaceMatrix;\" \n"
517 "entry is contained in the shader struct for the Light.\n"
518 "Attention: If this flag is set the light shader storage block has to\n"
519 "be updated with every redraw operation.\n",
520 HasLightToEyeSpaceMatrixFieldId, HasLightToEyeSpaceMatrixFieldMask,
521 false,
522 (Field::SFDefaultFlags | Field::FStdAccess),
523 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleHasLightToEyeSpaceMatrix),
524 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleHasLightToEyeSpaceMatrix));
526 oType.addInitialDesc(pDesc);
528 pDesc = new SFBool::Description(
529 SFBool::getClassType(),
530 "hasLightPerspectiveMatrix",
531 "This flag determines if the lightPerspectiveMatrix attribute is part of \n"
532 "the shader storage block, i.e. if the \"mat4 lightPerspectiveMatrix;\" \n"
533 "entry is contained in the shader struct for the Light.\n",
534 HasLightPerspectiveMatrixFieldId, HasLightPerspectiveMatrixFieldMask,
535 false,
536 (Field::SFDefaultFlags | Field::FStdAccess),
537 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleHasLightPerspectiveMatrix),
538 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleHasLightPerspectiveMatrix));
540 oType.addInitialDesc(pDesc);
542 pDesc = new SFBool::Description(
543 SFBool::getClassType(),
544 "hasInvLightPerspectiveMatrix",
545 "This flag determines if the lightToEyeSpaceMatrix attribute is part of \n"
546 "the shader storage block, i.e. if the \"mat4 invLightToEyeSpaceMatrix;\" \n"
547 "entry is contained in the shader struct for the Light.\n",
548 HasInvLightPerspectiveMatrixFieldId, HasInvLightPerspectiveMatrixFieldMask,
549 false,
550 (Field::SFDefaultFlags | Field::FStdAccess),
551 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleHasInvLightPerspectiveMatrix),
552 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleHasInvLightPerspectiveMatrix));
554 oType.addInitialDesc(pDesc);
556 pDesc = new SFBool::Description(
557 SFBool::getClassType(),
558 "hasColor",
559 "This flag determines if the color attribute is part of the shader storage block, i.e.\n"
560 "if the \"vec3 color;\" entry is contained in the shader struct for the Light.\n",
561 HasColorFieldId, HasColorFieldMask,
562 false,
563 (Field::SFDefaultFlags | Field::FStdAccess),
564 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleHasColor),
565 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleHasColor));
567 oType.addInitialDesc(pDesc);
569 pDesc = new SFBool::Description(
570 SFBool::getClassType(),
571 "hasIntensity",
572 "This flag determines if the intensity attribute is part of the shader storage block, i.e.\n"
573 "if the \"float intensity;\" entry is contained in the shader struct for the Light.\n",
574 HasIntensityFieldId, HasIntensityFieldMask,
575 false,
576 (Field::SFDefaultFlags | Field::FStdAccess),
577 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleHasIntensity),
578 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleHasIntensity));
580 oType.addInitialDesc(pDesc);
582 pDesc = new SFBool::Description(
583 SFBool::getClassType(),
584 "hasSeparateIntensities",
585 "This flag determines if the color intensity attributes are part of the shader storage block, i.e.\n"
586 "if the \"vec3 Ia;\", \"vec3 Id;\" and \"vec3 Is;\" entries are contained in the shader struct for the Light.\n",
587 HasSeparateIntensitiesFieldId, HasSeparateIntensitiesFieldMask,
588 false,
589 (Field::SFDefaultFlags | Field::FStdAccess),
590 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleHasSeparateIntensities),
591 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleHasSeparateIntensities));
593 oType.addInitialDesc(pDesc);
595 pDesc = new SFBool::Description(
596 SFBool::getClassType(),
597 "hasAttenuation",
598 "This flag determines if the attenuation attributes are part of the shader storage block, i.e.\n"
599 "if the \"float constantAttenuation;\", \"float linearAttenuation;\" and \"float quadraticAttenuation;\"\n"
600 "entries are contained in the shader struct for the Light.\n",
601 HasAttenuationFieldId, HasAttenuationFieldMask,
602 false,
603 (Field::SFDefaultFlags | Field::FStdAccess),
604 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleHasAttenuation),
605 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleHasAttenuation));
607 oType.addInitialDesc(pDesc);
609 pDesc = new SFBool::Description(
610 SFBool::getClassType(),
611 "autoCalcRanges",
612 "If this flag is active and the lights have attenuations, then the cut on and cut off ranges\n"
613 "are automatically calculated. They are, however, not provided automatically to the shader.\n"
614 "For that, you have to set the hasRangeCutOn and hasRangeCutOff flags, respectively.\n",
615 AutoCalcRangesFieldId, AutoCalcRangesFieldMask,
616 false,
617 (Field::SFDefaultFlags | Field::FStdAccess),
618 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleAutoCalcRanges),
619 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleAutoCalcRanges));
621 oType.addInitialDesc(pDesc);
623 pDesc = new SFBool::Description(
624 SFBool::getClassType(),
625 "hasRangeCutOn",
626 "This flag determines if the rangeCutOn attribute is part of the shader storage block, i.e.\n"
627 "if the \"float rangeCutOn;\" entry is contained in the shader struct for the Light.\n",
628 HasRangeCutOnFieldId, HasRangeCutOnFieldMask,
629 false,
630 (Field::SFDefaultFlags | Field::FStdAccess),
631 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleHasRangeCutOn),
632 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleHasRangeCutOn));
634 oType.addInitialDesc(pDesc);
636 pDesc = new SFBool::Description(
637 SFBool::getClassType(),
638 "hasRangeCutOff",
639 "This flag determines if the hasRangeCutOff attribute is part of the shader storage block, i.e.\n"
640 "if the \"float hasRangeCutOff;\" entry is contained in the shader struct for the Light.\n",
641 HasRangeCutOffFieldId, HasRangeCutOffFieldMask,
642 false,
643 (Field::SFDefaultFlags | Field::FStdAccess),
644 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleHasRangeCutOff),
645 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleHasRangeCutOff));
647 oType.addInitialDesc(pDesc);
649 pDesc = new SFBool::Description(
650 SFBool::getClassType(),
651 "hasRangeNearZone",
652 "This flag determines if the hasRangeNearZone attribute is part of the shader storage block, i.e.\n"
653 "if the \"float hasRangeNearZone;\" entry is contained in the shader struct for the Light.\n",
654 HasRangeNearZoneFieldId, HasRangeNearZoneFieldMask,
655 false,
656 (Field::SFDefaultFlags | Field::FStdAccess),
657 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleHasRangeNearZone),
658 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleHasRangeNearZone));
660 oType.addInitialDesc(pDesc);
662 pDesc = new SFBool::Description(
663 SFBool::getClassType(),
664 "hasRangeFarZone",
665 "This flag determines if the hasRangeFarZone attribute is part of the shader storage block, i.e.\n"
666 "if the \"float hasRangeFarZone;\" entry is contained in the shader struct for the Light.\n",
667 HasRangeFarZoneFieldId, HasRangeFarZoneFieldMask,
668 false,
669 (Field::SFDefaultFlags | Field::FStdAccess),
670 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleHasRangeFarZone),
671 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleHasRangeFarZone));
673 oType.addInitialDesc(pDesc);
675 pDesc = new SFBool::Description(
676 SFBool::getClassType(),
677 "hasCosSpotlightAngle",
678 "This flag determines if the cosine of the spot light angle attribute is part of the shader storage block, i.e.\n"
679 "if the \"float cosSpotlightAngle;\" entry is contained in the shader struct for the Light. If neither this flag\n"
680 "nor the hasSpotlightAngle flag is true, then this flag is treated as if it has value true.\n",
681 HasCosSpotlightAngleFieldId, HasCosSpotlightAngleFieldMask,
682 false,
683 (Field::SFDefaultFlags | Field::FStdAccess),
684 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleHasCosSpotlightAngle),
685 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleHasCosSpotlightAngle));
687 oType.addInitialDesc(pDesc);
689 pDesc = new SFBool::Description(
690 SFBool::getClassType(),
691 "hasSpotlightAngle",
692 "This flag determines if the spot light angle attribute is part of the shader storage block, i.e.\n"
693 "if the \"float spotlightAngle;\" entry is contained in the shader struct for the Light. If neither this flag\n"
694 "nor the hasCosSpotlightAngle flag is true, then the hasCosSpotlightAngle flag is treated as if it has value true.\n",
695 HasSpotlightAngleFieldId, HasSpotlightAngleFieldMask,
696 false,
697 (Field::SFDefaultFlags | Field::FStdAccess),
698 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleHasSpotlightAngle),
699 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleHasSpotlightAngle));
701 oType.addInitialDesc(pDesc);
703 pDesc = new SFBool::Description(
704 SFBool::getClassType(),
705 "hasSpotExponent",
706 "This flag determines if the spot expenent attribute is part of the shader storage block, i.e.\n"
707 "if the \"float spotExponent;\" entry is contained in the shader struct for the Light.\n",
708 HasSpotExponentFieldId, HasSpotExponentFieldMask,
709 false,
710 (Field::SFDefaultFlags | Field::FStdAccess),
711 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleHasSpotExponent),
712 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleHasSpotExponent));
714 oType.addInitialDesc(pDesc);
716 pDesc = new SFBool::Description(
717 SFBool::getClassType(),
718 "hasCinemaLight",
719 "This flag determines if the cinema light attributes are part of the shader storage block, i.e.\n"
720 "if the \"float innerSuperEllipsesWidth;\", ... entries are contained in the shader struct for the Light.\n"
721 "If true this flag overrides the hasRangeCutOn, hasRangeCutOff, hasRangeNearZone and hasRangeFarZone\n"
722 "flags, because cinema lights are described the corresponding attributes.\n"
723 "See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html\n"
724 "http://www.yaldex.com/open-gl/ch12lev1sec4.html\n"
725 "https://en.wikipedia.org/wiki/Superellipse\n",
726 HasCinemaLightFieldId, HasCinemaLightFieldMask,
727 false,
728 (Field::SFDefaultFlags | Field::FStdAccess),
729 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleHasCinemaLight),
730 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleHasCinemaLight));
732 oType.addInitialDesc(pDesc);
734 pDesc = new MFPnt3f::Description(
735 MFPnt3f::getClassType(),
736 "position",
737 "The light's position for point and spotlights in beacon space.\n",
738 PositionFieldId, PositionFieldMask,
739 false,
740 (Field::MFDefaultFlags | Field::FStdAccess),
741 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandlePosition),
742 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandlePosition));
744 oType.addInitialDesc(pDesc);
746 pDesc = new MFVec3f::Description(
747 MFVec3f::getClassType(),
748 "direction",
749 "The light's direction for directional and spotlights in beacon space.\n",
750 DirectionFieldId, DirectionFieldMask,
751 false,
752 (Field::MFDefaultFlags | Field::FStdAccess),
753 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleDirection),
754 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleDirection));
756 oType.addInitialDesc(pDesc);
758 pDesc = new MFColor3f::Description(
759 MFColor3f::getClassType(),
760 "color",
761 "The light's color.\n",
762 ColorFieldId, ColorFieldMask,
763 false,
764 (Field::MFDefaultFlags | Field::FStdAccess),
765 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleColor),
766 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleColor));
768 oType.addInitialDesc(pDesc);
770 pDesc = new MFReal32::Description(
771 MFReal32::getClassType(),
772 "intensity",
773 "The light's intensity.\n",
774 IntensityFieldId, IntensityFieldMask,
775 false,
776 (Field::MFDefaultFlags | Field::FStdAccess),
777 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleIntensity),
778 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleIntensity));
780 oType.addInitialDesc(pDesc);
782 pDesc = new MFVec3f::Description(
783 MFVec3f::getClassType(),
784 "ambientIntensity",
785 "The light's ambient intensity.\n",
786 AmbientIntensityFieldId, AmbientIntensityFieldMask,
787 false,
788 (Field::MFDefaultFlags | Field::FStdAccess),
789 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleAmbientIntensity),
790 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleAmbientIntensity));
792 oType.addInitialDesc(pDesc);
794 pDesc = new MFVec3f::Description(
795 MFVec3f::getClassType(),
796 "diffuseIntensity",
797 "The light's diffuse intensity.\n",
798 DiffuseIntensityFieldId, DiffuseIntensityFieldMask,
799 false,
800 (Field::MFDefaultFlags | Field::FStdAccess),
801 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleDiffuseIntensity),
802 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleDiffuseIntensity));
804 oType.addInitialDesc(pDesc);
806 pDesc = new MFVec3f::Description(
807 MFVec3f::getClassType(),
808 "specularIntensity",
809 "The light's specular intensity.\n",
810 SpecularIntensityFieldId, SpecularIntensityFieldMask,
811 false,
812 (Field::MFDefaultFlags | Field::FStdAccess),
813 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleSpecularIntensity),
814 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleSpecularIntensity));
816 oType.addInitialDesc(pDesc);
818 pDesc = new MFVec3f::Description(
819 MFVec3f::getClassType(),
820 "attenuation",
821 "The light's attenuation consiting of the constant, linear and quadratic attenuation parts.\n",
822 AttenuationFieldId, AttenuationFieldMask,
823 false,
824 (Field::MFDefaultFlags | Field::FStdAccess),
825 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleAttenuation),
826 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleAttenuation));
828 oType.addInitialDesc(pDesc);
830 pDesc = new MFReal32::Description(
831 MFReal32::getClassType(),
832 "spotlightAngle",
833 "The spot angle in degree.\n",
834 SpotlightAngleFieldId, SpotlightAngleFieldMask,
835 false,
836 (Field::MFDefaultFlags | Field::FStdAccess),
837 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleSpotlightAngle),
838 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleSpotlightAngle));
840 oType.addInitialDesc(pDesc);
842 pDesc = new MFReal32::Description(
843 MFReal32::getClassType(),
844 "spotExponent",
845 "The spot angle in degree.\n",
846 SpotExponentFieldId, SpotExponentFieldMask,
847 false,
848 (Field::MFDefaultFlags | Field::FStdAccess),
849 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleSpotExponent),
850 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleSpotExponent));
852 oType.addInitialDesc(pDesc);
854 pDesc = new MFReal32::Description(
855 MFReal32::getClassType(),
856 "innerSuperEllipsesWidth",
857 "The cinema light is described among others by an inner ellipses. This is\n"
858 "the width of this ellipse.\n"
859 "See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html\n"
860 "http://www.yaldex.com/open-gl/ch12lev1sec4.html\n"
861 "https://en.wikipedia.org/wiki/Superellipse\n",
862 InnerSuperEllipsesWidthFieldId, InnerSuperEllipsesWidthFieldMask,
863 false,
864 (Field::MFDefaultFlags | Field::FStdAccess),
865 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleInnerSuperEllipsesWidth),
866 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleInnerSuperEllipsesWidth));
868 oType.addInitialDesc(pDesc);
870 pDesc = new MFReal32::Description(
871 MFReal32::getClassType(),
872 "innerSuperEllipsesHeight",
873 "The cinema light is described among others by an inner ellipses. This is\n"
874 "the height of this ellipse.\n"
875 "See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html\n"
876 "http://www.yaldex.com/open-gl/ch12lev1sec4.html\n"
877 "https://en.wikipedia.org/wiki/Superellipse\n",
878 InnerSuperEllipsesHeightFieldId, InnerSuperEllipsesHeightFieldMask,
879 false,
880 (Field::MFDefaultFlags | Field::FStdAccess),
881 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleInnerSuperEllipsesHeight),
882 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleInnerSuperEllipsesHeight));
884 oType.addInitialDesc(pDesc);
886 pDesc = new MFReal32::Description(
887 MFReal32::getClassType(),
888 "outerSuperEllipsesWidth",
889 "The cinema light is described among others by an outer ellipses. This is\n"
890 "the width of this ellipse.\n"
891 "See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html\n"
892 "http://www.yaldex.com/open-gl/ch12lev1sec4.html\n"
893 "https://en.wikipedia.org/wiki/Superellipse\n",
894 OuterSuperEllipsesWidthFieldId, OuterSuperEllipsesWidthFieldMask,
895 false,
896 (Field::MFDefaultFlags | Field::FStdAccess),
897 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleOuterSuperEllipsesWidth),
898 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleOuterSuperEllipsesWidth));
900 oType.addInitialDesc(pDesc);
902 pDesc = new MFReal32::Description(
903 MFReal32::getClassType(),
904 "outerSuperEllipsesHeight",
905 "The cinema light is described among others by an outer ellipses. This is\n"
906 "the height of this ellipse.\n"
907 "See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html\n"
908 "http://www.yaldex.com/open-gl/ch12lev1sec4.html\n"
909 "https://en.wikipedia.org/wiki/Superellipse\n",
910 OuterSuperEllipsesHeightFieldId, OuterSuperEllipsesHeightFieldMask,
911 false,
912 (Field::MFDefaultFlags | Field::FStdAccess),
913 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleOuterSuperEllipsesHeight),
914 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleOuterSuperEllipsesHeight));
916 oType.addInitialDesc(pDesc);
918 pDesc = new MFReal32::Description(
919 MFReal32::getClassType(),
920 "superEllipsesRoundness",
921 "The cinema light is described among others by a roundness parameter. \n"
922 "See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html\n"
923 "http://www.yaldex.com/open-gl/ch12lev1sec4.html\n"
924 "https://en.wikipedia.org/wiki/Superellipse\n",
925 SuperEllipsesRoundnessFieldId, SuperEllipsesRoundnessFieldMask,
926 false,
927 (Field::MFDefaultFlags | Field::FStdAccess),
928 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleSuperEllipsesRoundness),
929 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleSuperEllipsesRoundness));
931 oType.addInitialDesc(pDesc);
933 pDesc = new MFReal32::Description(
934 MFReal32::getClassType(),
935 "superEllipsesTwist",
936 "The twist angle in degree by which the superellipses is rotatet in the xy-plane.\n",
937 SuperEllipsesTwistFieldId, SuperEllipsesTwistFieldMask,
938 false,
939 (Field::MFDefaultFlags | Field::FStdAccess),
940 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleSuperEllipsesTwist),
941 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleSuperEllipsesTwist));
943 oType.addInitialDesc(pDesc);
945 pDesc = new MFReal32::Description(
946 MFReal32::getClassType(),
947 "rangeCutOn",
948 "The cinema light is described among others by a rangeCutOn parameter.\n"
949 "In the interval rangeCutOn to rangeCutOff the lighted fragments are\n"
950 "fully lit.\n"
951 "See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html\n"
952 "http://www.yaldex.com/open-gl/ch12lev1sec4.html\n"
953 "https://en.wikipedia.org/wiki/Superellipse\n",
954 RangeCutOnFieldId, RangeCutOnFieldMask,
955 false,
956 (Field::MFDefaultFlags | Field::FStdAccess),
957 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleRangeCutOn),
958 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleRangeCutOn));
960 oType.addInitialDesc(pDesc);
962 pDesc = new MFReal32::Description(
963 MFReal32::getClassType(),
964 "rangeCutOff",
965 "The cinema light is described among others by a rangeCutOff parameter.\n"
966 "In the interval rangeCutOn to rangeCutOff the lighted fragments are\n"
967 "fully lit.\n"
968 "See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html\n"
969 "http://www.yaldex.com/open-gl/ch12lev1sec4.html\n"
970 "https://en.wikipedia.org/wiki/Superellipse\n",
971 RangeCutOffFieldId, RangeCutOffFieldMask,
972 false,
973 (Field::MFDefaultFlags | Field::FStdAccess),
974 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleRangeCutOff),
975 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleRangeCutOff));
977 oType.addInitialDesc(pDesc);
979 pDesc = new MFReal32::Description(
980 MFReal32::getClassType(),
981 "rangeNearZone",
982 "The cinema light is described among others by a rangeNearZone parameter.\n"
983 "In the interval rangeCutOn-rangeNearZone to rangeCutOn the lighted fragments are\n"
984 "partly lit.\n"
985 "See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html\n"
986 "http://www.yaldex.com/open-gl/ch12lev1sec4.html\n"
987 "https://en.wikipedia.org/wiki/Superellipse\n",
988 RangeNearZoneFieldId, RangeNearZoneFieldMask,
989 false,
990 (Field::MFDefaultFlags | Field::FStdAccess),
991 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleRangeNearZone),
992 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleRangeNearZone));
994 oType.addInitialDesc(pDesc);
996 pDesc = new MFReal32::Description(
997 MFReal32::getClassType(),
998 "rangeFarZone",
999 "In the interval rangeCutOff to rangeCutOff+rangeFarZone the lighted fragments are\n"
1000 "partly lit.\n",
1001 RangeFarZoneFieldId, RangeFarZoneFieldMask,
1002 false,
1003 (Field::MFDefaultFlags | Field::FStdAccess),
1004 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleRangeFarZone),
1005 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleRangeFarZone));
1007 oType.addInitialDesc(pDesc);
1009 pDesc = new MFUInt8::Description(
1010 MFUInt8::getClassType(),
1011 "type",
1012 "Stores the light's type. This can be any of the set {POINT_LIGHT, DIRECTIONAL_LIGHT, SPOT_LIGHT, CINEMA_LIGHT}.\n",
1013 TypeFieldId, TypeFieldMask,
1014 false,
1015 (Field::MFDefaultFlags | Field::FStdAccess),
1016 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleType),
1017 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleType));
1019 oType.addInitialDesc(pDesc);
1021 pDesc = new MFBool::Description(
1022 MFBool::getClassType(),
1023 "enabled",
1024 "The on/off state of the light.\n",
1025 EnabledFieldId, EnabledFieldMask,
1026 false,
1027 (Field::MFDefaultFlags | Field::FStdAccess),
1028 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleEnabled),
1029 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleEnabled));
1031 oType.addInitialDesc(pDesc);
1033 pDesc = new MFWeakNodePtr::Description(
1034 MFWeakNodePtr::getClassType(),
1035 "beacon",
1036 "The light's beacon determining its position or direction.\n",
1037 BeaconFieldId, BeaconFieldMask,
1038 false,
1039 (Field::MFDefaultFlags | Field::FStdAccess),
1040 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleBeacon),
1041 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleBeacon));
1043 oType.addInitialDesc(pDesc);
1045 pDesc = new MFMatrix::Description(
1046 MFMatrix::getClassType(),
1047 "beaconMatrix",
1048 "The beacon matrices used for the last render pass.\n",
1049 BeaconMatrixFieldId, BeaconMatrixFieldMask,
1050 true,
1051 (Field::MFDefaultFlags | Field::FStdAccess),
1052 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleBeaconMatrix),
1053 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleBeaconMatrix));
1055 oType.addInitialDesc(pDesc);
1057 pDesc = new SFBool::Description(
1058 SFBool::getClassType(),
1059 "eyeSpace",
1060 "The lights position and direction are transformed to eye space before loading into the shader. \n"
1061 "On default they are provided in world space.\n",
1062 EyeSpaceFieldId, EyeSpaceFieldMask,
1063 false,
1064 (Field::SFDefaultFlags | Field::FStdAccess),
1065 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleEyeSpace),
1066 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleEyeSpace));
1068 oType.addInitialDesc(pDesc);
1070 pDesc = new SFReal32::Description(
1071 SFReal32::getClassType(),
1072 "lastCamNear",
1073 "The camera last near value.\n",
1074 LastCamNearFieldId, LastCamNearFieldMask,
1075 true,
1076 (Field::SFDefaultFlags | Field::FStdAccess),
1077 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleLastCamNear),
1078 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleLastCamNear));
1080 oType.addInitialDesc(pDesc);
1082 pDesc = new SFReal32::Description(
1083 SFReal32::getClassType(),
1084 "lastCamFar",
1085 "The camera last far value.\n",
1086 LastCamFarFieldId, LastCamFarFieldMask,
1087 true,
1088 (Field::SFDefaultFlags | Field::FStdAccess),
1089 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleLastCamFar),
1090 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleLastCamFar));
1092 oType.addInitialDesc(pDesc);
1094 pDesc = new SFMatrix::Description(
1095 SFMatrix::getClassType(),
1096 "lastCamToWorld",
1097 "The camera last to world matrix.\n",
1098 LastCamToWorldFieldId, LastCamToWorldFieldMask,
1099 true,
1100 (Field::SFDefaultFlags | Field::FStdAccess),
1101 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleLastCamToWorld),
1102 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleLastCamToWorld));
1104 oType.addInitialDesc(pDesc);
1106 pDesc = new SFString::Description(
1107 SFString::getClassType(),
1108 "LightBlockName",
1109 "The shader storage buffer block name for the light buffer.\n",
1110 LightBlockNameFieldId, LightBlockNameFieldMask,
1111 false,
1112 (Field::SFDefaultFlags | Field::FStdAccess),
1113 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleLightBlockName),
1114 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleLightBlockName));
1116 oType.addInitialDesc(pDesc);
1118 pDesc = new SFString::Description(
1119 SFString::getClassType(),
1120 "LightVariableName",
1121 "The shader variable name for the light buffer.\n",
1122 LightVariableNameFieldId, LightVariableNameFieldMask,
1123 false,
1124 (Field::SFDefaultFlags | Field::FStdAccess),
1125 static_cast<FieldEditMethodSig>(&MultiLightChunk::editHandleLightVariableName),
1126 static_cast<FieldGetMethodSig >(&MultiLightChunk::getHandleLightVariableName));
1128 oType.addInitialDesc(pDesc);
1132 MultiLightChunkBase::TypeObject MultiLightChunkBase::_type(
1133 MultiLightChunkBase::getClassname(),
1134 Inherited::getClassname(),
1135 "NULL",
1136 nsOSG, //Namespace
1137 reinterpret_cast<PrototypeCreateF>(&MultiLightChunkBase::createEmptyLocal),
1138 reinterpret_cast<InitContainerF>(&MultiLightChunk::initMethod),
1139 reinterpret_cast<ExitContainerF>(&MultiLightChunk::exitMethod),
1140 reinterpret_cast<InitalInsertDescFunc>(
1141 reinterpret_cast<void *>(&MultiLightChunk::classDescInserter)),
1142 false,
1144 "<?xml version=\"1.0\"?>\n"
1145 "\n"
1146 "<FieldContainer\n"
1147 " name=\"MultiLightChunk\"\n"
1148 " parent=\"ShaderStorageBufferObjStdLayoutChunk\"\n"
1149 " library=\"System\"\n"
1150 " pointerfieldtypes=\"both\"\n"
1151 " structure=\"concrete\"\n"
1152 " systemcomponent=\"true\"\n"
1153 " parentsystemcomponent=\"true\"\n"
1154 " decoratable=\"false\"\n"
1155 " useLocalIncludes=\"false\"\n"
1156 " docGroupBase=\"GrpSystemState\"\n"
1157 ">\n"
1158 "See \\ref PageSystemMultiLightChunk for a description.\n"
1159 "\n"
1160 "This chunk represents a number of lights that are exposed to shader code\n"
1161 "in form of a buffer in OpenGL std430 layout format.\n"
1162 "A shader, binding a shader storage block to the very same binding point, \n"
1163 "is expected to respect the corresponding block layout. The layout is regulated\n"
1164 "by the hasXXX fields of the chunk. If one is set to false the corresponding\n"
1165 "struct entry is omitted.\n"
1166 "\n"
1167 " struct Light\n"
1168 " {\n"
1169 " mat4 worldToLightSpaceMatrix;\n"
1170 " mat4 lightToWorldSpaceMatrix;\n"
1171 " mat4 eyeToLightSpaceMatrix;\n"
1172 " mat4 lightToEyeSpaceMatrix;\n"
1173 " mat4 lightPerspectiveMatrix;\n"
1174 " mat4 invLightPerspectiveMatrix;\n"
1175 " vec3 position;\n"
1176 " vec3 direction;\n"
1177 " vec3 color;\n"
1178 " vec3 ambientIntensity;\n"
1179 " vec3 diffuseIntensity;\n"
1180 " vec3 specularIntensity;\n"
1181 " float intensity;\n"
1182 " float constantAttenuation;\n"
1183 " float linearAttenuation;\n"
1184 " float quadraticAttenuation;\n"
1185 " float rangeCutOn;\n"
1186 " float rangeCutOff;\n"
1187 " float rangeNearZone;\n"
1188 " float rangeFarZone;\n"
1189 " float cosSpotlightAngle;\n"
1190 " float spotlightAngle;\n"
1191 " float spotExponent;\n"
1192 " float innerSuperEllipsesWidth;\n"
1193 " float innerSuperEllipsesHeight;\n"
1194 " float outerSuperEllipsesWidth;\n"
1195 " float outerSuperEllipsesHeight;\n"
1196 " float superEllipsesRoundness;\n"
1197 " float superEllipsesTwist;\n"
1198 " int type;\n"
1199 " bool enabled;\n"
1200 " };\n"
1201 "\n"
1202 " layout (std430) buffer Lights\n"
1203 " {\n"
1204 " Light light[];\n"
1205 " } lights;\n"
1206 "\n"
1207 "The chunk provides a convenient function that allows to adjust the struct layout\n"
1208 "for standard OpenGL lights \n"
1209 "\n"
1210 " struct Light\n"
1211 " {\n"
1212 " vec3 position;\n"
1213 " vec3 direction;\n"
1214 " vec3 ambientIntensity;\n"
1215 " vec3 diffuseIntensity;\n"
1216 " vec3 specularIntensity;\n"
1217 " float constantAttenuation;\n"
1218 " float linearAttenuation;\n"
1219 " float quadraticAttenuation;\n"
1220 " float cosSpotlightAngle;\n"
1221 " float spotExponent;\n"
1222 " int type;\n"
1223 " bool enabled;\n"
1224 " };\n"
1225 "\n"
1226 "or for simple range lights:\n"
1227 "\n"
1228 " struct Light\n"
1229 " {\n"
1230 " vec3 position;\n"
1231 " vec3 direction;\n"
1232 " vec3 color;\n"
1233 " float intensity;\n"
1234 " float rangeCutOff;\n"
1235 " float cosSpotlightAngle;\n"
1236 " int type;\n"
1237 " bool enabled;\n"
1238 " };\n"
1239 "\n"
1240 " <Field\n"
1241 " name=\"hasWorldToLightSpaceMatrix\"\n"
1242 " type=\"bool\"\n"
1243 " cardinality=\"single\"\n"
1244 " visibility=\"external\"\n"
1245 " access=\"public\"\n"
1246 " defaultValue=\"false\"\n"
1247 " >\n"
1248 " This flag determines if the worldToLightSpaceMatrix attribute is part of \n"
1249 " the shader storage block, i.e. if the \"mat4 worldToLightSpaceMatrix;\" \n"
1250 " entry is contained in the shader struct for the Light.\n"
1251 " </Field>\n"
1252 "\n"
1253 " <Field\n"
1254 " name=\"hasLightToWorldSpaceMatrix\"\n"
1255 " type=\"bool\"\n"
1256 " cardinality=\"single\"\n"
1257 " visibility=\"external\"\n"
1258 " access=\"public\"\n"
1259 " defaultValue=\"false\"\n"
1260 " >\n"
1261 " This flag determines if the lightToWorldSpaceMatrix attribute is part of \n"
1262 " the shader storage block, i.e. if the \"mat4 lightToWorldSpaceMatrix;\" \n"
1263 " entry is contained in the shader struct for the Light.\n"
1264 " </Field>\n"
1265 "\n"
1266 " <Field\n"
1267 " name=\"hasEyeToLightSpaceMatrix\"\n"
1268 " type=\"bool\"\n"
1269 " cardinality=\"single\"\n"
1270 " visibility=\"external\"\n"
1271 " access=\"public\"\n"
1272 " defaultValue=\"false\"\n"
1273 " >\n"
1274 " This flag determines if the eyeToLightSpaceMatrix attribute is part of \n"
1275 " the shader storage block, i.e. if the \"mat4 eyeToLightSpaceMatrix;\" \n"
1276 " entry is contained in the shader struct for the Light.\n"
1277 " Attention: If this flag is set the light shader storage block has to\n"
1278 " be updated with every redraw operation.\n"
1279 " </Field>\n"
1280 "\n"
1281 " <Field\n"
1282 " name=\"hasLightToEyeSpaceMatrix\"\n"
1283 " type=\"bool\"\n"
1284 " cardinality=\"single\"\n"
1285 " visibility=\"external\"\n"
1286 " access=\"public\"\n"
1287 " defaultValue=\"false\"\n"
1288 " >\n"
1289 " This flag determines if the lightToEyeSpaceMatrix attribute is part of \n"
1290 " the shader storage block, i.e. if the \"mat4 lightToEyeSpaceMatrix;\" \n"
1291 " entry is contained in the shader struct for the Light.\n"
1292 " Attention: If this flag is set the light shader storage block has to\n"
1293 " be updated with every redraw operation.\n"
1294 " </Field>\n"
1295 "\n"
1296 " <Field\n"
1297 " name=\"hasLightPerspectiveMatrix\"\n"
1298 " type=\"bool\"\n"
1299 " cardinality=\"single\"\n"
1300 " visibility=\"external\"\n"
1301 " access=\"public\"\n"
1302 " defaultValue=\"false\"\n"
1303 " >\n"
1304 " This flag determines if the lightPerspectiveMatrix attribute is part of \n"
1305 " the shader storage block, i.e. if the \"mat4 lightPerspectiveMatrix;\" \n"
1306 " entry is contained in the shader struct for the Light.\n"
1307 " </Field>\n"
1308 "\n"
1309 " <Field\n"
1310 " name=\"hasInvLightPerspectiveMatrix\"\n"
1311 " type=\"bool\"\n"
1312 " cardinality=\"single\"\n"
1313 " visibility=\"external\"\n"
1314 " access=\"public\"\n"
1315 " defaultValue=\"false\"\n"
1316 " >\n"
1317 " This flag determines if the lightToEyeSpaceMatrix attribute is part of \n"
1318 " the shader storage block, i.e. if the \"mat4 invLightToEyeSpaceMatrix;\" \n"
1319 " entry is contained in the shader struct for the Light.\n"
1320 " </Field>\n"
1321 "\n"
1322 " <Field\n"
1323 " name=\"hasColor\"\n"
1324 " type=\"bool\"\n"
1325 " cardinality=\"single\"\n"
1326 " visibility=\"external\"\n"
1327 " access=\"public\"\n"
1328 " defaultValue=\"false\"\n"
1329 " >\n"
1330 " This flag determines if the color attribute is part of the shader storage block, i.e.\n"
1331 " if the \"vec3 color;\" entry is contained in the shader struct for the Light.\n"
1332 " </Field>\n"
1333 "\n"
1334 " <Field\n"
1335 " name=\"hasIntensity\"\n"
1336 " type=\"bool\"\n"
1337 " cardinality=\"single\"\n"
1338 " visibility=\"external\"\n"
1339 " access=\"public\"\n"
1340 " defaultValue=\"false\"\n"
1341 " >\n"
1342 " This flag determines if the intensity attribute is part of the shader storage block, i.e.\n"
1343 " if the \"float intensity;\" entry is contained in the shader struct for the Light.\n"
1344 " </Field>\n"
1345 "\n"
1346 " <Field\n"
1347 " name=\"hasSeparateIntensities\"\n"
1348 " type=\"bool\"\n"
1349 " cardinality=\"single\"\n"
1350 " visibility=\"external\"\n"
1351 " access=\"public\"\n"
1352 " defaultValue=\"true\"\n"
1353 " >\n"
1354 " This flag determines if the color intensity attributes are part of the shader storage block, i.e.\n"
1355 " if the \"vec3 Ia;\", \"vec3 Id;\" and \"vec3 Is;\" entries are contained in the shader struct for the Light.\n"
1356 " </Field>\n"
1357 "\n"
1358 " <Field\n"
1359 " name=\"hasAttenuation\"\n"
1360 " type=\"bool\"\n"
1361 " cardinality=\"single\"\n"
1362 " visibility=\"external\"\n"
1363 " access=\"public\"\n"
1364 " defaultValue=\"true\"\n"
1365 " >\n"
1366 " This flag determines if the attenuation attributes are part of the shader storage block, i.e.\n"
1367 " if the \"float constantAttenuation;\", \"float linearAttenuation;\" and \"float quadraticAttenuation;\"\n"
1368 " entries are contained in the shader struct for the Light.\n"
1369 " </Field>\n"
1370 "\n"
1371 " <Field\n"
1372 " name=\"autoCalcRanges\"\n"
1373 " type=\"bool\"\n"
1374 " cardinality=\"single\"\n"
1375 " visibility=\"external\"\n"
1376 " access=\"public\"\n"
1377 " defaultValue=\"true\"\n"
1378 " >\n"
1379 " If this flag is active and the lights have attenuations, then the cut on and cut off ranges\n"
1380 " are automatically calculated. They are, however, not provided automatically to the shader.\n"
1381 " For that, you have to set the hasRangeCutOn and hasRangeCutOff flags, respectively.\n"
1382 " </Field>\n"
1383 "\n"
1384 " <Field\n"
1385 " name=\"hasRangeCutOn\"\n"
1386 " type=\"bool\"\n"
1387 " cardinality=\"single\"\n"
1388 " visibility=\"external\"\n"
1389 " access=\"public\"\n"
1390 " defaultValue=\"false\"\n"
1391 " >\n"
1392 " This flag determines if the rangeCutOn attribute is part of the shader storage block, i.e.\n"
1393 " if the \"float rangeCutOn;\" entry is contained in the shader struct for the Light.\n"
1394 " </Field>\n"
1395 "\n"
1396 " <Field\n"
1397 " name=\"hasRangeCutOff\"\n"
1398 " type=\"bool\"\n"
1399 " cardinality=\"single\"\n"
1400 " visibility=\"external\"\n"
1401 " access=\"public\"\n"
1402 " defaultValue=\"false\"\n"
1403 " >\n"
1404 " This flag determines if the hasRangeCutOff attribute is part of the shader storage block, i.e.\n"
1405 " if the \"float hasRangeCutOff;\" entry is contained in the shader struct for the Light.\n"
1406 " </Field>\n"
1407 "\n"
1408 " <Field\n"
1409 " name=\"hasRangeNearZone\"\n"
1410 " type=\"bool\"\n"
1411 " cardinality=\"single\"\n"
1412 " visibility=\"external\"\n"
1413 " access=\"public\"\n"
1414 " defaultValue=\"false\"\n"
1415 " >\n"
1416 " This flag determines if the hasRangeNearZone attribute is part of the shader storage block, i.e.\n"
1417 " if the \"float hasRangeNearZone;\" entry is contained in the shader struct for the Light.\n"
1418 " </Field>\n"
1419 "\n"
1420 " <Field\n"
1421 " name=\"hasRangeFarZone\"\n"
1422 " type=\"bool\"\n"
1423 " cardinality=\"single\"\n"
1424 " visibility=\"external\"\n"
1425 " access=\"public\"\n"
1426 " defaultValue=\"false\"\n"
1427 " >\n"
1428 " This flag determines if the hasRangeFarZone attribute is part of the shader storage block, i.e.\n"
1429 " if the \"float hasRangeFarZone;\" entry is contained in the shader struct for the Light.\n"
1430 " </Field>\n"
1431 "\n"
1432 " <Field\n"
1433 " name=\"hasCosSpotlightAngle\"\n"
1434 " type=\"bool\"\n"
1435 " cardinality=\"single\"\n"
1436 " visibility=\"external\"\n"
1437 " access=\"public\"\n"
1438 " defaultValue=\"true\"\n"
1439 " >\n"
1440 " This flag determines if the cosine of the spot light angle attribute is part of the shader storage block, i.e.\n"
1441 " if the \"float cosSpotlightAngle;\" entry is contained in the shader struct for the Light. If neither this flag\n"
1442 " nor the hasSpotlightAngle flag is true, then this flag is treated as if it has value true.\n"
1443 " </Field>\n"
1444 "\n"
1445 " <Field\n"
1446 " name=\"hasSpotlightAngle\"\n"
1447 " type=\"bool\"\n"
1448 " cardinality=\"single\"\n"
1449 " visibility=\"external\"\n"
1450 " access=\"public\"\n"
1451 " defaultValue=\"false\"\n"
1452 " >\n"
1453 " This flag determines if the spot light angle attribute is part of the shader storage block, i.e.\n"
1454 " if the \"float spotlightAngle;\" entry is contained in the shader struct for the Light. If neither this flag\n"
1455 " nor the hasCosSpotlightAngle flag is true, then the hasCosSpotlightAngle flag is treated as if it has value true.\n"
1456 " </Field>\n"
1457 "\n"
1458 " <Field\n"
1459 " name=\"hasSpotExponent\"\n"
1460 " type=\"bool\"\n"
1461 " cardinality=\"single\"\n"
1462 " visibility=\"external\"\n"
1463 " access=\"public\"\n"
1464 " defaultValue=\"true\"\n"
1465 " >\n"
1466 " This flag determines if the spot expenent attribute is part of the shader storage block, i.e.\n"
1467 " if the \"float spotExponent;\" entry is contained in the shader struct for the Light.\n"
1468 " </Field>\n"
1469 "\n"
1470 " <Field\n"
1471 " name=\"hasCinemaLight\"\n"
1472 " type=\"bool\"\n"
1473 " cardinality=\"single\"\n"
1474 " visibility=\"external\"\n"
1475 " access=\"public\"\n"
1476 " defaultValue=\"false\"\n"
1477 " >\n"
1478 " This flag determines if the cinema light attributes are part of the shader storage block, i.e.\n"
1479 " if the \"float innerSuperEllipsesWidth;\", ... entries are contained in the shader struct for the Light.\n"
1480 " If true this flag overrides the hasRangeCutOn, hasRangeCutOff, hasRangeNearZone and hasRangeFarZone\n"
1481 " flags, because cinema lights are described the corresponding attributes.\n"
1482 " See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html\n"
1483 " http://www.yaldex.com/open-gl/ch12lev1sec4.html\n"
1484 " https://en.wikipedia.org/wiki/Superellipse\n"
1485 " </Field>\n"
1486 "\n"
1487 " <Field\n"
1488 " name=\"position\"\n"
1489 " type=\"Pnt3f\"\n"
1490 " cardinality=\"multi\"\n"
1491 " visibility=\"external\"\n"
1492 " access=\"protected\"\n"
1493 " >\n"
1494 " The light's position for point and spotlights in beacon space.\n"
1495 " </Field>\n"
1496 "\n"
1497 " <Field\n"
1498 " name=\"direction\"\n"
1499 " type=\"Vec3f\"\n"
1500 " cardinality=\"multi\"\n"
1501 " visibility=\"external\"\n"
1502 " access=\"protected\"\n"
1503 " >\n"
1504 " The light's direction for directional and spotlights in beacon space.\n"
1505 " </Field>\n"
1506 "\n"
1507 " <Field\n"
1508 " name=\"color\"\n"
1509 " type=\"Color3f\"\n"
1510 " cardinality=\"multi\"\n"
1511 " visibility=\"external\"\n"
1512 " access=\"protected\"\n"
1513 " >\n"
1514 " The light's color.\n"
1515 " </Field>\n"
1516 "\n"
1517 " <Field\n"
1518 " name=\"intensity\"\n"
1519 " type=\"Real32\"\n"
1520 " cardinality=\"multi\"\n"
1521 " visibility=\"external\"\n"
1522 " access=\"protected\"\n"
1523 " >\n"
1524 " The light's intensity.\n"
1525 " </Field>\n"
1526 "\n"
1527 " <Field\n"
1528 " name=\"ambientIntensity\"\n"
1529 " type=\"Vec3f\"\n"
1530 " cardinality=\"multi\"\n"
1531 " visibility=\"external\"\n"
1532 " access=\"protected\"\n"
1533 " >\n"
1534 " The light's ambient intensity.\n"
1535 " </Field>\n"
1536 "\n"
1537 " <Field\n"
1538 " name=\"diffuseIntensity\"\n"
1539 " type=\"Vec3f\"\n"
1540 " cardinality=\"multi\"\n"
1541 " visibility=\"external\"\n"
1542 " access=\"protected\"\n"
1543 " >\n"
1544 " The light's diffuse intensity.\n"
1545 " </Field>\n"
1546 "\n"
1547 " <Field\n"
1548 " name=\"specularIntensity\"\n"
1549 " type=\"Vec3f\"\n"
1550 " cardinality=\"multi\"\n"
1551 " visibility=\"external\"\n"
1552 " access=\"protected\"\n"
1553 " >\n"
1554 " The light's specular intensity.\n"
1555 " </Field>\n"
1556 "\n"
1557 " <Field\n"
1558 " name=\"attenuation\"\n"
1559 " type=\"Vec3f\"\n"
1560 " cardinality=\"multi\"\n"
1561 " visibility=\"external\"\n"
1562 " access=\"protected\"\n"
1563 " >\n"
1564 " The light's attenuation consiting of the constant, linear and quadratic attenuation parts.\n"
1565 " </Field>\n"
1566 "\n"
1567 " <Field\n"
1568 " name=\"spotlightAngle\"\n"
1569 " type=\"Real32\"\n"
1570 " cardinality=\"multi\"\n"
1571 " visibility=\"external\"\n"
1572 " access=\"protected\"\n"
1573 " >\n"
1574 " The spot angle in degree.\n"
1575 " </Field>\n"
1576 "\n"
1577 " <Field\n"
1578 " name=\"spotExponent\"\n"
1579 " type=\"Real32\"\n"
1580 " cardinality=\"multi\"\n"
1581 " visibility=\"external\"\n"
1582 " access=\"protected\"\n"
1583 " >\n"
1584 " The spot angle in degree.\n"
1585 " </Field>\n"
1586 "\n"
1587 " <Field\n"
1588 " name=\"innerSuperEllipsesWidth\"\n"
1589 " type=\"Real32\"\n"
1590 " cardinality=\"multi\"\n"
1591 " visibility=\"external\"\n"
1592 " access=\"protected\"\n"
1593 " >\n"
1594 " The cinema light is described among others by an inner ellipses. This is\n"
1595 " the width of this ellipse.\n"
1596 " See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html\n"
1597 " http://www.yaldex.com/open-gl/ch12lev1sec4.html\n"
1598 " https://en.wikipedia.org/wiki/Superellipse\n"
1599 " </Field>\n"
1600 "\n"
1601 " <Field\n"
1602 " name=\"innerSuperEllipsesHeight\"\n"
1603 " type=\"Real32\"\n"
1604 " cardinality=\"multi\"\n"
1605 " visibility=\"external\"\n"
1606 " access=\"protected\"\n"
1607 " >\n"
1608 " The cinema light is described among others by an inner ellipses. This is\n"
1609 " the height of this ellipse.\n"
1610 " See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html\n"
1611 " http://www.yaldex.com/open-gl/ch12lev1sec4.html\n"
1612 " https://en.wikipedia.org/wiki/Superellipse\n"
1613 " </Field>\n"
1614 "\n"
1615 " <Field\n"
1616 " name=\"outerSuperEllipsesWidth\"\n"
1617 " type=\"Real32\"\n"
1618 " cardinality=\"multi\"\n"
1619 " visibility=\"external\"\n"
1620 " access=\"protected\"\n"
1621 " >\n"
1622 " The cinema light is described among others by an outer ellipses. This is\n"
1623 " the width of this ellipse.\n"
1624 " See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html\n"
1625 " http://www.yaldex.com/open-gl/ch12lev1sec4.html\n"
1626 " https://en.wikipedia.org/wiki/Superellipse\n"
1627 " </Field>\n"
1628 "\n"
1629 " <Field\n"
1630 " name=\"outerSuperEllipsesHeight\"\n"
1631 " type=\"Real32\"\n"
1632 " cardinality=\"multi\"\n"
1633 " visibility=\"external\"\n"
1634 " access=\"protected\"\n"
1635 " >\n"
1636 " The cinema light is described among others by an outer ellipses. This is\n"
1637 " the height of this ellipse.\n"
1638 " See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html\n"
1639 " http://www.yaldex.com/open-gl/ch12lev1sec4.html\n"
1640 " https://en.wikipedia.org/wiki/Superellipse\n"
1641 " </Field>\n"
1642 "\n"
1643 " <Field\n"
1644 " name=\"superEllipsesRoundness\"\n"
1645 " type=\"Real32\"\n"
1646 " cardinality=\"multi\"\n"
1647 " visibility=\"external\"\n"
1648 " access=\"protected\"\n"
1649 " >\n"
1650 " The cinema light is described among others by a roundness parameter. \n"
1651 " See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html\n"
1652 " http://www.yaldex.com/open-gl/ch12lev1sec4.html\n"
1653 " https://en.wikipedia.org/wiki/Superellipse\n"
1654 " </Field>\n"
1655 "\n"
1656 " <Field\n"
1657 " name=\"superEllipsesTwist\"\n"
1658 " type=\"Real32\"\n"
1659 " cardinality=\"multi\"\n"
1660 " visibility=\"external\"\n"
1661 " access=\"protected\"\n"
1662 " >\n"
1663 " The twist angle in degree by which the superellipses is rotatet in the xy-plane.\n"
1664 " </Field>\n"
1665 "\n"
1666 " <Field\n"
1667 " name=\"rangeCutOn\"\n"
1668 " type=\"Real32\"\n"
1669 " cardinality=\"multi\"\n"
1670 " visibility=\"external\"\n"
1671 " access=\"protected\"\n"
1672 " >\n"
1673 " The cinema light is described among others by a rangeCutOn parameter.\n"
1674 " In the interval rangeCutOn to rangeCutOff the lighted fragments are\n"
1675 " fully lit.\n"
1676 " See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html\n"
1677 " http://www.yaldex.com/open-gl/ch12lev1sec4.html\n"
1678 " https://en.wikipedia.org/wiki/Superellipse\n"
1679 " </Field>\n"
1680 "\n"
1681 " <Field\n"
1682 " name=\"rangeCutOff\"\n"
1683 " type=\"Real32\"\n"
1684 " cardinality=\"multi\"\n"
1685 " visibility=\"external\"\n"
1686 " access=\"protected\"\n"
1687 " >\n"
1688 " The cinema light is described among others by a rangeCutOff parameter.\n"
1689 " In the interval rangeCutOn to rangeCutOff the lighted fragments are\n"
1690 " fully lit.\n"
1691 " See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html\n"
1692 " http://www.yaldex.com/open-gl/ch12lev1sec4.html\n"
1693 " https://en.wikipedia.org/wiki/Superellipse\n"
1694 " </Field>\n"
1695 "\n"
1696 " <Field\n"
1697 " name=\"rangeNearZone\"\n"
1698 " type=\"Real32\"\n"
1699 " cardinality=\"multi\"\n"
1700 " visibility=\"external\"\n"
1701 " access=\"protected\"\n"
1702 " >\n"
1703 " The cinema light is described among others by a rangeNearZone parameter.\n"
1704 " In the interval rangeCutOn-rangeNearZone to rangeCutOn the lighted fragments are\n"
1705 " partly lit.\n"
1706 " See: http://http.developer.nvidia.com/GPUGems/gpugems_ch10.html\n"
1707 " http://www.yaldex.com/open-gl/ch12lev1sec4.html\n"
1708 " https://en.wikipedia.org/wiki/Superellipse\n"
1709 " </Field>\n"
1710 "\n"
1711 " <Field\n"
1712 " name=\"rangeFarZone\"\n"
1713 " type=\"Real32\"\n"
1714 " cardinality=\"multi\"\n"
1715 " visibility=\"external\"\n"
1716 " access=\"protected\"\n"
1717 " >\n"
1718 " In the interval rangeCutOff to rangeCutOff+rangeFarZone the lighted fragments are\n"
1719 " partly lit.\n"
1720 " </Field>\n"
1721 "\n"
1722 " <Field\n"
1723 " name=\"type\"\n"
1724 " type=\"UInt8\"\n"
1725 " cardinality=\"multi\"\n"
1726 " visibility=\"external\"\n"
1727 " access=\"protected\"\n"
1728 " >\n"
1729 " Stores the light's type. This can be any of the set {POINT_LIGHT, DIRECTIONAL_LIGHT, SPOT_LIGHT, CINEMA_LIGHT}.\n"
1730 " </Field>\n"
1731 "\n"
1732 " <Field\n"
1733 " name=\"enabled\"\n"
1734 " type=\"bool\"\n"
1735 " cardinality=\"multi\"\n"
1736 " visibility=\"external\"\n"
1737 " access=\"protected\"\n"
1738 " >\n"
1739 " The on/off state of the light.\n"
1740 " </Field>\n"
1741 "\n"
1742 " <Field\n"
1743 " name=\"beacon\"\n"
1744 " type=\"Node\"\n"
1745 " category=\"weakpointer\"\n"
1746 " cardinality=\"multi\"\n"
1747 " visibility=\"external\"\n"
1748 " access=\"protected\"\n"
1749 " >\n"
1750 " The light's beacon determining its position or direction.\n"
1751 " </Field>\n"
1752 "\n"
1753 " <Field\n"
1754 " name=\"beaconMatrix\"\n"
1755 " type=\"Matrix\"\n"
1756 " cardinality=\"multi\"\n"
1757 " visibility=\"internal\"\n"
1758 " access=\"protected\"\n"
1759 " >\n"
1760 " The beacon matrices used for the last render pass.\n"
1761 " </Field>\n"
1762 "\n"
1763 " <Field\n"
1764 " name=\"eyeSpace\"\n"
1765 " type=\"bool\"\n"
1766 " cardinality=\"single\"\n"
1767 " visibility=\"external\"\n"
1768 " access=\"public\"\n"
1769 " defaultValue=\"false\"\n"
1770 " >\n"
1771 " The lights position and direction are transformed to eye space before loading into the shader. \n"
1772 " On default they are provided in world space.\n"
1773 " </Field>\n"
1774 "\n"
1775 " <Field\n"
1776 " name=\"lastCamNear\"\n"
1777 " type=\"Real32\"\n"
1778 " cardinality=\"single\"\n"
1779 " visibility=\"internal\"\n"
1780 " access=\"protected\"\n"
1781 " defaultValue=\"0.f\"\n"
1782 " >\n"
1783 " The camera last near value.\n"
1784 " </Field>\n"
1785 "\n"
1786 " <Field\n"
1787 " name=\"lastCamFar\"\n"
1788 " type=\"Real32\"\n"
1789 " cardinality=\"single\"\n"
1790 " visibility=\"internal\"\n"
1791 " access=\"protected\"\n"
1792 " defaultValue=\"0.f\"\n"
1793 " >\n"
1794 " The camera last far value.\n"
1795 " </Field>\n"
1796 "\n"
1797 " <Field\n"
1798 " name=\"lastCamToWorld\"\n"
1799 " type=\"Matrix\"\n"
1800 " cardinality=\"single\"\n"
1801 " visibility=\"internal\"\n"
1802 " access=\"protected\"\n"
1803 " >\n"
1804 " The camera last to world matrix.\n"
1805 " </Field>\n"
1806 "\n"
1807 " <Field\n"
1808 " name=\"LightBlockName\"\n"
1809 " type=\"std::string\"\n"
1810 " cardinality=\"single\"\n"
1811 " visibility=\"external\"\n"
1812 " access=\"public\"\n"
1813 " defaultValue='\"Lights\"'\n"
1814 " >\n"
1815 " The shader storage buffer block name for the light buffer.\n"
1816 " </Field>\n"
1817 "\n"
1818 " <Field\n"
1819 " name=\"LightVariableName\"\n"
1820 " type=\"std::string\"\n"
1821 " cardinality=\"single\"\n"
1822 " visibility=\"external\"\n"
1823 " access=\"public\"\n"
1824 " defaultValue='\"lights\"'\n"
1825 " >\n"
1826 " The shader variable name for the light buffer.\n"
1827 " </Field>\n"
1828 "\n"
1829 "</FieldContainer>\n",
1830 "See \\ref PageSystemMultiLightChunk for a description.\n"
1831 "\n"
1832 "This chunk represents a number of lights that are exposed to shader code\n"
1833 "in form of a buffer in OpenGL std430 layout format.\n"
1834 "A shader, binding a shader storage block to the very same binding point, \n"
1835 "is expected to respect the corresponding block layout. The layout is regulated\n"
1836 "by the hasXXX fields of the chunk. If one is set to false the corresponding\n"
1837 "struct entry is omitted.\n"
1838 "\n"
1839 "struct Light\n"
1840 "{\n"
1841 "mat4 worldToLightSpaceMatrix;\n"
1842 "mat4 lightToWorldSpaceMatrix;\n"
1843 "mat4 eyeToLightSpaceMatrix;\n"
1844 "mat4 lightToEyeSpaceMatrix;\n"
1845 "mat4 lightPerspectiveMatrix;\n"
1846 "mat4 invLightPerspectiveMatrix;\n"
1847 "vec3 position;\n"
1848 "vec3 direction;\n"
1849 "vec3 color;\n"
1850 "vec3 ambientIntensity;\n"
1851 "vec3 diffuseIntensity;\n"
1852 "vec3 specularIntensity;\n"
1853 "float intensity;\n"
1854 "float constantAttenuation;\n"
1855 "float linearAttenuation;\n"
1856 "float quadraticAttenuation;\n"
1857 "float rangeCutOn;\n"
1858 "float rangeCutOff;\n"
1859 "float rangeNearZone;\n"
1860 "float rangeFarZone;\n"
1861 "float cosSpotlightAngle;\n"
1862 "float spotlightAngle;\n"
1863 "float spotExponent;\n"
1864 "float innerSuperEllipsesWidth;\n"
1865 "float innerSuperEllipsesHeight;\n"
1866 "float outerSuperEllipsesWidth;\n"
1867 "float outerSuperEllipsesHeight;\n"
1868 "float superEllipsesRoundness;\n"
1869 "float superEllipsesTwist;\n"
1870 "int type;\n"
1871 "bool enabled;\n"
1872 "};\n"
1873 "\n"
1874 "layout (std430) buffer Lights\n"
1875 "{\n"
1876 "Light light[];\n"
1877 "} lights;\n"
1878 "\n"
1879 "The chunk provides a convenient function that allows to adjust the struct layout\n"
1880 "for standard OpenGL lights \n"
1881 "\n"
1882 "struct Light\n"
1883 "{\n"
1884 "vec3 position;\n"
1885 "vec3 direction;\n"
1886 "vec3 ambientIntensity;\n"
1887 "vec3 diffuseIntensity;\n"
1888 "vec3 specularIntensity;\n"
1889 "float constantAttenuation;\n"
1890 "float linearAttenuation;\n"
1891 "float quadraticAttenuation;\n"
1892 "float cosSpotlightAngle;\n"
1893 "float spotExponent;\n"
1894 "int type;\n"
1895 "bool enabled;\n"
1896 "};\n"
1897 "\n"
1898 "or for simple range lights:\n"
1899 "\n"
1900 "struct Light\n"
1901 "{\n"
1902 "vec3 position;\n"
1903 "vec3 direction;\n"
1904 "vec3 color;\n"
1905 "float intensity;\n"
1906 "float rangeCutOff;\n"
1907 "float cosSpotlightAngle;\n"
1908 "int type;\n"
1909 "bool enabled;\n"
1910 "};\n"
1913 /*------------------------------ get -----------------------------------*/
1915 FieldContainerType &MultiLightChunkBase::getType(void)
1917 return _type;
1920 const FieldContainerType &MultiLightChunkBase::getType(void) const
1922 return _type;
1925 UInt32 MultiLightChunkBase::getContainerSize(void) const
1927 return sizeof(MultiLightChunk);
1930 /*------------------------- decorator get ------------------------------*/
1933 SFBool *MultiLightChunkBase::editSFHasWorldToLightSpaceMatrix(void)
1935 editSField(HasWorldToLightSpaceMatrixFieldMask);
1937 return &_sfHasWorldToLightSpaceMatrix;
1940 const SFBool *MultiLightChunkBase::getSFHasWorldToLightSpaceMatrix(void) const
1942 return &_sfHasWorldToLightSpaceMatrix;
1946 SFBool *MultiLightChunkBase::editSFHasLightToWorldSpaceMatrix(void)
1948 editSField(HasLightToWorldSpaceMatrixFieldMask);
1950 return &_sfHasLightToWorldSpaceMatrix;
1953 const SFBool *MultiLightChunkBase::getSFHasLightToWorldSpaceMatrix(void) const
1955 return &_sfHasLightToWorldSpaceMatrix;
1959 SFBool *MultiLightChunkBase::editSFHasEyeToLightSpaceMatrix(void)
1961 editSField(HasEyeToLightSpaceMatrixFieldMask);
1963 return &_sfHasEyeToLightSpaceMatrix;
1966 const SFBool *MultiLightChunkBase::getSFHasEyeToLightSpaceMatrix(void) const
1968 return &_sfHasEyeToLightSpaceMatrix;
1972 SFBool *MultiLightChunkBase::editSFHasLightToEyeSpaceMatrix(void)
1974 editSField(HasLightToEyeSpaceMatrixFieldMask);
1976 return &_sfHasLightToEyeSpaceMatrix;
1979 const SFBool *MultiLightChunkBase::getSFHasLightToEyeSpaceMatrix(void) const
1981 return &_sfHasLightToEyeSpaceMatrix;
1985 SFBool *MultiLightChunkBase::editSFHasLightPerspectiveMatrix(void)
1987 editSField(HasLightPerspectiveMatrixFieldMask);
1989 return &_sfHasLightPerspectiveMatrix;
1992 const SFBool *MultiLightChunkBase::getSFHasLightPerspectiveMatrix(void) const
1994 return &_sfHasLightPerspectiveMatrix;
1998 SFBool *MultiLightChunkBase::editSFHasInvLightPerspectiveMatrix(void)
2000 editSField(HasInvLightPerspectiveMatrixFieldMask);
2002 return &_sfHasInvLightPerspectiveMatrix;
2005 const SFBool *MultiLightChunkBase::getSFHasInvLightPerspectiveMatrix(void) const
2007 return &_sfHasInvLightPerspectiveMatrix;
2011 SFBool *MultiLightChunkBase::editSFHasColor(void)
2013 editSField(HasColorFieldMask);
2015 return &_sfHasColor;
2018 const SFBool *MultiLightChunkBase::getSFHasColor(void) const
2020 return &_sfHasColor;
2024 SFBool *MultiLightChunkBase::editSFHasIntensity(void)
2026 editSField(HasIntensityFieldMask);
2028 return &_sfHasIntensity;
2031 const SFBool *MultiLightChunkBase::getSFHasIntensity(void) const
2033 return &_sfHasIntensity;
2037 SFBool *MultiLightChunkBase::editSFHasSeparateIntensities(void)
2039 editSField(HasSeparateIntensitiesFieldMask);
2041 return &_sfHasSeparateIntensities;
2044 const SFBool *MultiLightChunkBase::getSFHasSeparateIntensities(void) const
2046 return &_sfHasSeparateIntensities;
2050 SFBool *MultiLightChunkBase::editSFHasAttenuation(void)
2052 editSField(HasAttenuationFieldMask);
2054 return &_sfHasAttenuation;
2057 const SFBool *MultiLightChunkBase::getSFHasAttenuation(void) const
2059 return &_sfHasAttenuation;
2063 SFBool *MultiLightChunkBase::editSFAutoCalcRanges(void)
2065 editSField(AutoCalcRangesFieldMask);
2067 return &_sfAutoCalcRanges;
2070 const SFBool *MultiLightChunkBase::getSFAutoCalcRanges(void) const
2072 return &_sfAutoCalcRanges;
2076 SFBool *MultiLightChunkBase::editSFHasRangeCutOn(void)
2078 editSField(HasRangeCutOnFieldMask);
2080 return &_sfHasRangeCutOn;
2083 const SFBool *MultiLightChunkBase::getSFHasRangeCutOn(void) const
2085 return &_sfHasRangeCutOn;
2089 SFBool *MultiLightChunkBase::editSFHasRangeCutOff(void)
2091 editSField(HasRangeCutOffFieldMask);
2093 return &_sfHasRangeCutOff;
2096 const SFBool *MultiLightChunkBase::getSFHasRangeCutOff(void) const
2098 return &_sfHasRangeCutOff;
2102 SFBool *MultiLightChunkBase::editSFHasRangeNearZone(void)
2104 editSField(HasRangeNearZoneFieldMask);
2106 return &_sfHasRangeNearZone;
2109 const SFBool *MultiLightChunkBase::getSFHasRangeNearZone(void) const
2111 return &_sfHasRangeNearZone;
2115 SFBool *MultiLightChunkBase::editSFHasRangeFarZone(void)
2117 editSField(HasRangeFarZoneFieldMask);
2119 return &_sfHasRangeFarZone;
2122 const SFBool *MultiLightChunkBase::getSFHasRangeFarZone(void) const
2124 return &_sfHasRangeFarZone;
2128 SFBool *MultiLightChunkBase::editSFHasCosSpotlightAngle(void)
2130 editSField(HasCosSpotlightAngleFieldMask);
2132 return &_sfHasCosSpotlightAngle;
2135 const SFBool *MultiLightChunkBase::getSFHasCosSpotlightAngle(void) const
2137 return &_sfHasCosSpotlightAngle;
2141 SFBool *MultiLightChunkBase::editSFHasSpotlightAngle(void)
2143 editSField(HasSpotlightAngleFieldMask);
2145 return &_sfHasSpotlightAngle;
2148 const SFBool *MultiLightChunkBase::getSFHasSpotlightAngle(void) const
2150 return &_sfHasSpotlightAngle;
2154 SFBool *MultiLightChunkBase::editSFHasSpotExponent(void)
2156 editSField(HasSpotExponentFieldMask);
2158 return &_sfHasSpotExponent;
2161 const SFBool *MultiLightChunkBase::getSFHasSpotExponent(void) const
2163 return &_sfHasSpotExponent;
2167 SFBool *MultiLightChunkBase::editSFHasCinemaLight(void)
2169 editSField(HasCinemaLightFieldMask);
2171 return &_sfHasCinemaLight;
2174 const SFBool *MultiLightChunkBase::getSFHasCinemaLight(void) const
2176 return &_sfHasCinemaLight;
2180 MFPnt3f *MultiLightChunkBase::editMFPosition(void)
2182 editMField(PositionFieldMask, _mfPosition);
2184 return &_mfPosition;
2187 const MFPnt3f *MultiLightChunkBase::getMFPosition(void) const
2189 return &_mfPosition;
2193 MFVec3f *MultiLightChunkBase::editMFDirection(void)
2195 editMField(DirectionFieldMask, _mfDirection);
2197 return &_mfDirection;
2200 const MFVec3f *MultiLightChunkBase::getMFDirection(void) const
2202 return &_mfDirection;
2206 MFColor3f *MultiLightChunkBase::editMFColor(void)
2208 editMField(ColorFieldMask, _mfColor);
2210 return &_mfColor;
2213 const MFColor3f *MultiLightChunkBase::getMFColor(void) const
2215 return &_mfColor;
2219 MFReal32 *MultiLightChunkBase::editMFIntensity(void)
2221 editMField(IntensityFieldMask, _mfIntensity);
2223 return &_mfIntensity;
2226 const MFReal32 *MultiLightChunkBase::getMFIntensity(void) const
2228 return &_mfIntensity;
2232 MFVec3f *MultiLightChunkBase::editMFAmbientIntensity(void)
2234 editMField(AmbientIntensityFieldMask, _mfAmbientIntensity);
2236 return &_mfAmbientIntensity;
2239 const MFVec3f *MultiLightChunkBase::getMFAmbientIntensity(void) const
2241 return &_mfAmbientIntensity;
2245 MFVec3f *MultiLightChunkBase::editMFDiffuseIntensity(void)
2247 editMField(DiffuseIntensityFieldMask, _mfDiffuseIntensity);
2249 return &_mfDiffuseIntensity;
2252 const MFVec3f *MultiLightChunkBase::getMFDiffuseIntensity(void) const
2254 return &_mfDiffuseIntensity;
2258 MFVec3f *MultiLightChunkBase::editMFSpecularIntensity(void)
2260 editMField(SpecularIntensityFieldMask, _mfSpecularIntensity);
2262 return &_mfSpecularIntensity;
2265 const MFVec3f *MultiLightChunkBase::getMFSpecularIntensity(void) const
2267 return &_mfSpecularIntensity;
2271 MFVec3f *MultiLightChunkBase::editMFAttenuation(void)
2273 editMField(AttenuationFieldMask, _mfAttenuation);
2275 return &_mfAttenuation;
2278 const MFVec3f *MultiLightChunkBase::getMFAttenuation(void) const
2280 return &_mfAttenuation;
2284 MFReal32 *MultiLightChunkBase::editMFSpotlightAngle(void)
2286 editMField(SpotlightAngleFieldMask, _mfSpotlightAngle);
2288 return &_mfSpotlightAngle;
2291 const MFReal32 *MultiLightChunkBase::getMFSpotlightAngle(void) const
2293 return &_mfSpotlightAngle;
2297 MFReal32 *MultiLightChunkBase::editMFSpotExponent(void)
2299 editMField(SpotExponentFieldMask, _mfSpotExponent);
2301 return &_mfSpotExponent;
2304 const MFReal32 *MultiLightChunkBase::getMFSpotExponent(void) const
2306 return &_mfSpotExponent;
2310 MFReal32 *MultiLightChunkBase::editMFInnerSuperEllipsesWidth(void)
2312 editMField(InnerSuperEllipsesWidthFieldMask, _mfInnerSuperEllipsesWidth);
2314 return &_mfInnerSuperEllipsesWidth;
2317 const MFReal32 *MultiLightChunkBase::getMFInnerSuperEllipsesWidth(void) const
2319 return &_mfInnerSuperEllipsesWidth;
2323 MFReal32 *MultiLightChunkBase::editMFInnerSuperEllipsesHeight(void)
2325 editMField(InnerSuperEllipsesHeightFieldMask, _mfInnerSuperEllipsesHeight);
2327 return &_mfInnerSuperEllipsesHeight;
2330 const MFReal32 *MultiLightChunkBase::getMFInnerSuperEllipsesHeight(void) const
2332 return &_mfInnerSuperEllipsesHeight;
2336 MFReal32 *MultiLightChunkBase::editMFOuterSuperEllipsesWidth(void)
2338 editMField(OuterSuperEllipsesWidthFieldMask, _mfOuterSuperEllipsesWidth);
2340 return &_mfOuterSuperEllipsesWidth;
2343 const MFReal32 *MultiLightChunkBase::getMFOuterSuperEllipsesWidth(void) const
2345 return &_mfOuterSuperEllipsesWidth;
2349 MFReal32 *MultiLightChunkBase::editMFOuterSuperEllipsesHeight(void)
2351 editMField(OuterSuperEllipsesHeightFieldMask, _mfOuterSuperEllipsesHeight);
2353 return &_mfOuterSuperEllipsesHeight;
2356 const MFReal32 *MultiLightChunkBase::getMFOuterSuperEllipsesHeight(void) const
2358 return &_mfOuterSuperEllipsesHeight;
2362 MFReal32 *MultiLightChunkBase::editMFSuperEllipsesRoundness(void)
2364 editMField(SuperEllipsesRoundnessFieldMask, _mfSuperEllipsesRoundness);
2366 return &_mfSuperEllipsesRoundness;
2369 const MFReal32 *MultiLightChunkBase::getMFSuperEllipsesRoundness(void) const
2371 return &_mfSuperEllipsesRoundness;
2375 MFReal32 *MultiLightChunkBase::editMFSuperEllipsesTwist(void)
2377 editMField(SuperEllipsesTwistFieldMask, _mfSuperEllipsesTwist);
2379 return &_mfSuperEllipsesTwist;
2382 const MFReal32 *MultiLightChunkBase::getMFSuperEllipsesTwist(void) const
2384 return &_mfSuperEllipsesTwist;
2388 MFReal32 *MultiLightChunkBase::editMFRangeCutOn(void)
2390 editMField(RangeCutOnFieldMask, _mfRangeCutOn);
2392 return &_mfRangeCutOn;
2395 const MFReal32 *MultiLightChunkBase::getMFRangeCutOn(void) const
2397 return &_mfRangeCutOn;
2401 MFReal32 *MultiLightChunkBase::editMFRangeCutOff(void)
2403 editMField(RangeCutOffFieldMask, _mfRangeCutOff);
2405 return &_mfRangeCutOff;
2408 const MFReal32 *MultiLightChunkBase::getMFRangeCutOff(void) const
2410 return &_mfRangeCutOff;
2414 MFReal32 *MultiLightChunkBase::editMFRangeNearZone(void)
2416 editMField(RangeNearZoneFieldMask, _mfRangeNearZone);
2418 return &_mfRangeNearZone;
2421 const MFReal32 *MultiLightChunkBase::getMFRangeNearZone(void) const
2423 return &_mfRangeNearZone;
2427 MFReal32 *MultiLightChunkBase::editMFRangeFarZone(void)
2429 editMField(RangeFarZoneFieldMask, _mfRangeFarZone);
2431 return &_mfRangeFarZone;
2434 const MFReal32 *MultiLightChunkBase::getMFRangeFarZone(void) const
2436 return &_mfRangeFarZone;
2440 MFUInt8 *MultiLightChunkBase::editMFType(void)
2442 editMField(TypeFieldMask, _mfType);
2444 return &_mfType;
2447 const MFUInt8 *MultiLightChunkBase::getMFType(void) const
2449 return &_mfType;
2453 MFBool *MultiLightChunkBase::editMFEnabled(void)
2455 editMField(EnabledFieldMask, _mfEnabled);
2457 return &_mfEnabled;
2460 const MFBool *MultiLightChunkBase::getMFEnabled(void) const
2462 return &_mfEnabled;
2466 //! Get the MultiLightChunk::_mfBeacon field.
2467 const MFWeakNodePtr *MultiLightChunkBase::getMFBeacon(void) const
2469 return &_mfBeacon;
2472 MFWeakNodePtr *MultiLightChunkBase::editMFBeacon (void)
2474 editMField(BeaconFieldMask, _mfBeacon);
2476 return &_mfBeacon;
2478 Node * MultiLightChunkBase::getBeacon(const UInt32 index) const
2480 return _mfBeacon[index];
2483 MFMatrix *MultiLightChunkBase::editMFBeaconMatrix(void)
2485 editMField(BeaconMatrixFieldMask, _mfBeaconMatrix);
2487 return &_mfBeaconMatrix;
2490 const MFMatrix *MultiLightChunkBase::getMFBeaconMatrix(void) const
2492 return &_mfBeaconMatrix;
2496 SFBool *MultiLightChunkBase::editSFEyeSpace(void)
2498 editSField(EyeSpaceFieldMask);
2500 return &_sfEyeSpace;
2503 const SFBool *MultiLightChunkBase::getSFEyeSpace(void) const
2505 return &_sfEyeSpace;
2509 SFReal32 *MultiLightChunkBase::editSFLastCamNear(void)
2511 editSField(LastCamNearFieldMask);
2513 return &_sfLastCamNear;
2516 const SFReal32 *MultiLightChunkBase::getSFLastCamNear(void) const
2518 return &_sfLastCamNear;
2522 SFReal32 *MultiLightChunkBase::editSFLastCamFar(void)
2524 editSField(LastCamFarFieldMask);
2526 return &_sfLastCamFar;
2529 const SFReal32 *MultiLightChunkBase::getSFLastCamFar(void) const
2531 return &_sfLastCamFar;
2535 SFMatrix *MultiLightChunkBase::editSFLastCamToWorld(void)
2537 editSField(LastCamToWorldFieldMask);
2539 return &_sfLastCamToWorld;
2542 const SFMatrix *MultiLightChunkBase::getSFLastCamToWorld(void) const
2544 return &_sfLastCamToWorld;
2548 SFString *MultiLightChunkBase::editSFLightBlockName(void)
2550 editSField(LightBlockNameFieldMask);
2552 return &_sfLightBlockName;
2555 const SFString *MultiLightChunkBase::getSFLightBlockName(void) const
2557 return &_sfLightBlockName;
2561 SFString *MultiLightChunkBase::editSFLightVariableName(void)
2563 editSField(LightVariableNameFieldMask);
2565 return &_sfLightVariableName;
2568 const SFString *MultiLightChunkBase::getSFLightVariableName(void) const
2570 return &_sfLightVariableName;
2576 void MultiLightChunkBase::pushToBeacon(Node * const value)
2578 editMField(BeaconFieldMask, _mfBeacon);
2580 _mfBeacon.push_back(value);
2583 void MultiLightChunkBase::assignBeacon (const MFWeakNodePtr &value)
2585 MFWeakNodePtr ::const_iterator elemIt =
2586 value.begin();
2587 MFWeakNodePtr ::const_iterator elemEnd =
2588 value.end ();
2590 static_cast<MultiLightChunk *>(this)->clearBeacon();
2592 while(elemIt != elemEnd)
2594 this->pushToBeacon(*elemIt);
2596 ++elemIt;
2600 void MultiLightChunkBase::removeFromBeacon(UInt32 uiIndex)
2602 if(uiIndex < _mfBeacon.size())
2604 editMField(BeaconFieldMask, _mfBeacon);
2606 _mfBeacon.erase(uiIndex);
2610 void MultiLightChunkBase::removeObjFromBeacon(Node * const value)
2612 Int32 iElemIdx = _mfBeacon.findIndex(value);
2614 if(iElemIdx != -1)
2616 editMField(BeaconFieldMask, _mfBeacon);
2618 _mfBeacon.erase(iElemIdx);
2621 void MultiLightChunkBase::clearBeacon(void)
2623 editMField(BeaconFieldMask, _mfBeacon);
2626 _mfBeacon.clear();
2631 /*------------------------------ access -----------------------------------*/
2633 SizeT MultiLightChunkBase::getBinSize(ConstFieldMaskArg whichField)
2635 SizeT returnValue = Inherited::getBinSize(whichField);
2637 if(FieldBits::NoField != (HasWorldToLightSpaceMatrixFieldMask & whichField))
2639 returnValue += _sfHasWorldToLightSpaceMatrix.getBinSize();
2641 if(FieldBits::NoField != (HasLightToWorldSpaceMatrixFieldMask & whichField))
2643 returnValue += _sfHasLightToWorldSpaceMatrix.getBinSize();
2645 if(FieldBits::NoField != (HasEyeToLightSpaceMatrixFieldMask & whichField))
2647 returnValue += _sfHasEyeToLightSpaceMatrix.getBinSize();
2649 if(FieldBits::NoField != (HasLightToEyeSpaceMatrixFieldMask & whichField))
2651 returnValue += _sfHasLightToEyeSpaceMatrix.getBinSize();
2653 if(FieldBits::NoField != (HasLightPerspectiveMatrixFieldMask & whichField))
2655 returnValue += _sfHasLightPerspectiveMatrix.getBinSize();
2657 if(FieldBits::NoField != (HasInvLightPerspectiveMatrixFieldMask & whichField))
2659 returnValue += _sfHasInvLightPerspectiveMatrix.getBinSize();
2661 if(FieldBits::NoField != (HasColorFieldMask & whichField))
2663 returnValue += _sfHasColor.getBinSize();
2665 if(FieldBits::NoField != (HasIntensityFieldMask & whichField))
2667 returnValue += _sfHasIntensity.getBinSize();
2669 if(FieldBits::NoField != (HasSeparateIntensitiesFieldMask & whichField))
2671 returnValue += _sfHasSeparateIntensities.getBinSize();
2673 if(FieldBits::NoField != (HasAttenuationFieldMask & whichField))
2675 returnValue += _sfHasAttenuation.getBinSize();
2677 if(FieldBits::NoField != (AutoCalcRangesFieldMask & whichField))
2679 returnValue += _sfAutoCalcRanges.getBinSize();
2681 if(FieldBits::NoField != (HasRangeCutOnFieldMask & whichField))
2683 returnValue += _sfHasRangeCutOn.getBinSize();
2685 if(FieldBits::NoField != (HasRangeCutOffFieldMask & whichField))
2687 returnValue += _sfHasRangeCutOff.getBinSize();
2689 if(FieldBits::NoField != (HasRangeNearZoneFieldMask & whichField))
2691 returnValue += _sfHasRangeNearZone.getBinSize();
2693 if(FieldBits::NoField != (HasRangeFarZoneFieldMask & whichField))
2695 returnValue += _sfHasRangeFarZone.getBinSize();
2697 if(FieldBits::NoField != (HasCosSpotlightAngleFieldMask & whichField))
2699 returnValue += _sfHasCosSpotlightAngle.getBinSize();
2701 if(FieldBits::NoField != (HasSpotlightAngleFieldMask & whichField))
2703 returnValue += _sfHasSpotlightAngle.getBinSize();
2705 if(FieldBits::NoField != (HasSpotExponentFieldMask & whichField))
2707 returnValue += _sfHasSpotExponent.getBinSize();
2709 if(FieldBits::NoField != (HasCinemaLightFieldMask & whichField))
2711 returnValue += _sfHasCinemaLight.getBinSize();
2713 if(FieldBits::NoField != (PositionFieldMask & whichField))
2715 returnValue += _mfPosition.getBinSize();
2717 if(FieldBits::NoField != (DirectionFieldMask & whichField))
2719 returnValue += _mfDirection.getBinSize();
2721 if(FieldBits::NoField != (ColorFieldMask & whichField))
2723 returnValue += _mfColor.getBinSize();
2725 if(FieldBits::NoField != (IntensityFieldMask & whichField))
2727 returnValue += _mfIntensity.getBinSize();
2729 if(FieldBits::NoField != (AmbientIntensityFieldMask & whichField))
2731 returnValue += _mfAmbientIntensity.getBinSize();
2733 if(FieldBits::NoField != (DiffuseIntensityFieldMask & whichField))
2735 returnValue += _mfDiffuseIntensity.getBinSize();
2737 if(FieldBits::NoField != (SpecularIntensityFieldMask & whichField))
2739 returnValue += _mfSpecularIntensity.getBinSize();
2741 if(FieldBits::NoField != (AttenuationFieldMask & whichField))
2743 returnValue += _mfAttenuation.getBinSize();
2745 if(FieldBits::NoField != (SpotlightAngleFieldMask & whichField))
2747 returnValue += _mfSpotlightAngle.getBinSize();
2749 if(FieldBits::NoField != (SpotExponentFieldMask & whichField))
2751 returnValue += _mfSpotExponent.getBinSize();
2753 if(FieldBits::NoField != (InnerSuperEllipsesWidthFieldMask & whichField))
2755 returnValue += _mfInnerSuperEllipsesWidth.getBinSize();
2757 if(FieldBits::NoField != (InnerSuperEllipsesHeightFieldMask & whichField))
2759 returnValue += _mfInnerSuperEllipsesHeight.getBinSize();
2761 if(FieldBits::NoField != (OuterSuperEllipsesWidthFieldMask & whichField))
2763 returnValue += _mfOuterSuperEllipsesWidth.getBinSize();
2765 if(FieldBits::NoField != (OuterSuperEllipsesHeightFieldMask & whichField))
2767 returnValue += _mfOuterSuperEllipsesHeight.getBinSize();
2769 if(FieldBits::NoField != (SuperEllipsesRoundnessFieldMask & whichField))
2771 returnValue += _mfSuperEllipsesRoundness.getBinSize();
2773 if(FieldBits::NoField != (SuperEllipsesTwistFieldMask & whichField))
2775 returnValue += _mfSuperEllipsesTwist.getBinSize();
2777 if(FieldBits::NoField != (RangeCutOnFieldMask & whichField))
2779 returnValue += _mfRangeCutOn.getBinSize();
2781 if(FieldBits::NoField != (RangeCutOffFieldMask & whichField))
2783 returnValue += _mfRangeCutOff.getBinSize();
2785 if(FieldBits::NoField != (RangeNearZoneFieldMask & whichField))
2787 returnValue += _mfRangeNearZone.getBinSize();
2789 if(FieldBits::NoField != (RangeFarZoneFieldMask & whichField))
2791 returnValue += _mfRangeFarZone.getBinSize();
2793 if(FieldBits::NoField != (TypeFieldMask & whichField))
2795 returnValue += _mfType.getBinSize();
2797 if(FieldBits::NoField != (EnabledFieldMask & whichField))
2799 returnValue += _mfEnabled.getBinSize();
2801 if(FieldBits::NoField != (BeaconFieldMask & whichField))
2803 returnValue += _mfBeacon.getBinSize();
2805 if(FieldBits::NoField != (BeaconMatrixFieldMask & whichField))
2807 returnValue += _mfBeaconMatrix.getBinSize();
2809 if(FieldBits::NoField != (EyeSpaceFieldMask & whichField))
2811 returnValue += _sfEyeSpace.getBinSize();
2813 if(FieldBits::NoField != (LastCamNearFieldMask & whichField))
2815 returnValue += _sfLastCamNear.getBinSize();
2817 if(FieldBits::NoField != (LastCamFarFieldMask & whichField))
2819 returnValue += _sfLastCamFar.getBinSize();
2821 if(FieldBits::NoField != (LastCamToWorldFieldMask & whichField))
2823 returnValue += _sfLastCamToWorld.getBinSize();
2825 if(FieldBits::NoField != (LightBlockNameFieldMask & whichField))
2827 returnValue += _sfLightBlockName.getBinSize();
2829 if(FieldBits::NoField != (LightVariableNameFieldMask & whichField))
2831 returnValue += _sfLightVariableName.getBinSize();
2834 return returnValue;
2837 void MultiLightChunkBase::copyToBin(BinaryDataHandler &pMem,
2838 ConstFieldMaskArg whichField)
2840 Inherited::copyToBin(pMem, whichField);
2842 if(FieldBits::NoField != (HasWorldToLightSpaceMatrixFieldMask & whichField))
2844 _sfHasWorldToLightSpaceMatrix.copyToBin(pMem);
2846 if(FieldBits::NoField != (HasLightToWorldSpaceMatrixFieldMask & whichField))
2848 _sfHasLightToWorldSpaceMatrix.copyToBin(pMem);
2850 if(FieldBits::NoField != (HasEyeToLightSpaceMatrixFieldMask & whichField))
2852 _sfHasEyeToLightSpaceMatrix.copyToBin(pMem);
2854 if(FieldBits::NoField != (HasLightToEyeSpaceMatrixFieldMask & whichField))
2856 _sfHasLightToEyeSpaceMatrix.copyToBin(pMem);
2858 if(FieldBits::NoField != (HasLightPerspectiveMatrixFieldMask & whichField))
2860 _sfHasLightPerspectiveMatrix.copyToBin(pMem);
2862 if(FieldBits::NoField != (HasInvLightPerspectiveMatrixFieldMask & whichField))
2864 _sfHasInvLightPerspectiveMatrix.copyToBin(pMem);
2866 if(FieldBits::NoField != (HasColorFieldMask & whichField))
2868 _sfHasColor.copyToBin(pMem);
2870 if(FieldBits::NoField != (HasIntensityFieldMask & whichField))
2872 _sfHasIntensity.copyToBin(pMem);
2874 if(FieldBits::NoField != (HasSeparateIntensitiesFieldMask & whichField))
2876 _sfHasSeparateIntensities.copyToBin(pMem);
2878 if(FieldBits::NoField != (HasAttenuationFieldMask & whichField))
2880 _sfHasAttenuation.copyToBin(pMem);
2882 if(FieldBits::NoField != (AutoCalcRangesFieldMask & whichField))
2884 _sfAutoCalcRanges.copyToBin(pMem);
2886 if(FieldBits::NoField != (HasRangeCutOnFieldMask & whichField))
2888 _sfHasRangeCutOn.copyToBin(pMem);
2890 if(FieldBits::NoField != (HasRangeCutOffFieldMask & whichField))
2892 _sfHasRangeCutOff.copyToBin(pMem);
2894 if(FieldBits::NoField != (HasRangeNearZoneFieldMask & whichField))
2896 _sfHasRangeNearZone.copyToBin(pMem);
2898 if(FieldBits::NoField != (HasRangeFarZoneFieldMask & whichField))
2900 _sfHasRangeFarZone.copyToBin(pMem);
2902 if(FieldBits::NoField != (HasCosSpotlightAngleFieldMask & whichField))
2904 _sfHasCosSpotlightAngle.copyToBin(pMem);
2906 if(FieldBits::NoField != (HasSpotlightAngleFieldMask & whichField))
2908 _sfHasSpotlightAngle.copyToBin(pMem);
2910 if(FieldBits::NoField != (HasSpotExponentFieldMask & whichField))
2912 _sfHasSpotExponent.copyToBin(pMem);
2914 if(FieldBits::NoField != (HasCinemaLightFieldMask & whichField))
2916 _sfHasCinemaLight.copyToBin(pMem);
2918 if(FieldBits::NoField != (PositionFieldMask & whichField))
2920 _mfPosition.copyToBin(pMem);
2922 if(FieldBits::NoField != (DirectionFieldMask & whichField))
2924 _mfDirection.copyToBin(pMem);
2926 if(FieldBits::NoField != (ColorFieldMask & whichField))
2928 _mfColor.copyToBin(pMem);
2930 if(FieldBits::NoField != (IntensityFieldMask & whichField))
2932 _mfIntensity.copyToBin(pMem);
2934 if(FieldBits::NoField != (AmbientIntensityFieldMask & whichField))
2936 _mfAmbientIntensity.copyToBin(pMem);
2938 if(FieldBits::NoField != (DiffuseIntensityFieldMask & whichField))
2940 _mfDiffuseIntensity.copyToBin(pMem);
2942 if(FieldBits::NoField != (SpecularIntensityFieldMask & whichField))
2944 _mfSpecularIntensity.copyToBin(pMem);
2946 if(FieldBits::NoField != (AttenuationFieldMask & whichField))
2948 _mfAttenuation.copyToBin(pMem);
2950 if(FieldBits::NoField != (SpotlightAngleFieldMask & whichField))
2952 _mfSpotlightAngle.copyToBin(pMem);
2954 if(FieldBits::NoField != (SpotExponentFieldMask & whichField))
2956 _mfSpotExponent.copyToBin(pMem);
2958 if(FieldBits::NoField != (InnerSuperEllipsesWidthFieldMask & whichField))
2960 _mfInnerSuperEllipsesWidth.copyToBin(pMem);
2962 if(FieldBits::NoField != (InnerSuperEllipsesHeightFieldMask & whichField))
2964 _mfInnerSuperEllipsesHeight.copyToBin(pMem);
2966 if(FieldBits::NoField != (OuterSuperEllipsesWidthFieldMask & whichField))
2968 _mfOuterSuperEllipsesWidth.copyToBin(pMem);
2970 if(FieldBits::NoField != (OuterSuperEllipsesHeightFieldMask & whichField))
2972 _mfOuterSuperEllipsesHeight.copyToBin(pMem);
2974 if(FieldBits::NoField != (SuperEllipsesRoundnessFieldMask & whichField))
2976 _mfSuperEllipsesRoundness.copyToBin(pMem);
2978 if(FieldBits::NoField != (SuperEllipsesTwistFieldMask & whichField))
2980 _mfSuperEllipsesTwist.copyToBin(pMem);
2982 if(FieldBits::NoField != (RangeCutOnFieldMask & whichField))
2984 _mfRangeCutOn.copyToBin(pMem);
2986 if(FieldBits::NoField != (RangeCutOffFieldMask & whichField))
2988 _mfRangeCutOff.copyToBin(pMem);
2990 if(FieldBits::NoField != (RangeNearZoneFieldMask & whichField))
2992 _mfRangeNearZone.copyToBin(pMem);
2994 if(FieldBits::NoField != (RangeFarZoneFieldMask & whichField))
2996 _mfRangeFarZone.copyToBin(pMem);
2998 if(FieldBits::NoField != (TypeFieldMask & whichField))
3000 _mfType.copyToBin(pMem);
3002 if(FieldBits::NoField != (EnabledFieldMask & whichField))
3004 _mfEnabled.copyToBin(pMem);
3006 if(FieldBits::NoField != (BeaconFieldMask & whichField))
3008 _mfBeacon.copyToBin(pMem);
3010 if(FieldBits::NoField != (BeaconMatrixFieldMask & whichField))
3012 _mfBeaconMatrix.copyToBin(pMem);
3014 if(FieldBits::NoField != (EyeSpaceFieldMask & whichField))
3016 _sfEyeSpace.copyToBin(pMem);
3018 if(FieldBits::NoField != (LastCamNearFieldMask & whichField))
3020 _sfLastCamNear.copyToBin(pMem);
3022 if(FieldBits::NoField != (LastCamFarFieldMask & whichField))
3024 _sfLastCamFar.copyToBin(pMem);
3026 if(FieldBits::NoField != (LastCamToWorldFieldMask & whichField))
3028 _sfLastCamToWorld.copyToBin(pMem);
3030 if(FieldBits::NoField != (LightBlockNameFieldMask & whichField))
3032 _sfLightBlockName.copyToBin(pMem);
3034 if(FieldBits::NoField != (LightVariableNameFieldMask & whichField))
3036 _sfLightVariableName.copyToBin(pMem);
3040 void MultiLightChunkBase::copyFromBin(BinaryDataHandler &pMem,
3041 ConstFieldMaskArg whichField)
3043 Inherited::copyFromBin(pMem, whichField);
3045 if(FieldBits::NoField != (HasWorldToLightSpaceMatrixFieldMask & whichField))
3047 editSField(HasWorldToLightSpaceMatrixFieldMask);
3048 _sfHasWorldToLightSpaceMatrix.copyFromBin(pMem);
3050 if(FieldBits::NoField != (HasLightToWorldSpaceMatrixFieldMask & whichField))
3052 editSField(HasLightToWorldSpaceMatrixFieldMask);
3053 _sfHasLightToWorldSpaceMatrix.copyFromBin(pMem);
3055 if(FieldBits::NoField != (HasEyeToLightSpaceMatrixFieldMask & whichField))
3057 editSField(HasEyeToLightSpaceMatrixFieldMask);
3058 _sfHasEyeToLightSpaceMatrix.copyFromBin(pMem);
3060 if(FieldBits::NoField != (HasLightToEyeSpaceMatrixFieldMask & whichField))
3062 editSField(HasLightToEyeSpaceMatrixFieldMask);
3063 _sfHasLightToEyeSpaceMatrix.copyFromBin(pMem);
3065 if(FieldBits::NoField != (HasLightPerspectiveMatrixFieldMask & whichField))
3067 editSField(HasLightPerspectiveMatrixFieldMask);
3068 _sfHasLightPerspectiveMatrix.copyFromBin(pMem);
3070 if(FieldBits::NoField != (HasInvLightPerspectiveMatrixFieldMask & whichField))
3072 editSField(HasInvLightPerspectiveMatrixFieldMask);
3073 _sfHasInvLightPerspectiveMatrix.copyFromBin(pMem);
3075 if(FieldBits::NoField != (HasColorFieldMask & whichField))
3077 editSField(HasColorFieldMask);
3078 _sfHasColor.copyFromBin(pMem);
3080 if(FieldBits::NoField != (HasIntensityFieldMask & whichField))
3082 editSField(HasIntensityFieldMask);
3083 _sfHasIntensity.copyFromBin(pMem);
3085 if(FieldBits::NoField != (HasSeparateIntensitiesFieldMask & whichField))
3087 editSField(HasSeparateIntensitiesFieldMask);
3088 _sfHasSeparateIntensities.copyFromBin(pMem);
3090 if(FieldBits::NoField != (HasAttenuationFieldMask & whichField))
3092 editSField(HasAttenuationFieldMask);
3093 _sfHasAttenuation.copyFromBin(pMem);
3095 if(FieldBits::NoField != (AutoCalcRangesFieldMask & whichField))
3097 editSField(AutoCalcRangesFieldMask);
3098 _sfAutoCalcRanges.copyFromBin(pMem);
3100 if(FieldBits::NoField != (HasRangeCutOnFieldMask & whichField))
3102 editSField(HasRangeCutOnFieldMask);
3103 _sfHasRangeCutOn.copyFromBin(pMem);
3105 if(FieldBits::NoField != (HasRangeCutOffFieldMask & whichField))
3107 editSField(HasRangeCutOffFieldMask);
3108 _sfHasRangeCutOff.copyFromBin(pMem);
3110 if(FieldBits::NoField != (HasRangeNearZoneFieldMask & whichField))
3112 editSField(HasRangeNearZoneFieldMask);
3113 _sfHasRangeNearZone.copyFromBin(pMem);
3115 if(FieldBits::NoField != (HasRangeFarZoneFieldMask & whichField))
3117 editSField(HasRangeFarZoneFieldMask);
3118 _sfHasRangeFarZone.copyFromBin(pMem);
3120 if(FieldBits::NoField != (HasCosSpotlightAngleFieldMask & whichField))
3122 editSField(HasCosSpotlightAngleFieldMask);
3123 _sfHasCosSpotlightAngle.copyFromBin(pMem);
3125 if(FieldBits::NoField != (HasSpotlightAngleFieldMask & whichField))
3127 editSField(HasSpotlightAngleFieldMask);
3128 _sfHasSpotlightAngle.copyFromBin(pMem);
3130 if(FieldBits::NoField != (HasSpotExponentFieldMask & whichField))
3132 editSField(HasSpotExponentFieldMask);
3133 _sfHasSpotExponent.copyFromBin(pMem);
3135 if(FieldBits::NoField != (HasCinemaLightFieldMask & whichField))
3137 editSField(HasCinemaLightFieldMask);
3138 _sfHasCinemaLight.copyFromBin(pMem);
3140 if(FieldBits::NoField != (PositionFieldMask & whichField))
3142 editMField(PositionFieldMask, _mfPosition);
3143 _mfPosition.copyFromBin(pMem);
3145 if(FieldBits::NoField != (DirectionFieldMask & whichField))
3147 editMField(DirectionFieldMask, _mfDirection);
3148 _mfDirection.copyFromBin(pMem);
3150 if(FieldBits::NoField != (ColorFieldMask & whichField))
3152 editMField(ColorFieldMask, _mfColor);
3153 _mfColor.copyFromBin(pMem);
3155 if(FieldBits::NoField != (IntensityFieldMask & whichField))
3157 editMField(IntensityFieldMask, _mfIntensity);
3158 _mfIntensity.copyFromBin(pMem);
3160 if(FieldBits::NoField != (AmbientIntensityFieldMask & whichField))
3162 editMField(AmbientIntensityFieldMask, _mfAmbientIntensity);
3163 _mfAmbientIntensity.copyFromBin(pMem);
3165 if(FieldBits::NoField != (DiffuseIntensityFieldMask & whichField))
3167 editMField(DiffuseIntensityFieldMask, _mfDiffuseIntensity);
3168 _mfDiffuseIntensity.copyFromBin(pMem);
3170 if(FieldBits::NoField != (SpecularIntensityFieldMask & whichField))
3172 editMField(SpecularIntensityFieldMask, _mfSpecularIntensity);
3173 _mfSpecularIntensity.copyFromBin(pMem);
3175 if(FieldBits::NoField != (AttenuationFieldMask & whichField))
3177 editMField(AttenuationFieldMask, _mfAttenuation);
3178 _mfAttenuation.copyFromBin(pMem);
3180 if(FieldBits::NoField != (SpotlightAngleFieldMask & whichField))
3182 editMField(SpotlightAngleFieldMask, _mfSpotlightAngle);
3183 _mfSpotlightAngle.copyFromBin(pMem);
3185 if(FieldBits::NoField != (SpotExponentFieldMask & whichField))
3187 editMField(SpotExponentFieldMask, _mfSpotExponent);
3188 _mfSpotExponent.copyFromBin(pMem);
3190 if(FieldBits::NoField != (InnerSuperEllipsesWidthFieldMask & whichField))
3192 editMField(InnerSuperEllipsesWidthFieldMask, _mfInnerSuperEllipsesWidth);
3193 _mfInnerSuperEllipsesWidth.copyFromBin(pMem);
3195 if(FieldBits::NoField != (InnerSuperEllipsesHeightFieldMask & whichField))
3197 editMField(InnerSuperEllipsesHeightFieldMask, _mfInnerSuperEllipsesHeight);
3198 _mfInnerSuperEllipsesHeight.copyFromBin(pMem);
3200 if(FieldBits::NoField != (OuterSuperEllipsesWidthFieldMask & whichField))
3202 editMField(OuterSuperEllipsesWidthFieldMask, _mfOuterSuperEllipsesWidth);
3203 _mfOuterSuperEllipsesWidth.copyFromBin(pMem);
3205 if(FieldBits::NoField != (OuterSuperEllipsesHeightFieldMask & whichField))
3207 editMField(OuterSuperEllipsesHeightFieldMask, _mfOuterSuperEllipsesHeight);
3208 _mfOuterSuperEllipsesHeight.copyFromBin(pMem);
3210 if(FieldBits::NoField != (SuperEllipsesRoundnessFieldMask & whichField))
3212 editMField(SuperEllipsesRoundnessFieldMask, _mfSuperEllipsesRoundness);
3213 _mfSuperEllipsesRoundness.copyFromBin(pMem);
3215 if(FieldBits::NoField != (SuperEllipsesTwistFieldMask & whichField))
3217 editMField(SuperEllipsesTwistFieldMask, _mfSuperEllipsesTwist);
3218 _mfSuperEllipsesTwist.copyFromBin(pMem);
3220 if(FieldBits::NoField != (RangeCutOnFieldMask & whichField))
3222 editMField(RangeCutOnFieldMask, _mfRangeCutOn);
3223 _mfRangeCutOn.copyFromBin(pMem);
3225 if(FieldBits::NoField != (RangeCutOffFieldMask & whichField))
3227 editMField(RangeCutOffFieldMask, _mfRangeCutOff);
3228 _mfRangeCutOff.copyFromBin(pMem);
3230 if(FieldBits::NoField != (RangeNearZoneFieldMask & whichField))
3232 editMField(RangeNearZoneFieldMask, _mfRangeNearZone);
3233 _mfRangeNearZone.copyFromBin(pMem);
3235 if(FieldBits::NoField != (RangeFarZoneFieldMask & whichField))
3237 editMField(RangeFarZoneFieldMask, _mfRangeFarZone);
3238 _mfRangeFarZone.copyFromBin(pMem);
3240 if(FieldBits::NoField != (TypeFieldMask & whichField))
3242 editMField(TypeFieldMask, _mfType);
3243 _mfType.copyFromBin(pMem);
3245 if(FieldBits::NoField != (EnabledFieldMask & whichField))
3247 editMField(EnabledFieldMask, _mfEnabled);
3248 _mfEnabled.copyFromBin(pMem);
3250 if(FieldBits::NoField != (BeaconFieldMask & whichField))
3252 editMField(BeaconFieldMask, _mfBeacon);
3253 _mfBeacon.copyFromBin(pMem);
3255 if(FieldBits::NoField != (BeaconMatrixFieldMask & whichField))
3257 editMField(BeaconMatrixFieldMask, _mfBeaconMatrix);
3258 _mfBeaconMatrix.copyFromBin(pMem);
3260 if(FieldBits::NoField != (EyeSpaceFieldMask & whichField))
3262 editSField(EyeSpaceFieldMask);
3263 _sfEyeSpace.copyFromBin(pMem);
3265 if(FieldBits::NoField != (LastCamNearFieldMask & whichField))
3267 editSField(LastCamNearFieldMask);
3268 _sfLastCamNear.copyFromBin(pMem);
3270 if(FieldBits::NoField != (LastCamFarFieldMask & whichField))
3272 editSField(LastCamFarFieldMask);
3273 _sfLastCamFar.copyFromBin(pMem);
3275 if(FieldBits::NoField != (LastCamToWorldFieldMask & whichField))
3277 editSField(LastCamToWorldFieldMask);
3278 _sfLastCamToWorld.copyFromBin(pMem);
3280 if(FieldBits::NoField != (LightBlockNameFieldMask & whichField))
3282 editSField(LightBlockNameFieldMask);
3283 _sfLightBlockName.copyFromBin(pMem);
3285 if(FieldBits::NoField != (LightVariableNameFieldMask & whichField))
3287 editSField(LightVariableNameFieldMask);
3288 _sfLightVariableName.copyFromBin(pMem);
3292 //! create a new instance of the class
3293 MultiLightChunkTransitPtr MultiLightChunkBase::createLocal(BitVector bFlags)
3295 MultiLightChunkTransitPtr fc;
3297 if(getClassType().getPrototype() != NULL)
3299 FieldContainerTransitPtr tmpPtr =
3300 getClassType().getPrototype()-> shallowCopyLocal(bFlags);
3302 fc = dynamic_pointer_cast<MultiLightChunk>(tmpPtr);
3305 return fc;
3308 //! create a new instance of the class, copy the container flags
3309 MultiLightChunkTransitPtr MultiLightChunkBase::createDependent(BitVector bFlags)
3311 MultiLightChunkTransitPtr fc;
3313 if(getClassType().getPrototype() != NULL)
3315 FieldContainerTransitPtr tmpPtr =
3316 getClassType().getPrototype()-> shallowCopyDependent(bFlags);
3318 fc = dynamic_pointer_cast<MultiLightChunk>(tmpPtr);
3321 return fc;
3324 //! create a new instance of the class
3325 MultiLightChunkTransitPtr MultiLightChunkBase::create(void)
3327 MultiLightChunkTransitPtr fc;
3329 if(getClassType().getPrototype() != NULL)
3331 FieldContainerTransitPtr tmpPtr =
3332 getClassType().getPrototype()-> shallowCopy();
3334 fc = dynamic_pointer_cast<MultiLightChunk>(tmpPtr);
3337 return fc;
3340 MultiLightChunk *MultiLightChunkBase::createEmptyLocal(BitVector bFlags)
3342 MultiLightChunk *returnValue;
3344 newPtr<MultiLightChunk>(returnValue, bFlags);
3346 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
3348 return returnValue;
3351 //! create an empty new instance of the class, do not copy the prototype
3352 MultiLightChunk *MultiLightChunkBase::createEmpty(void)
3354 MultiLightChunk *returnValue;
3356 newPtr<MultiLightChunk>(returnValue, Thread::getCurrentLocalFlags());
3358 returnValue->_pFieldFlags->_bNamespaceMask &=
3359 ~Thread::getCurrentLocalFlags();
3361 return returnValue;
3365 FieldContainerTransitPtr MultiLightChunkBase::shallowCopyLocal(
3366 BitVector bFlags) const
3368 MultiLightChunk *tmpPtr;
3370 newPtr(tmpPtr, dynamic_cast<const MultiLightChunk *>(this), bFlags);
3372 FieldContainerTransitPtr returnValue(tmpPtr);
3374 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags;
3376 return returnValue;
3379 FieldContainerTransitPtr MultiLightChunkBase::shallowCopyDependent(
3380 BitVector bFlags) const
3382 MultiLightChunk *tmpPtr;
3384 newPtr(tmpPtr, dynamic_cast<const MultiLightChunk *>(this), ~bFlags);
3386 FieldContainerTransitPtr returnValue(tmpPtr);
3388 tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags;
3390 return returnValue;
3393 FieldContainerTransitPtr MultiLightChunkBase::shallowCopy(void) const
3395 MultiLightChunk *tmpPtr;
3397 newPtr(tmpPtr,
3398 dynamic_cast<const MultiLightChunk *>(this),
3399 Thread::getCurrentLocalFlags());
3401 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags();
3403 FieldContainerTransitPtr returnValue(tmpPtr);
3405 return returnValue;
3411 /*------------------------- constructors ----------------------------------*/
3413 MultiLightChunkBase::MultiLightChunkBase(void) :
3414 Inherited(),
3415 _sfHasWorldToLightSpaceMatrix(bool(false)),
3416 _sfHasLightToWorldSpaceMatrix(bool(false)),
3417 _sfHasEyeToLightSpaceMatrix(bool(false)),
3418 _sfHasLightToEyeSpaceMatrix(bool(false)),
3419 _sfHasLightPerspectiveMatrix(bool(false)),
3420 _sfHasInvLightPerspectiveMatrix(bool(false)),
3421 _sfHasColor (bool(false)),
3422 _sfHasIntensity (bool(false)),
3423 _sfHasSeparateIntensities (bool(true)),
3424 _sfHasAttenuation (bool(true)),
3425 _sfAutoCalcRanges (bool(true)),
3426 _sfHasRangeCutOn (bool(false)),
3427 _sfHasRangeCutOff (bool(false)),
3428 _sfHasRangeNearZone (bool(false)),
3429 _sfHasRangeFarZone (bool(false)),
3430 _sfHasCosSpotlightAngle (bool(true)),
3431 _sfHasSpotlightAngle (bool(false)),
3432 _sfHasSpotExponent (bool(true)),
3433 _sfHasCinemaLight (bool(false)),
3434 _mfPosition (),
3435 _mfDirection (),
3436 _mfColor (),
3437 _mfIntensity (),
3438 _mfAmbientIntensity (),
3439 _mfDiffuseIntensity (),
3440 _mfSpecularIntensity (),
3441 _mfAttenuation (),
3442 _mfSpotlightAngle (),
3443 _mfSpotExponent (),
3444 _mfInnerSuperEllipsesWidth(),
3445 _mfInnerSuperEllipsesHeight(),
3446 _mfOuterSuperEllipsesWidth(),
3447 _mfOuterSuperEllipsesHeight(),
3448 _mfSuperEllipsesRoundness (),
3449 _mfSuperEllipsesTwist (),
3450 _mfRangeCutOn (),
3451 _mfRangeCutOff (),
3452 _mfRangeNearZone (),
3453 _mfRangeFarZone (),
3454 _mfType (),
3455 _mfEnabled (),
3456 _mfBeacon (),
3457 _mfBeaconMatrix (),
3458 _sfEyeSpace (bool(false)),
3459 _sfLastCamNear (Real32(0.f)),
3460 _sfLastCamFar (Real32(0.f)),
3461 _sfLastCamToWorld (),
3462 _sfLightBlockName (std::string("Lights")),
3463 _sfLightVariableName (std::string("lights"))
3467 MultiLightChunkBase::MultiLightChunkBase(const MultiLightChunkBase &source) :
3468 Inherited(source),
3469 _sfHasWorldToLightSpaceMatrix(source._sfHasWorldToLightSpaceMatrix),
3470 _sfHasLightToWorldSpaceMatrix(source._sfHasLightToWorldSpaceMatrix),
3471 _sfHasEyeToLightSpaceMatrix(source._sfHasEyeToLightSpaceMatrix),
3472 _sfHasLightToEyeSpaceMatrix(source._sfHasLightToEyeSpaceMatrix),
3473 _sfHasLightPerspectiveMatrix(source._sfHasLightPerspectiveMatrix),
3474 _sfHasInvLightPerspectiveMatrix(source._sfHasInvLightPerspectiveMatrix),
3475 _sfHasColor (source._sfHasColor ),
3476 _sfHasIntensity (source._sfHasIntensity ),
3477 _sfHasSeparateIntensities (source._sfHasSeparateIntensities ),
3478 _sfHasAttenuation (source._sfHasAttenuation ),
3479 _sfAutoCalcRanges (source._sfAutoCalcRanges ),
3480 _sfHasRangeCutOn (source._sfHasRangeCutOn ),
3481 _sfHasRangeCutOff (source._sfHasRangeCutOff ),
3482 _sfHasRangeNearZone (source._sfHasRangeNearZone ),
3483 _sfHasRangeFarZone (source._sfHasRangeFarZone ),
3484 _sfHasCosSpotlightAngle (source._sfHasCosSpotlightAngle ),
3485 _sfHasSpotlightAngle (source._sfHasSpotlightAngle ),
3486 _sfHasSpotExponent (source._sfHasSpotExponent ),
3487 _sfHasCinemaLight (source._sfHasCinemaLight ),
3488 _mfPosition (source._mfPosition ),
3489 _mfDirection (source._mfDirection ),
3490 _mfColor (source._mfColor ),
3491 _mfIntensity (source._mfIntensity ),
3492 _mfAmbientIntensity (source._mfAmbientIntensity ),
3493 _mfDiffuseIntensity (source._mfDiffuseIntensity ),
3494 _mfSpecularIntensity (source._mfSpecularIntensity ),
3495 _mfAttenuation (source._mfAttenuation ),
3496 _mfSpotlightAngle (source._mfSpotlightAngle ),
3497 _mfSpotExponent (source._mfSpotExponent ),
3498 _mfInnerSuperEllipsesWidth(source._mfInnerSuperEllipsesWidth),
3499 _mfInnerSuperEllipsesHeight(source._mfInnerSuperEllipsesHeight),
3500 _mfOuterSuperEllipsesWidth(source._mfOuterSuperEllipsesWidth),
3501 _mfOuterSuperEllipsesHeight(source._mfOuterSuperEllipsesHeight),
3502 _mfSuperEllipsesRoundness (source._mfSuperEllipsesRoundness ),
3503 _mfSuperEllipsesTwist (source._mfSuperEllipsesTwist ),
3504 _mfRangeCutOn (source._mfRangeCutOn ),
3505 _mfRangeCutOff (source._mfRangeCutOff ),
3506 _mfRangeNearZone (source._mfRangeNearZone ),
3507 _mfRangeFarZone (source._mfRangeFarZone ),
3508 _mfType (source._mfType ),
3509 _mfEnabled (source._mfEnabled ),
3510 _mfBeacon (),
3511 _mfBeaconMatrix (source._mfBeaconMatrix ),
3512 _sfEyeSpace (source._sfEyeSpace ),
3513 _sfLastCamNear (source._sfLastCamNear ),
3514 _sfLastCamFar (source._sfLastCamFar ),
3515 _sfLastCamToWorld (source._sfLastCamToWorld ),
3516 _sfLightBlockName (source._sfLightBlockName ),
3517 _sfLightVariableName (source._sfLightVariableName )
3522 /*-------------------------- destructors ----------------------------------*/
3524 MultiLightChunkBase::~MultiLightChunkBase(void)
3528 void MultiLightChunkBase::onCreate(const MultiLightChunk *source)
3530 Inherited::onCreate(source);
3532 if(source != NULL)
3534 MultiLightChunk *pThis = static_cast<MultiLightChunk *>(this);
3536 MFWeakNodePtr::const_iterator BeaconIt =
3537 source->_mfBeacon.begin();
3538 MFWeakNodePtr::const_iterator BeaconEnd =
3539 source->_mfBeacon.end ();
3541 while(BeaconIt != BeaconEnd)
3543 pThis->pushToBeacon(*BeaconIt);
3545 ++BeaconIt;
3550 GetFieldHandlePtr MultiLightChunkBase::getHandleHasWorldToLightSpaceMatrix (void) const
3552 SFBool::GetHandlePtr returnValue(
3553 new SFBool::GetHandle(
3554 &_sfHasWorldToLightSpaceMatrix,
3555 this->getType().getFieldDesc(HasWorldToLightSpaceMatrixFieldId),
3556 const_cast<MultiLightChunkBase *>(this)));
3558 return returnValue;
3561 EditFieldHandlePtr MultiLightChunkBase::editHandleHasWorldToLightSpaceMatrix(void)
3563 SFBool::EditHandlePtr returnValue(
3564 new SFBool::EditHandle(
3565 &_sfHasWorldToLightSpaceMatrix,
3566 this->getType().getFieldDesc(HasWorldToLightSpaceMatrixFieldId),
3567 this));
3570 editSField(HasWorldToLightSpaceMatrixFieldMask);
3572 return returnValue;
3575 GetFieldHandlePtr MultiLightChunkBase::getHandleHasLightToWorldSpaceMatrix (void) const
3577 SFBool::GetHandlePtr returnValue(
3578 new SFBool::GetHandle(
3579 &_sfHasLightToWorldSpaceMatrix,
3580 this->getType().getFieldDesc(HasLightToWorldSpaceMatrixFieldId),
3581 const_cast<MultiLightChunkBase *>(this)));
3583 return returnValue;
3586 EditFieldHandlePtr MultiLightChunkBase::editHandleHasLightToWorldSpaceMatrix(void)
3588 SFBool::EditHandlePtr returnValue(
3589 new SFBool::EditHandle(
3590 &_sfHasLightToWorldSpaceMatrix,
3591 this->getType().getFieldDesc(HasLightToWorldSpaceMatrixFieldId),
3592 this));
3595 editSField(HasLightToWorldSpaceMatrixFieldMask);
3597 return returnValue;
3600 GetFieldHandlePtr MultiLightChunkBase::getHandleHasEyeToLightSpaceMatrix (void) const
3602 SFBool::GetHandlePtr returnValue(
3603 new SFBool::GetHandle(
3604 &_sfHasEyeToLightSpaceMatrix,
3605 this->getType().getFieldDesc(HasEyeToLightSpaceMatrixFieldId),
3606 const_cast<MultiLightChunkBase *>(this)));
3608 return returnValue;
3611 EditFieldHandlePtr MultiLightChunkBase::editHandleHasEyeToLightSpaceMatrix(void)
3613 SFBool::EditHandlePtr returnValue(
3614 new SFBool::EditHandle(
3615 &_sfHasEyeToLightSpaceMatrix,
3616 this->getType().getFieldDesc(HasEyeToLightSpaceMatrixFieldId),
3617 this));
3620 editSField(HasEyeToLightSpaceMatrixFieldMask);
3622 return returnValue;
3625 GetFieldHandlePtr MultiLightChunkBase::getHandleHasLightToEyeSpaceMatrix (void) const
3627 SFBool::GetHandlePtr returnValue(
3628 new SFBool::GetHandle(
3629 &_sfHasLightToEyeSpaceMatrix,
3630 this->getType().getFieldDesc(HasLightToEyeSpaceMatrixFieldId),
3631 const_cast<MultiLightChunkBase *>(this)));
3633 return returnValue;
3636 EditFieldHandlePtr MultiLightChunkBase::editHandleHasLightToEyeSpaceMatrix(void)
3638 SFBool::EditHandlePtr returnValue(
3639 new SFBool::EditHandle(
3640 &_sfHasLightToEyeSpaceMatrix,
3641 this->getType().getFieldDesc(HasLightToEyeSpaceMatrixFieldId),
3642 this));
3645 editSField(HasLightToEyeSpaceMatrixFieldMask);
3647 return returnValue;
3650 GetFieldHandlePtr MultiLightChunkBase::getHandleHasLightPerspectiveMatrix (void) const
3652 SFBool::GetHandlePtr returnValue(
3653 new SFBool::GetHandle(
3654 &_sfHasLightPerspectiveMatrix,
3655 this->getType().getFieldDesc(HasLightPerspectiveMatrixFieldId),
3656 const_cast<MultiLightChunkBase *>(this)));
3658 return returnValue;
3661 EditFieldHandlePtr MultiLightChunkBase::editHandleHasLightPerspectiveMatrix(void)
3663 SFBool::EditHandlePtr returnValue(
3664 new SFBool::EditHandle(
3665 &_sfHasLightPerspectiveMatrix,
3666 this->getType().getFieldDesc(HasLightPerspectiveMatrixFieldId),
3667 this));
3670 editSField(HasLightPerspectiveMatrixFieldMask);
3672 return returnValue;
3675 GetFieldHandlePtr MultiLightChunkBase::getHandleHasInvLightPerspectiveMatrix (void) const
3677 SFBool::GetHandlePtr returnValue(
3678 new SFBool::GetHandle(
3679 &_sfHasInvLightPerspectiveMatrix,
3680 this->getType().getFieldDesc(HasInvLightPerspectiveMatrixFieldId),
3681 const_cast<MultiLightChunkBase *>(this)));
3683 return returnValue;
3686 EditFieldHandlePtr MultiLightChunkBase::editHandleHasInvLightPerspectiveMatrix(void)
3688 SFBool::EditHandlePtr returnValue(
3689 new SFBool::EditHandle(
3690 &_sfHasInvLightPerspectiveMatrix,
3691 this->getType().getFieldDesc(HasInvLightPerspectiveMatrixFieldId),
3692 this));
3695 editSField(HasInvLightPerspectiveMatrixFieldMask);
3697 return returnValue;
3700 GetFieldHandlePtr MultiLightChunkBase::getHandleHasColor (void) const
3702 SFBool::GetHandlePtr returnValue(
3703 new SFBool::GetHandle(
3704 &_sfHasColor,
3705 this->getType().getFieldDesc(HasColorFieldId),
3706 const_cast<MultiLightChunkBase *>(this)));
3708 return returnValue;
3711 EditFieldHandlePtr MultiLightChunkBase::editHandleHasColor (void)
3713 SFBool::EditHandlePtr returnValue(
3714 new SFBool::EditHandle(
3715 &_sfHasColor,
3716 this->getType().getFieldDesc(HasColorFieldId),
3717 this));
3720 editSField(HasColorFieldMask);
3722 return returnValue;
3725 GetFieldHandlePtr MultiLightChunkBase::getHandleHasIntensity (void) const
3727 SFBool::GetHandlePtr returnValue(
3728 new SFBool::GetHandle(
3729 &_sfHasIntensity,
3730 this->getType().getFieldDesc(HasIntensityFieldId),
3731 const_cast<MultiLightChunkBase *>(this)));
3733 return returnValue;
3736 EditFieldHandlePtr MultiLightChunkBase::editHandleHasIntensity (void)
3738 SFBool::EditHandlePtr returnValue(
3739 new SFBool::EditHandle(
3740 &_sfHasIntensity,
3741 this->getType().getFieldDesc(HasIntensityFieldId),
3742 this));
3745 editSField(HasIntensityFieldMask);
3747 return returnValue;
3750 GetFieldHandlePtr MultiLightChunkBase::getHandleHasSeparateIntensities (void) const
3752 SFBool::GetHandlePtr returnValue(
3753 new SFBool::GetHandle(
3754 &_sfHasSeparateIntensities,
3755 this->getType().getFieldDesc(HasSeparateIntensitiesFieldId),
3756 const_cast<MultiLightChunkBase *>(this)));
3758 return returnValue;
3761 EditFieldHandlePtr MultiLightChunkBase::editHandleHasSeparateIntensities(void)
3763 SFBool::EditHandlePtr returnValue(
3764 new SFBool::EditHandle(
3765 &_sfHasSeparateIntensities,
3766 this->getType().getFieldDesc(HasSeparateIntensitiesFieldId),
3767 this));
3770 editSField(HasSeparateIntensitiesFieldMask);
3772 return returnValue;
3775 GetFieldHandlePtr MultiLightChunkBase::getHandleHasAttenuation (void) const
3777 SFBool::GetHandlePtr returnValue(
3778 new SFBool::GetHandle(
3779 &_sfHasAttenuation,
3780 this->getType().getFieldDesc(HasAttenuationFieldId),
3781 const_cast<MultiLightChunkBase *>(this)));
3783 return returnValue;
3786 EditFieldHandlePtr MultiLightChunkBase::editHandleHasAttenuation (void)
3788 SFBool::EditHandlePtr returnValue(
3789 new SFBool::EditHandle(
3790 &_sfHasAttenuation,
3791 this->getType().getFieldDesc(HasAttenuationFieldId),
3792 this));
3795 editSField(HasAttenuationFieldMask);
3797 return returnValue;
3800 GetFieldHandlePtr MultiLightChunkBase::getHandleAutoCalcRanges (void) const
3802 SFBool::GetHandlePtr returnValue(
3803 new SFBool::GetHandle(
3804 &_sfAutoCalcRanges,
3805 this->getType().getFieldDesc(AutoCalcRangesFieldId),
3806 const_cast<MultiLightChunkBase *>(this)));
3808 return returnValue;
3811 EditFieldHandlePtr MultiLightChunkBase::editHandleAutoCalcRanges (void)
3813 SFBool::EditHandlePtr returnValue(
3814 new SFBool::EditHandle(
3815 &_sfAutoCalcRanges,
3816 this->getType().getFieldDesc(AutoCalcRangesFieldId),
3817 this));
3820 editSField(AutoCalcRangesFieldMask);
3822 return returnValue;
3825 GetFieldHandlePtr MultiLightChunkBase::getHandleHasRangeCutOn (void) const
3827 SFBool::GetHandlePtr returnValue(
3828 new SFBool::GetHandle(
3829 &_sfHasRangeCutOn,
3830 this->getType().getFieldDesc(HasRangeCutOnFieldId),
3831 const_cast<MultiLightChunkBase *>(this)));
3833 return returnValue;
3836 EditFieldHandlePtr MultiLightChunkBase::editHandleHasRangeCutOn (void)
3838 SFBool::EditHandlePtr returnValue(
3839 new SFBool::EditHandle(
3840 &_sfHasRangeCutOn,
3841 this->getType().getFieldDesc(HasRangeCutOnFieldId),
3842 this));
3845 editSField(HasRangeCutOnFieldMask);
3847 return returnValue;
3850 GetFieldHandlePtr MultiLightChunkBase::getHandleHasRangeCutOff (void) const
3852 SFBool::GetHandlePtr returnValue(
3853 new SFBool::GetHandle(
3854 &_sfHasRangeCutOff,
3855 this->getType().getFieldDesc(HasRangeCutOffFieldId),
3856 const_cast<MultiLightChunkBase *>(this)));
3858 return returnValue;
3861 EditFieldHandlePtr MultiLightChunkBase::editHandleHasRangeCutOff (void)
3863 SFBool::EditHandlePtr returnValue(
3864 new SFBool::EditHandle(
3865 &_sfHasRangeCutOff,
3866 this->getType().getFieldDesc(HasRangeCutOffFieldId),
3867 this));
3870 editSField(HasRangeCutOffFieldMask);
3872 return returnValue;
3875 GetFieldHandlePtr MultiLightChunkBase::getHandleHasRangeNearZone (void) const
3877 SFBool::GetHandlePtr returnValue(
3878 new SFBool::GetHandle(
3879 &_sfHasRangeNearZone,
3880 this->getType().getFieldDesc(HasRangeNearZoneFieldId),
3881 const_cast<MultiLightChunkBase *>(this)));
3883 return returnValue;
3886 EditFieldHandlePtr MultiLightChunkBase::editHandleHasRangeNearZone(void)
3888 SFBool::EditHandlePtr returnValue(
3889 new SFBool::EditHandle(
3890 &_sfHasRangeNearZone,
3891 this->getType().getFieldDesc(HasRangeNearZoneFieldId),
3892 this));
3895 editSField(HasRangeNearZoneFieldMask);
3897 return returnValue;
3900 GetFieldHandlePtr MultiLightChunkBase::getHandleHasRangeFarZone (void) const
3902 SFBool::GetHandlePtr returnValue(
3903 new SFBool::GetHandle(
3904 &_sfHasRangeFarZone,
3905 this->getType().getFieldDesc(HasRangeFarZoneFieldId),
3906 const_cast<MultiLightChunkBase *>(this)));
3908 return returnValue;
3911 EditFieldHandlePtr MultiLightChunkBase::editHandleHasRangeFarZone(void)
3913 SFBool::EditHandlePtr returnValue(
3914 new SFBool::EditHandle(
3915 &_sfHasRangeFarZone,
3916 this->getType().getFieldDesc(HasRangeFarZoneFieldId),
3917 this));
3920 editSField(HasRangeFarZoneFieldMask);
3922 return returnValue;
3925 GetFieldHandlePtr MultiLightChunkBase::getHandleHasCosSpotlightAngle (void) const
3927 SFBool::GetHandlePtr returnValue(
3928 new SFBool::GetHandle(
3929 &_sfHasCosSpotlightAngle,
3930 this->getType().getFieldDesc(HasCosSpotlightAngleFieldId),
3931 const_cast<MultiLightChunkBase *>(this)));
3933 return returnValue;
3936 EditFieldHandlePtr MultiLightChunkBase::editHandleHasCosSpotlightAngle(void)
3938 SFBool::EditHandlePtr returnValue(
3939 new SFBool::EditHandle(
3940 &_sfHasCosSpotlightAngle,
3941 this->getType().getFieldDesc(HasCosSpotlightAngleFieldId),
3942 this));
3945 editSField(HasCosSpotlightAngleFieldMask);
3947 return returnValue;
3950 GetFieldHandlePtr MultiLightChunkBase::getHandleHasSpotlightAngle (void) const
3952 SFBool::GetHandlePtr returnValue(
3953 new SFBool::GetHandle(
3954 &_sfHasSpotlightAngle,
3955 this->getType().getFieldDesc(HasSpotlightAngleFieldId),
3956 const_cast<MultiLightChunkBase *>(this)));
3958 return returnValue;
3961 EditFieldHandlePtr MultiLightChunkBase::editHandleHasSpotlightAngle(void)
3963 SFBool::EditHandlePtr returnValue(
3964 new SFBool::EditHandle(
3965 &_sfHasSpotlightAngle,
3966 this->getType().getFieldDesc(HasSpotlightAngleFieldId),
3967 this));
3970 editSField(HasSpotlightAngleFieldMask);
3972 return returnValue;
3975 GetFieldHandlePtr MultiLightChunkBase::getHandleHasSpotExponent (void) const
3977 SFBool::GetHandlePtr returnValue(
3978 new SFBool::GetHandle(
3979 &_sfHasSpotExponent,
3980 this->getType().getFieldDesc(HasSpotExponentFieldId),
3981 const_cast<MultiLightChunkBase *>(this)));
3983 return returnValue;
3986 EditFieldHandlePtr MultiLightChunkBase::editHandleHasSpotExponent(void)
3988 SFBool::EditHandlePtr returnValue(
3989 new SFBool::EditHandle(
3990 &_sfHasSpotExponent,
3991 this->getType().getFieldDesc(HasSpotExponentFieldId),
3992 this));
3995 editSField(HasSpotExponentFieldMask);
3997 return returnValue;
4000 GetFieldHandlePtr MultiLightChunkBase::getHandleHasCinemaLight (void) const
4002 SFBool::GetHandlePtr returnValue(
4003 new SFBool::GetHandle(
4004 &_sfHasCinemaLight,
4005 this->getType().getFieldDesc(HasCinemaLightFieldId),
4006 const_cast<MultiLightChunkBase *>(this)));
4008 return returnValue;
4011 EditFieldHandlePtr MultiLightChunkBase::editHandleHasCinemaLight (void)
4013 SFBool::EditHandlePtr returnValue(
4014 new SFBool::EditHandle(
4015 &_sfHasCinemaLight,
4016 this->getType().getFieldDesc(HasCinemaLightFieldId),
4017 this));
4020 editSField(HasCinemaLightFieldMask);
4022 return returnValue;
4025 GetFieldHandlePtr MultiLightChunkBase::getHandlePosition (void) const
4027 MFPnt3f::GetHandlePtr returnValue(
4028 new MFPnt3f::GetHandle(
4029 &_mfPosition,
4030 this->getType().getFieldDesc(PositionFieldId),
4031 const_cast<MultiLightChunkBase *>(this)));
4033 return returnValue;
4036 EditFieldHandlePtr MultiLightChunkBase::editHandlePosition (void)
4038 MFPnt3f::EditHandlePtr returnValue(
4039 new MFPnt3f::EditHandle(
4040 &_mfPosition,
4041 this->getType().getFieldDesc(PositionFieldId),
4042 this));
4045 editMField(PositionFieldMask, _mfPosition);
4047 return returnValue;
4050 GetFieldHandlePtr MultiLightChunkBase::getHandleDirection (void) const
4052 MFVec3f::GetHandlePtr returnValue(
4053 new MFVec3f::GetHandle(
4054 &_mfDirection,
4055 this->getType().getFieldDesc(DirectionFieldId),
4056 const_cast<MultiLightChunkBase *>(this)));
4058 return returnValue;
4061 EditFieldHandlePtr MultiLightChunkBase::editHandleDirection (void)
4063 MFVec3f::EditHandlePtr returnValue(
4064 new MFVec3f::EditHandle(
4065 &_mfDirection,
4066 this->getType().getFieldDesc(DirectionFieldId),
4067 this));
4070 editMField(DirectionFieldMask, _mfDirection);
4072 return returnValue;
4075 GetFieldHandlePtr MultiLightChunkBase::getHandleColor (void) const
4077 MFColor3f::GetHandlePtr returnValue(
4078 new MFColor3f::GetHandle(
4079 &_mfColor,
4080 this->getType().getFieldDesc(ColorFieldId),
4081 const_cast<MultiLightChunkBase *>(this)));
4083 return returnValue;
4086 EditFieldHandlePtr MultiLightChunkBase::editHandleColor (void)
4088 MFColor3f::EditHandlePtr returnValue(
4089 new MFColor3f::EditHandle(
4090 &_mfColor,
4091 this->getType().getFieldDesc(ColorFieldId),
4092 this));
4095 editMField(ColorFieldMask, _mfColor);
4097 return returnValue;
4100 GetFieldHandlePtr MultiLightChunkBase::getHandleIntensity (void) const
4102 MFReal32::GetHandlePtr returnValue(
4103 new MFReal32::GetHandle(
4104 &_mfIntensity,
4105 this->getType().getFieldDesc(IntensityFieldId),
4106 const_cast<MultiLightChunkBase *>(this)));
4108 return returnValue;
4111 EditFieldHandlePtr MultiLightChunkBase::editHandleIntensity (void)
4113 MFReal32::EditHandlePtr returnValue(
4114 new MFReal32::EditHandle(
4115 &_mfIntensity,
4116 this->getType().getFieldDesc(IntensityFieldId),
4117 this));
4120 editMField(IntensityFieldMask, _mfIntensity);
4122 return returnValue;
4125 GetFieldHandlePtr MultiLightChunkBase::getHandleAmbientIntensity (void) const
4127 MFVec3f::GetHandlePtr returnValue(
4128 new MFVec3f::GetHandle(
4129 &_mfAmbientIntensity,
4130 this->getType().getFieldDesc(AmbientIntensityFieldId),
4131 const_cast<MultiLightChunkBase *>(this)));
4133 return returnValue;
4136 EditFieldHandlePtr MultiLightChunkBase::editHandleAmbientIntensity(void)
4138 MFVec3f::EditHandlePtr returnValue(
4139 new MFVec3f::EditHandle(
4140 &_mfAmbientIntensity,
4141 this->getType().getFieldDesc(AmbientIntensityFieldId),
4142 this));
4145 editMField(AmbientIntensityFieldMask, _mfAmbientIntensity);
4147 return returnValue;
4150 GetFieldHandlePtr MultiLightChunkBase::getHandleDiffuseIntensity (void) const
4152 MFVec3f::GetHandlePtr returnValue(
4153 new MFVec3f::GetHandle(
4154 &_mfDiffuseIntensity,
4155 this->getType().getFieldDesc(DiffuseIntensityFieldId),
4156 const_cast<MultiLightChunkBase *>(this)));
4158 return returnValue;
4161 EditFieldHandlePtr MultiLightChunkBase::editHandleDiffuseIntensity(void)
4163 MFVec3f::EditHandlePtr returnValue(
4164 new MFVec3f::EditHandle(
4165 &_mfDiffuseIntensity,
4166 this->getType().getFieldDesc(DiffuseIntensityFieldId),
4167 this));
4170 editMField(DiffuseIntensityFieldMask, _mfDiffuseIntensity);
4172 return returnValue;
4175 GetFieldHandlePtr MultiLightChunkBase::getHandleSpecularIntensity (void) const
4177 MFVec3f::GetHandlePtr returnValue(
4178 new MFVec3f::GetHandle(
4179 &_mfSpecularIntensity,
4180 this->getType().getFieldDesc(SpecularIntensityFieldId),
4181 const_cast<MultiLightChunkBase *>(this)));
4183 return returnValue;
4186 EditFieldHandlePtr MultiLightChunkBase::editHandleSpecularIntensity(void)
4188 MFVec3f::EditHandlePtr returnValue(
4189 new MFVec3f::EditHandle(
4190 &_mfSpecularIntensity,
4191 this->getType().getFieldDesc(SpecularIntensityFieldId),
4192 this));
4195 editMField(SpecularIntensityFieldMask, _mfSpecularIntensity);
4197 return returnValue;
4200 GetFieldHandlePtr MultiLightChunkBase::getHandleAttenuation (void) const
4202 MFVec3f::GetHandlePtr returnValue(
4203 new MFVec3f::GetHandle(
4204 &_mfAttenuation,
4205 this->getType().getFieldDesc(AttenuationFieldId),
4206 const_cast<MultiLightChunkBase *>(this)));
4208 return returnValue;
4211 EditFieldHandlePtr MultiLightChunkBase::editHandleAttenuation (void)
4213 MFVec3f::EditHandlePtr returnValue(
4214 new MFVec3f::EditHandle(
4215 &_mfAttenuation,
4216 this->getType().getFieldDesc(AttenuationFieldId),
4217 this));
4220 editMField(AttenuationFieldMask, _mfAttenuation);
4222 return returnValue;
4225 GetFieldHandlePtr MultiLightChunkBase::getHandleSpotlightAngle (void) const
4227 MFReal32::GetHandlePtr returnValue(
4228 new MFReal32::GetHandle(
4229 &_mfSpotlightAngle,
4230 this->getType().getFieldDesc(SpotlightAngleFieldId),
4231 const_cast<MultiLightChunkBase *>(this)));
4233 return returnValue;
4236 EditFieldHandlePtr MultiLightChunkBase::editHandleSpotlightAngle (void)
4238 MFReal32::EditHandlePtr returnValue(
4239 new MFReal32::EditHandle(
4240 &_mfSpotlightAngle,
4241 this->getType().getFieldDesc(SpotlightAngleFieldId),
4242 this));
4245 editMField(SpotlightAngleFieldMask, _mfSpotlightAngle);
4247 return returnValue;
4250 GetFieldHandlePtr MultiLightChunkBase::getHandleSpotExponent (void) const
4252 MFReal32::GetHandlePtr returnValue(
4253 new MFReal32::GetHandle(
4254 &_mfSpotExponent,
4255 this->getType().getFieldDesc(SpotExponentFieldId),
4256 const_cast<MultiLightChunkBase *>(this)));
4258 return returnValue;
4261 EditFieldHandlePtr MultiLightChunkBase::editHandleSpotExponent (void)
4263 MFReal32::EditHandlePtr returnValue(
4264 new MFReal32::EditHandle(
4265 &_mfSpotExponent,
4266 this->getType().getFieldDesc(SpotExponentFieldId),
4267 this));
4270 editMField(SpotExponentFieldMask, _mfSpotExponent);
4272 return returnValue;
4275 GetFieldHandlePtr MultiLightChunkBase::getHandleInnerSuperEllipsesWidth (void) const
4277 MFReal32::GetHandlePtr returnValue(
4278 new MFReal32::GetHandle(
4279 &_mfInnerSuperEllipsesWidth,
4280 this->getType().getFieldDesc(InnerSuperEllipsesWidthFieldId),
4281 const_cast<MultiLightChunkBase *>(this)));
4283 return returnValue;
4286 EditFieldHandlePtr MultiLightChunkBase::editHandleInnerSuperEllipsesWidth(void)
4288 MFReal32::EditHandlePtr returnValue(
4289 new MFReal32::EditHandle(
4290 &_mfInnerSuperEllipsesWidth,
4291 this->getType().getFieldDesc(InnerSuperEllipsesWidthFieldId),
4292 this));
4295 editMField(InnerSuperEllipsesWidthFieldMask, _mfInnerSuperEllipsesWidth);
4297 return returnValue;
4300 GetFieldHandlePtr MultiLightChunkBase::getHandleInnerSuperEllipsesHeight (void) const
4302 MFReal32::GetHandlePtr returnValue(
4303 new MFReal32::GetHandle(
4304 &_mfInnerSuperEllipsesHeight,
4305 this->getType().getFieldDesc(InnerSuperEllipsesHeightFieldId),
4306 const_cast<MultiLightChunkBase *>(this)));
4308 return returnValue;
4311 EditFieldHandlePtr MultiLightChunkBase::editHandleInnerSuperEllipsesHeight(void)
4313 MFReal32::EditHandlePtr returnValue(
4314 new MFReal32::EditHandle(
4315 &_mfInnerSuperEllipsesHeight,
4316 this->getType().getFieldDesc(InnerSuperEllipsesHeightFieldId),
4317 this));
4320 editMField(InnerSuperEllipsesHeightFieldMask, _mfInnerSuperEllipsesHeight);
4322 return returnValue;
4325 GetFieldHandlePtr MultiLightChunkBase::getHandleOuterSuperEllipsesWidth (void) const
4327 MFReal32::GetHandlePtr returnValue(
4328 new MFReal32::GetHandle(
4329 &_mfOuterSuperEllipsesWidth,
4330 this->getType().getFieldDesc(OuterSuperEllipsesWidthFieldId),
4331 const_cast<MultiLightChunkBase *>(this)));
4333 return returnValue;
4336 EditFieldHandlePtr MultiLightChunkBase::editHandleOuterSuperEllipsesWidth(void)
4338 MFReal32::EditHandlePtr returnValue(
4339 new MFReal32::EditHandle(
4340 &_mfOuterSuperEllipsesWidth,
4341 this->getType().getFieldDesc(OuterSuperEllipsesWidthFieldId),
4342 this));
4345 editMField(OuterSuperEllipsesWidthFieldMask, _mfOuterSuperEllipsesWidth);
4347 return returnValue;
4350 GetFieldHandlePtr MultiLightChunkBase::getHandleOuterSuperEllipsesHeight (void) const
4352 MFReal32::GetHandlePtr returnValue(
4353 new MFReal32::GetHandle(
4354 &_mfOuterSuperEllipsesHeight,
4355 this->getType().getFieldDesc(OuterSuperEllipsesHeightFieldId),
4356 const_cast<MultiLightChunkBase *>(this)));
4358 return returnValue;
4361 EditFieldHandlePtr MultiLightChunkBase::editHandleOuterSuperEllipsesHeight(void)
4363 MFReal32::EditHandlePtr returnValue(
4364 new MFReal32::EditHandle(
4365 &_mfOuterSuperEllipsesHeight,
4366 this->getType().getFieldDesc(OuterSuperEllipsesHeightFieldId),
4367 this));
4370 editMField(OuterSuperEllipsesHeightFieldMask, _mfOuterSuperEllipsesHeight);
4372 return returnValue;
4375 GetFieldHandlePtr MultiLightChunkBase::getHandleSuperEllipsesRoundness (void) const
4377 MFReal32::GetHandlePtr returnValue(
4378 new MFReal32::GetHandle(
4379 &_mfSuperEllipsesRoundness,
4380 this->getType().getFieldDesc(SuperEllipsesRoundnessFieldId),
4381 const_cast<MultiLightChunkBase *>(this)));
4383 return returnValue;
4386 EditFieldHandlePtr MultiLightChunkBase::editHandleSuperEllipsesRoundness(void)
4388 MFReal32::EditHandlePtr returnValue(
4389 new MFReal32::EditHandle(
4390 &_mfSuperEllipsesRoundness,
4391 this->getType().getFieldDesc(SuperEllipsesRoundnessFieldId),
4392 this));
4395 editMField(SuperEllipsesRoundnessFieldMask, _mfSuperEllipsesRoundness);
4397 return returnValue;
4400 GetFieldHandlePtr MultiLightChunkBase::getHandleSuperEllipsesTwist (void) const
4402 MFReal32::GetHandlePtr returnValue(
4403 new MFReal32::GetHandle(
4404 &_mfSuperEllipsesTwist,
4405 this->getType().getFieldDesc(SuperEllipsesTwistFieldId),
4406 const_cast<MultiLightChunkBase *>(this)));
4408 return returnValue;
4411 EditFieldHandlePtr MultiLightChunkBase::editHandleSuperEllipsesTwist(void)
4413 MFReal32::EditHandlePtr returnValue(
4414 new MFReal32::EditHandle(
4415 &_mfSuperEllipsesTwist,
4416 this->getType().getFieldDesc(SuperEllipsesTwistFieldId),
4417 this));
4420 editMField(SuperEllipsesTwistFieldMask, _mfSuperEllipsesTwist);
4422 return returnValue;
4425 GetFieldHandlePtr MultiLightChunkBase::getHandleRangeCutOn (void) const
4427 MFReal32::GetHandlePtr returnValue(
4428 new MFReal32::GetHandle(
4429 &_mfRangeCutOn,
4430 this->getType().getFieldDesc(RangeCutOnFieldId),
4431 const_cast<MultiLightChunkBase *>(this)));
4433 return returnValue;
4436 EditFieldHandlePtr MultiLightChunkBase::editHandleRangeCutOn (void)
4438 MFReal32::EditHandlePtr returnValue(
4439 new MFReal32::EditHandle(
4440 &_mfRangeCutOn,
4441 this->getType().getFieldDesc(RangeCutOnFieldId),
4442 this));
4445 editMField(RangeCutOnFieldMask, _mfRangeCutOn);
4447 return returnValue;
4450 GetFieldHandlePtr MultiLightChunkBase::getHandleRangeCutOff (void) const
4452 MFReal32::GetHandlePtr returnValue(
4453 new MFReal32::GetHandle(
4454 &_mfRangeCutOff,
4455 this->getType().getFieldDesc(RangeCutOffFieldId),
4456 const_cast<MultiLightChunkBase *>(this)));
4458 return returnValue;
4461 EditFieldHandlePtr MultiLightChunkBase::editHandleRangeCutOff (void)
4463 MFReal32::EditHandlePtr returnValue(
4464 new MFReal32::EditHandle(
4465 &_mfRangeCutOff,
4466 this->getType().getFieldDesc(RangeCutOffFieldId),
4467 this));
4470 editMField(RangeCutOffFieldMask, _mfRangeCutOff);
4472 return returnValue;
4475 GetFieldHandlePtr MultiLightChunkBase::getHandleRangeNearZone (void) const
4477 MFReal32::GetHandlePtr returnValue(
4478 new MFReal32::GetHandle(
4479 &_mfRangeNearZone,
4480 this->getType().getFieldDesc(RangeNearZoneFieldId),
4481 const_cast<MultiLightChunkBase *>(this)));
4483 return returnValue;
4486 EditFieldHandlePtr MultiLightChunkBase::editHandleRangeNearZone (void)
4488 MFReal32::EditHandlePtr returnValue(
4489 new MFReal32::EditHandle(
4490 &_mfRangeNearZone,
4491 this->getType().getFieldDesc(RangeNearZoneFieldId),
4492 this));
4495 editMField(RangeNearZoneFieldMask, _mfRangeNearZone);
4497 return returnValue;
4500 GetFieldHandlePtr MultiLightChunkBase::getHandleRangeFarZone (void) const
4502 MFReal32::GetHandlePtr returnValue(
4503 new MFReal32::GetHandle(
4504 &_mfRangeFarZone,
4505 this->getType().getFieldDesc(RangeFarZoneFieldId),
4506 const_cast<MultiLightChunkBase *>(this)));
4508 return returnValue;
4511 EditFieldHandlePtr MultiLightChunkBase::editHandleRangeFarZone (void)
4513 MFReal32::EditHandlePtr returnValue(
4514 new MFReal32::EditHandle(
4515 &_mfRangeFarZone,
4516 this->getType().getFieldDesc(RangeFarZoneFieldId),
4517 this));
4520 editMField(RangeFarZoneFieldMask, _mfRangeFarZone);
4522 return returnValue;
4525 GetFieldHandlePtr MultiLightChunkBase::getHandleType (void) const
4527 MFUInt8::GetHandlePtr returnValue(
4528 new MFUInt8::GetHandle(
4529 &_mfType,
4530 this->getType().getFieldDesc(TypeFieldId),
4531 const_cast<MultiLightChunkBase *>(this)));
4533 return returnValue;
4536 EditFieldHandlePtr MultiLightChunkBase::editHandleType (void)
4538 MFUInt8::EditHandlePtr returnValue(
4539 new MFUInt8::EditHandle(
4540 &_mfType,
4541 this->getType().getFieldDesc(TypeFieldId),
4542 this));
4545 editMField(TypeFieldMask, _mfType);
4547 return returnValue;
4550 GetFieldHandlePtr MultiLightChunkBase::getHandleEnabled (void) const
4552 MFBool::GetHandlePtr returnValue(
4553 new MFBool::GetHandle(
4554 &_mfEnabled,
4555 this->getType().getFieldDesc(EnabledFieldId),
4556 const_cast<MultiLightChunkBase *>(this)));
4558 return returnValue;
4561 EditFieldHandlePtr MultiLightChunkBase::editHandleEnabled (void)
4563 MFBool::EditHandlePtr returnValue(
4564 new MFBool::EditHandle(
4565 &_mfEnabled,
4566 this->getType().getFieldDesc(EnabledFieldId),
4567 this));
4570 editMField(EnabledFieldMask, _mfEnabled);
4572 return returnValue;
4575 GetFieldHandlePtr MultiLightChunkBase::getHandleBeacon (void) const
4577 MFWeakNodePtr::GetHandlePtr returnValue(
4578 new MFWeakNodePtr::GetHandle(
4579 &_mfBeacon,
4580 this->getType().getFieldDesc(BeaconFieldId),
4581 const_cast<MultiLightChunkBase *>(this)));
4583 return returnValue;
4586 EditFieldHandlePtr MultiLightChunkBase::editHandleBeacon (void)
4588 MFWeakNodePtr::EditHandlePtr returnValue(
4589 new MFWeakNodePtr::EditHandle(
4590 &_mfBeacon,
4591 this->getType().getFieldDesc(BeaconFieldId),
4592 this));
4594 returnValue->setAddMethod(
4595 boost::bind(&MultiLightChunk::pushToBeacon,
4596 static_cast<MultiLightChunk *>(this), _1));
4597 returnValue->setRemoveMethod(
4598 boost::bind(&MultiLightChunk::removeFromBeacon,
4599 static_cast<MultiLightChunk *>(this), _1));
4600 returnValue->setRemoveObjMethod(
4601 boost::bind(&MultiLightChunk::removeObjFromBeacon,
4602 static_cast<MultiLightChunk *>(this), _1));
4603 returnValue->setClearMethod(
4604 boost::bind(&MultiLightChunk::clearBeacon,
4605 static_cast<MultiLightChunk *>(this)));
4607 editMField(BeaconFieldMask, _mfBeacon);
4609 return returnValue;
4612 GetFieldHandlePtr MultiLightChunkBase::getHandleBeaconMatrix (void) const
4614 MFMatrix::GetHandlePtr returnValue(
4615 new MFMatrix::GetHandle(
4616 &_mfBeaconMatrix,
4617 this->getType().getFieldDesc(BeaconMatrixFieldId),
4618 const_cast<MultiLightChunkBase *>(this)));
4620 return returnValue;
4623 EditFieldHandlePtr MultiLightChunkBase::editHandleBeaconMatrix (void)
4625 MFMatrix::EditHandlePtr returnValue(
4626 new MFMatrix::EditHandle(
4627 &_mfBeaconMatrix,
4628 this->getType().getFieldDesc(BeaconMatrixFieldId),
4629 this));
4632 editMField(BeaconMatrixFieldMask, _mfBeaconMatrix);
4634 return returnValue;
4637 GetFieldHandlePtr MultiLightChunkBase::getHandleEyeSpace (void) const
4639 SFBool::GetHandlePtr returnValue(
4640 new SFBool::GetHandle(
4641 &_sfEyeSpace,
4642 this->getType().getFieldDesc(EyeSpaceFieldId),
4643 const_cast<MultiLightChunkBase *>(this)));
4645 return returnValue;
4648 EditFieldHandlePtr MultiLightChunkBase::editHandleEyeSpace (void)
4650 SFBool::EditHandlePtr returnValue(
4651 new SFBool::EditHandle(
4652 &_sfEyeSpace,
4653 this->getType().getFieldDesc(EyeSpaceFieldId),
4654 this));
4657 editSField(EyeSpaceFieldMask);
4659 return returnValue;
4662 GetFieldHandlePtr MultiLightChunkBase::getHandleLastCamNear (void) const
4664 SFReal32::GetHandlePtr returnValue(
4665 new SFReal32::GetHandle(
4666 &_sfLastCamNear,
4667 this->getType().getFieldDesc(LastCamNearFieldId),
4668 const_cast<MultiLightChunkBase *>(this)));
4670 return returnValue;
4673 EditFieldHandlePtr MultiLightChunkBase::editHandleLastCamNear (void)
4675 SFReal32::EditHandlePtr returnValue(
4676 new SFReal32::EditHandle(
4677 &_sfLastCamNear,
4678 this->getType().getFieldDesc(LastCamNearFieldId),
4679 this));
4682 editSField(LastCamNearFieldMask);
4684 return returnValue;
4687 GetFieldHandlePtr MultiLightChunkBase::getHandleLastCamFar (void) const
4689 SFReal32::GetHandlePtr returnValue(
4690 new SFReal32::GetHandle(
4691 &_sfLastCamFar,
4692 this->getType().getFieldDesc(LastCamFarFieldId),
4693 const_cast<MultiLightChunkBase *>(this)));
4695 return returnValue;
4698 EditFieldHandlePtr MultiLightChunkBase::editHandleLastCamFar (void)
4700 SFReal32::EditHandlePtr returnValue(
4701 new SFReal32::EditHandle(
4702 &_sfLastCamFar,
4703 this->getType().getFieldDesc(LastCamFarFieldId),
4704 this));
4707 editSField(LastCamFarFieldMask);
4709 return returnValue;
4712 GetFieldHandlePtr MultiLightChunkBase::getHandleLastCamToWorld (void) const
4714 SFMatrix::GetHandlePtr returnValue(
4715 new SFMatrix::GetHandle(
4716 &_sfLastCamToWorld,
4717 this->getType().getFieldDesc(LastCamToWorldFieldId),
4718 const_cast<MultiLightChunkBase *>(this)));
4720 return returnValue;
4723 EditFieldHandlePtr MultiLightChunkBase::editHandleLastCamToWorld (void)
4725 SFMatrix::EditHandlePtr returnValue(
4726 new SFMatrix::EditHandle(
4727 &_sfLastCamToWorld,
4728 this->getType().getFieldDesc(LastCamToWorldFieldId),
4729 this));
4732 editSField(LastCamToWorldFieldMask);
4734 return returnValue;
4737 GetFieldHandlePtr MultiLightChunkBase::getHandleLightBlockName (void) const
4739 SFString::GetHandlePtr returnValue(
4740 new SFString::GetHandle(
4741 &_sfLightBlockName,
4742 this->getType().getFieldDesc(LightBlockNameFieldId),
4743 const_cast<MultiLightChunkBase *>(this)));
4745 return returnValue;
4748 EditFieldHandlePtr MultiLightChunkBase::editHandleLightBlockName (void)
4750 SFString::EditHandlePtr returnValue(
4751 new SFString::EditHandle(
4752 &_sfLightBlockName,
4753 this->getType().getFieldDesc(LightBlockNameFieldId),
4754 this));
4757 editSField(LightBlockNameFieldMask);
4759 return returnValue;
4762 GetFieldHandlePtr MultiLightChunkBase::getHandleLightVariableName (void) const
4764 SFString::GetHandlePtr returnValue(
4765 new SFString::GetHandle(
4766 &_sfLightVariableName,
4767 this->getType().getFieldDesc(LightVariableNameFieldId),
4768 const_cast<MultiLightChunkBase *>(this)));
4770 return returnValue;
4773 EditFieldHandlePtr MultiLightChunkBase::editHandleLightVariableName(void)
4775 SFString::EditHandlePtr returnValue(
4776 new SFString::EditHandle(
4777 &_sfLightVariableName,
4778 this->getType().getFieldDesc(LightVariableNameFieldId),
4779 this));
4782 editSField(LightVariableNameFieldMask);
4784 return returnValue;
4788 #ifdef OSG_MT_CPTR_ASPECT
4789 void MultiLightChunkBase::execSyncV( FieldContainer &oFrom,
4790 ConstFieldMaskArg whichField,
4791 AspectOffsetStore &oOffsets,
4792 ConstFieldMaskArg syncMode,
4793 const UInt32 uiSyncInfo)
4795 MultiLightChunk *pThis = static_cast<MultiLightChunk *>(this);
4797 pThis->execSync(static_cast<MultiLightChunk *>(&oFrom),
4798 whichField,
4799 oOffsets,
4800 syncMode,
4801 uiSyncInfo);
4803 #endif
4806 #ifdef OSG_MT_CPTR_ASPECT
4807 FieldContainer *MultiLightChunkBase::createAspectCopy(
4808 const FieldContainer *pRefAspect) const
4810 MultiLightChunk *returnValue;
4812 newAspectCopy(returnValue,
4813 dynamic_cast<const MultiLightChunk *>(pRefAspect),
4814 dynamic_cast<const MultiLightChunk *>(this));
4816 return returnValue;
4818 #endif
4820 void MultiLightChunkBase::resolveLinks(void)
4822 Inherited::resolveLinks();
4824 static_cast<MultiLightChunk *>(this)->clearBeacon();
4826 #ifdef OSG_MT_CPTR_ASPECT
4827 AspectOffsetStore oOffsets;
4829 _pAspectStore->fillOffsetArray(oOffsets, this);
4830 #endif
4832 #ifdef OSG_MT_CPTR_ASPECT
4833 _mfPosition.terminateShare(Thread::getCurrentAspect(),
4834 oOffsets);
4835 #endif
4836 #ifdef OSG_MT_CPTR_ASPECT
4837 _mfDirection.terminateShare(Thread::getCurrentAspect(),
4838 oOffsets);
4839 #endif
4840 #ifdef OSG_MT_CPTR_ASPECT
4841 _mfColor.terminateShare(Thread::getCurrentAspect(),
4842 oOffsets);
4843 #endif
4844 #ifdef OSG_MT_CPTR_ASPECT
4845 _mfIntensity.terminateShare(Thread::getCurrentAspect(),
4846 oOffsets);
4847 #endif
4848 #ifdef OSG_MT_CPTR_ASPECT
4849 _mfAmbientIntensity.terminateShare(Thread::getCurrentAspect(),
4850 oOffsets);
4851 #endif
4852 #ifdef OSG_MT_CPTR_ASPECT
4853 _mfDiffuseIntensity.terminateShare(Thread::getCurrentAspect(),
4854 oOffsets);
4855 #endif
4856 #ifdef OSG_MT_CPTR_ASPECT
4857 _mfSpecularIntensity.terminateShare(Thread::getCurrentAspect(),
4858 oOffsets);
4859 #endif
4860 #ifdef OSG_MT_CPTR_ASPECT
4861 _mfAttenuation.terminateShare(Thread::getCurrentAspect(),
4862 oOffsets);
4863 #endif
4864 #ifdef OSG_MT_CPTR_ASPECT
4865 _mfSpotlightAngle.terminateShare(Thread::getCurrentAspect(),
4866 oOffsets);
4867 #endif
4868 #ifdef OSG_MT_CPTR_ASPECT
4869 _mfSpotExponent.terminateShare(Thread::getCurrentAspect(),
4870 oOffsets);
4871 #endif
4872 #ifdef OSG_MT_CPTR_ASPECT
4873 _mfInnerSuperEllipsesWidth.terminateShare(Thread::getCurrentAspect(),
4874 oOffsets);
4875 #endif
4876 #ifdef OSG_MT_CPTR_ASPECT
4877 _mfInnerSuperEllipsesHeight.terminateShare(Thread::getCurrentAspect(),
4878 oOffsets);
4879 #endif
4880 #ifdef OSG_MT_CPTR_ASPECT
4881 _mfOuterSuperEllipsesWidth.terminateShare(Thread::getCurrentAspect(),
4882 oOffsets);
4883 #endif
4884 #ifdef OSG_MT_CPTR_ASPECT
4885 _mfOuterSuperEllipsesHeight.terminateShare(Thread::getCurrentAspect(),
4886 oOffsets);
4887 #endif
4888 #ifdef OSG_MT_CPTR_ASPECT
4889 _mfSuperEllipsesRoundness.terminateShare(Thread::getCurrentAspect(),
4890 oOffsets);
4891 #endif
4892 #ifdef OSG_MT_CPTR_ASPECT
4893 _mfSuperEllipsesTwist.terminateShare(Thread::getCurrentAspect(),
4894 oOffsets);
4895 #endif
4896 #ifdef OSG_MT_CPTR_ASPECT
4897 _mfRangeCutOn.terminateShare(Thread::getCurrentAspect(),
4898 oOffsets);
4899 #endif
4900 #ifdef OSG_MT_CPTR_ASPECT
4901 _mfRangeCutOff.terminateShare(Thread::getCurrentAspect(),
4902 oOffsets);
4903 #endif
4904 #ifdef OSG_MT_CPTR_ASPECT
4905 _mfRangeNearZone.terminateShare(Thread::getCurrentAspect(),
4906 oOffsets);
4907 #endif
4908 #ifdef OSG_MT_CPTR_ASPECT
4909 _mfRangeFarZone.terminateShare(Thread::getCurrentAspect(),
4910 oOffsets);
4911 #endif
4912 #ifdef OSG_MT_CPTR_ASPECT
4913 _mfType.terminateShare(Thread::getCurrentAspect(),
4914 oOffsets);
4915 #endif
4916 #ifdef OSG_MT_CPTR_ASPECT
4917 _mfEnabled.terminateShare(Thread::getCurrentAspect(),
4918 oOffsets);
4919 #endif
4920 #ifdef OSG_MT_CPTR_ASPECT
4921 _mfBeaconMatrix.terminateShare(Thread::getCurrentAspect(),
4922 oOffsets);
4923 #endif
4927 OSG_END_NAMESPACE