changed: gcc8 base update
[opensg.git] / Source / System / Window / Background / OSGSkyBackgroundBase.cpp
blobd5c4bde13e7aa182c1521988cb8f770304474902
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 SkyBackground!
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 "OSGTextureBaseChunk.h" // BackTexture Class
66 #include "OSGNode.h" // Beacon Class
68 #include "OSGSkyBackgroundBase.h"
69 #include "OSGSkyBackground.h"
71 #include <boost/bind.hpp>
73 OSG_BEGIN_NAMESPACE
75 /***************************************************************************\
76 * Description *
77 \***************************************************************************/
79 /*! \class OSG::SkyBackground
80 A Sky/Ground/Skybox background, inspired by VRML, see \ref
81 PageSystemWindowBackgroundSky for a description.
83 The sky is defined by the _mfSkyAngle and _mfSkyColor fields, the ground by
84 the _mfGroundAngle and _mfGround Color fields. The resolution of the sky
85 sphere can be influenced by the _sfSphereRes field. The sky box is defined
86 by the _sfBackTexture, _sfFrontTexture, _sfLeftTexture, _sfRightTexture,
87 _sfTopTexture and _sfBottomTexture fields.
90 /***************************************************************************\
91 * Field Documentation *
92 \***************************************************************************/
94 /*! \var Color4f SkyBackgroundBase::_mfSkyColor
95 The colors for the sky gradient bands. Corresponds to the skyAngle
96 angles. The first value is for the apex (i.e. straight up), which
97 doesn't need an angle, thus there should be one more color than
98 angles. If no angles are given color[0] is used, or black if none are
99 given.
102 /*! \var Real32 SkyBackgroundBase::_mfSkyAngle
103 The angles for the sky gradient bands. Corresponds to the skyColor colors,
104 with the exception of the apex. Values should be between 0 and PI.
107 /*! \var Color4f SkyBackgroundBase::_mfGroundColor
108 The colors of the ground sphere-part. Interpretation is similar to the sky.
111 /*! \var Real32 SkyBackgroundBase::_mfGroundAngle
112 The angles of the ground sphere-part. Interpretation is similar to the sky, with
113 0 being straight down.
116 /*! \var UInt32 SkyBackgroundBase::_sfSphereRes
117 The polygonal resolution of the sky/ground sphere.
120 /*! \var TextureBaseChunk * SkyBackgroundBase::_sfBackTexture
121 Texture for the back (+Z) side of the sky cube.
124 /*! \var TextureBaseChunk * SkyBackgroundBase::_sfBottomTexture
125 Texture for the bottom (-Y) side of the sky cube.
128 /*! \var TextureBaseChunk * SkyBackgroundBase::_sfFrontTexture
129 Texture for the front (-Z) side of the sky cube.
132 /*! \var TextureBaseChunk * SkyBackgroundBase::_sfLeftTexture
133 Texture for the left (-X) side of the sky cube.
136 /*! \var TextureBaseChunk * SkyBackgroundBase::_sfRightTexture
137 Texture for the right (+X) side of the sky cube.
140 /*! \var TextureBaseChunk * SkyBackgroundBase::_sfTopTexture
141 Texture for the top (+Y) side of the sky cube.
144 /*! \var bool SkyBackgroundBase::_sfBoxInside
145 Flag to draw the box inside or outside of the sphere
148 /*! \var Vec3f SkyBackgroundBase::_mfTopTexCoord
149 Texture coordinates for the top face
152 /*! \var Vec3f SkyBackgroundBase::_mfBottomTexCoord
153 Bottom texture coordinates.
156 /*! \var Vec3f SkyBackgroundBase::_mfRightTexCoord
157 Right texture coordinates.
160 /*! \var Vec3f SkyBackgroundBase::_mfLeftTexCoord
161 Left texture coordinates.
164 /*! \var Vec3f SkyBackgroundBase::_mfFrontTexCoord
165 Front texture coordinates.
168 /*! \var Vec3f SkyBackgroundBase::_mfBackTexCoord
169 Back texture coordinates.
172 /*! \var Node * SkyBackgroundBase::_sfBeacon
173 The object that defines the orientation of the background, i.e. the
174 local coordinate system it is drawn in.
177 /*! \var bool SkyBackgroundBase::_sfUseVRMLCubeTextureSemantics
178 Whether to use VRML Semantics for the orientation of cube texture sides or
179 the default OpenGL semantics.
180 Note: OpenSG 1.x always used VRML Semantics.
184 /***************************************************************************\
185 * FieldType/FieldTrait Instantiation *
186 \***************************************************************************/
188 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
189 PointerType FieldTraits<SkyBackground *, nsOSG>::_type(
190 "SkyBackgroundPtr",
191 "BackgroundPtr",
192 SkyBackground::getClassType(),
193 nsOSG);
194 #endif
196 OSG_FIELDTRAITS_GETTYPE_NS(SkyBackground *, nsOSG)
199 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField,
200 SkyBackground *,
201 nsOSG)
203 /***************************************************************************\
204 * Field Description *
205 \***************************************************************************/
207 void SkyBackgroundBase::classDescInserter(TypeObject &oType)
209 FieldDescriptionBase *pDesc = NULL;
212 pDesc = new MFColor4f::Description(
213 MFColor4f::getClassType(),
214 "skyColor",
215 "The colors for the sky gradient bands. Corresponds to the skyAngle\n"
216 "angles. The first value is for the apex (i.e. straight up), which\n"
217 "doesn't need an angle, thus there should be one more color than\n"
218 "angles. If no angles are given color[0] is used, or black if none are\n"
219 "given.\n",
220 SkyColorFieldId, SkyColorFieldMask,
221 false,
222 (Field::MFDefaultFlags | Field::FStdAccess),
223 static_cast<FieldEditMethodSig>(&SkyBackground::editHandleSkyColor),
224 static_cast<FieldGetMethodSig >(&SkyBackground::getHandleSkyColor));
226 oType.addInitialDesc(pDesc);
228 pDesc = new MFReal32::Description(
229 MFReal32::getClassType(),
230 "skyAngle",
231 "The angles for the sky gradient bands. Corresponds to the skyColor colors,\n"
232 "with the exception of the apex. Values should be between 0 and PI.\n",
233 SkyAngleFieldId, SkyAngleFieldMask,
234 false,
235 (Field::MFDefaultFlags | Field::FStdAccess),
236 static_cast<FieldEditMethodSig>(&SkyBackground::editHandleSkyAngle),
237 static_cast<FieldGetMethodSig >(&SkyBackground::getHandleSkyAngle));
239 oType.addInitialDesc(pDesc);
241 pDesc = new MFColor4f::Description(
242 MFColor4f::getClassType(),
243 "groundColor",
244 "The colors of the ground sphere-part. Interpretation is similar to the sky.\n",
245 GroundColorFieldId, GroundColorFieldMask,
246 false,
247 (Field::MFDefaultFlags | Field::FStdAccess),
248 static_cast<FieldEditMethodSig>(&SkyBackground::editHandleGroundColor),
249 static_cast<FieldGetMethodSig >(&SkyBackground::getHandleGroundColor));
251 oType.addInitialDesc(pDesc);
253 pDesc = new MFReal32::Description(
254 MFReal32::getClassType(),
255 "groundAngle",
256 "The angles of the ground sphere-part. Interpretation is similar to the sky, with\n"
257 "0 being straight down.\n",
258 GroundAngleFieldId, GroundAngleFieldMask,
259 false,
260 (Field::MFDefaultFlags | Field::FStdAccess),
261 static_cast<FieldEditMethodSig>(&SkyBackground::editHandleGroundAngle),
262 static_cast<FieldGetMethodSig >(&SkyBackground::getHandleGroundAngle));
264 oType.addInitialDesc(pDesc);
266 pDesc = new SFUInt32::Description(
267 SFUInt32::getClassType(),
268 "sphereRes",
269 "The polygonal resolution of the sky/ground sphere.\n",
270 SphereResFieldId, SphereResFieldMask,
271 false,
272 (Field::SFDefaultFlags | Field::FStdAccess),
273 static_cast<FieldEditMethodSig>(&SkyBackground::editHandleSphereRes),
274 static_cast<FieldGetMethodSig >(&SkyBackground::getHandleSphereRes));
276 oType.addInitialDesc(pDesc);
278 pDesc = new SFUnrecTextureBaseChunkPtr::Description(
279 SFUnrecTextureBaseChunkPtr::getClassType(),
280 "backTexture",
281 "Texture for the back (+Z) side of the sky cube.\n",
282 BackTextureFieldId, BackTextureFieldMask,
283 false,
284 (Field::SFDefaultFlags | Field::FStdAccess),
285 static_cast<FieldEditMethodSig>(&SkyBackground::editHandleBackTexture),
286 static_cast<FieldGetMethodSig >(&SkyBackground::getHandleBackTexture));
288 oType.addInitialDesc(pDesc);
290 pDesc = new SFUnrecTextureBaseChunkPtr::Description(
291 SFUnrecTextureBaseChunkPtr::getClassType(),
292 "bottomTexture",
293 "Texture for the bottom (-Y) side of the sky cube.\n",
294 BottomTextureFieldId, BottomTextureFieldMask,
295 false,
296 (Field::SFDefaultFlags | Field::FStdAccess),
297 static_cast<FieldEditMethodSig>(&SkyBackground::editHandleBottomTexture),
298 static_cast<FieldGetMethodSig >(&SkyBackground::getHandleBottomTexture));
300 oType.addInitialDesc(pDesc);
302 pDesc = new SFUnrecTextureBaseChunkPtr::Description(
303 SFUnrecTextureBaseChunkPtr::getClassType(),
304 "frontTexture",
305 "Texture for the front (-Z) side of the sky cube.\n",
306 FrontTextureFieldId, FrontTextureFieldMask,
307 false,
308 (Field::SFDefaultFlags | Field::FStdAccess),
309 static_cast<FieldEditMethodSig>(&SkyBackground::editHandleFrontTexture),
310 static_cast<FieldGetMethodSig >(&SkyBackground::getHandleFrontTexture));
312 oType.addInitialDesc(pDesc);
314 pDesc = new SFUnrecTextureBaseChunkPtr::Description(
315 SFUnrecTextureBaseChunkPtr::getClassType(),
316 "leftTexture",
317 "Texture for the left (-X) side of the sky cube.\n",
318 LeftTextureFieldId, LeftTextureFieldMask,
319 false,
320 (Field::SFDefaultFlags | Field::FStdAccess),
321 static_cast<FieldEditMethodSig>(&SkyBackground::editHandleLeftTexture),
322 static_cast<FieldGetMethodSig >(&SkyBackground::getHandleLeftTexture));
324 oType.addInitialDesc(pDesc);
326 pDesc = new SFUnrecTextureBaseChunkPtr::Description(
327 SFUnrecTextureBaseChunkPtr::getClassType(),
328 "rightTexture",
329 "Texture for the right (+X) side of the sky cube.\n",
330 RightTextureFieldId, RightTextureFieldMask,
331 false,
332 (Field::SFDefaultFlags | Field::FStdAccess),
333 static_cast<FieldEditMethodSig>(&SkyBackground::editHandleRightTexture),
334 static_cast<FieldGetMethodSig >(&SkyBackground::getHandleRightTexture));
336 oType.addInitialDesc(pDesc);
338 pDesc = new SFUnrecTextureBaseChunkPtr::Description(
339 SFUnrecTextureBaseChunkPtr::getClassType(),
340 "topTexture",
341 "Texture for the top (+Y) side of the sky cube.\n",
342 TopTextureFieldId, TopTextureFieldMask,
343 false,
344 (Field::SFDefaultFlags | Field::FStdAccess),
345 static_cast<FieldEditMethodSig>(&SkyBackground::editHandleTopTexture),
346 static_cast<FieldGetMethodSig >(&SkyBackground::getHandleTopTexture));
348 oType.addInitialDesc(pDesc);
350 pDesc = new SFBool::Description(
351 SFBool::getClassType(),
352 "boxInside",
353 "Flag to draw the box inside or outside of the sphere\n",
354 BoxInsideFieldId, BoxInsideFieldMask,
355 false,
356 (Field::SFDefaultFlags | Field::FStdAccess),
357 static_cast<FieldEditMethodSig>(&SkyBackground::editHandleBoxInside),
358 static_cast<FieldGetMethodSig >(&SkyBackground::getHandleBoxInside));
360 oType.addInitialDesc(pDesc);
362 pDesc = new MFVec3f::Description(
363 MFVec3f::getClassType(),
364 "topTexCoord",
365 "Texture coordinates for the top face\n",
366 TopTexCoordFieldId, TopTexCoordFieldMask,
367 false,
368 (Field::MFDefaultFlags | Field::FStdAccess),
369 static_cast<FieldEditMethodSig>(&SkyBackground::editHandleTopTexCoord),
370 static_cast<FieldGetMethodSig >(&SkyBackground::getHandleTopTexCoord));
372 oType.addInitialDesc(pDesc);
374 pDesc = new MFVec3f::Description(
375 MFVec3f::getClassType(),
376 "bottomTexCoord",
377 "Bottom texture coordinates.\n",
378 BottomTexCoordFieldId, BottomTexCoordFieldMask,
379 false,
380 (Field::MFDefaultFlags | Field::FStdAccess),
381 static_cast<FieldEditMethodSig>(&SkyBackground::editHandleBottomTexCoord),
382 static_cast<FieldGetMethodSig >(&SkyBackground::getHandleBottomTexCoord));
384 oType.addInitialDesc(pDesc);
386 pDesc = new MFVec3f::Description(
387 MFVec3f::getClassType(),
388 "rightTexCoord",
389 "Right texture coordinates.\n",
390 RightTexCoordFieldId, RightTexCoordFieldMask,
391 false,
392 (Field::MFDefaultFlags | Field::FStdAccess),
393 static_cast<FieldEditMethodSig>(&SkyBackground::editHandleRightTexCoord),
394 static_cast<FieldGetMethodSig >(&SkyBackground::getHandleRightTexCoord));
396 oType.addInitialDesc(pDesc);
398 pDesc = new MFVec3f::Description(
399 MFVec3f::getClassType(),
400 "leftTexCoord",
401 "Left texture coordinates.\n",
402 LeftTexCoordFieldId, LeftTexCoordFieldMask,
403 false,
404 (Field::MFDefaultFlags | Field::FStdAccess),
405 static_cast<FieldEditMethodSig>(&SkyBackground::editHandleLeftTexCoord),
406 static_cast<FieldGetMethodSig >(&SkyBackground::getHandleLeftTexCoord));
408 oType.addInitialDesc(pDesc);
410 pDesc = new MFVec3f::Description(
411 MFVec3f::getClassType(),
412 "frontTexCoord",
413 "Front texture coordinates.\n",
414 FrontTexCoordFieldId, FrontTexCoordFieldMask,
415 false,
416 (Field::MFDefaultFlags | Field::FStdAccess),
417 static_cast<FieldEditMethodSig>(&SkyBackground::editHandleFrontTexCoord),
418 static_cast<FieldGetMethodSig >(&SkyBackground::getHandleFrontTexCoord));
420 oType.addInitialDesc(pDesc);
422 pDesc = new MFVec3f::Description(
423 MFVec3f::getClassType(),
424 "backTexCoord",
425 "Back texture coordinates.\n",
426 BackTexCoordFieldId, BackTexCoordFieldMask,
427 false,
428 (Field::MFDefaultFlags | Field::FStdAccess),
429 static_cast<FieldEditMethodSig>(&SkyBackground::editHandleBackTexCoord),
430 static_cast<FieldGetMethodSig >(&SkyBackground::getHandleBackTexCoord));
432 oType.addInitialDesc(pDesc);
434 pDesc = new SFWeakNodePtr::Description(
435 SFWeakNodePtr::getClassType(),
436 "beacon",
437 "The object that defines the orientation of the background, i.e. the\n"
438 "local coordinate system it is drawn in.\n",
439 BeaconFieldId, BeaconFieldMask,
440 false,
441 (Field::SFDefaultFlags | Field::FStdAccess),
442 static_cast<FieldEditMethodSig>(&SkyBackground::editHandleBeacon),
443 static_cast<FieldGetMethodSig >(&SkyBackground::getHandleBeacon));
445 oType.addInitialDesc(pDesc);
447 pDesc = new SFBool::Description(
448 SFBool::getClassType(),
449 "useVRMLCubeTextureSemantics",
450 "Whether to use VRML Semantics for the orientation of cube texture sides or\n"
451 "the default OpenGL semantics.\n"
452 "Note: OpenSG 1.x always used VRML Semantics.\n",
453 UseVRMLCubeTextureSemanticsFieldId, UseVRMLCubeTextureSemanticsFieldMask,
454 false,
455 (Field::SFDefaultFlags | Field::FStdAccess),
456 static_cast<FieldEditMethodSig>(&SkyBackground::editHandleUseVRMLCubeTextureSemantics),
457 static_cast<FieldGetMethodSig >(&SkyBackground::getHandleUseVRMLCubeTextureSemantics));
459 oType.addInitialDesc(pDesc);
463 SkyBackgroundBase::TypeObject SkyBackgroundBase::_type(
464 SkyBackgroundBase::getClassname(),
465 Inherited::getClassname(),
466 "NULL",
467 nsOSG, //Namespace
468 reinterpret_cast<PrototypeCreateF>(&SkyBackgroundBase::createEmptyLocal),
469 reinterpret_cast<InitContainerF>(&SkyBackground::initMethod),
470 reinterpret_cast<ExitContainerF>(&SkyBackground::exitMethod),
471 reinterpret_cast<InitalInsertDescFunc>(
472 reinterpret_cast<void *>(&SkyBackground::classDescInserter)),
473 false,
475 "<?xml version=\"1.0\"?>\n"
476 "\n"
477 "<FieldContainer\n"
478 " name=\"SkyBackground\"\n"
479 " parent=\"Background\"\n"
480 " library=\"Window\"\n"
481 " pointerfieldtypes=\"multi\"\n"
482 " structure=\"concrete\"\n"
483 " systemcomponent=\"true\"\n"
484 " parentsystemcomponent=\"true\"\n"
485 " decoratable=\"false\"\n"
486 " useLocalIncludes=\"false\"\n"
487 " docGroupBase=\"GrpWindowBackground\"\n"
488 " >\n"
489 " A Sky/Ground/Skybox background, inspired by VRML, see \\ref\n"
490 " PageSystemWindowBackgroundSky for a description.\n"
491 "\n"
492 " The sky is defined by the _mfSkyAngle and _mfSkyColor fields, the ground by\n"
493 " the _mfGroundAngle and _mfGround Color fields. The resolution of the sky\n"
494 " sphere can be influenced by the _sfSphereRes field. The sky box is defined\n"
495 " by the _sfBackTexture, _sfFrontTexture, _sfLeftTexture, _sfRightTexture,\n"
496 " _sfTopTexture and _sfBottomTexture fields.\n"
497 " <Field\n"
498 "\t name=\"skyColor\"\n"
499 "\t type=\"Color4f\"\n"
500 "\t cardinality=\"multi\"\n"
501 "\t visibility=\"external\"\n"
502 "\t access=\"public\"\n"
503 "\t >\n"
504 "\tThe colors for the sky gradient bands. Corresponds to the skyAngle\n"
505 " angles. The first value is for the apex (i.e. straight up), which\n"
506 " doesn't need an angle, thus there should be one more color than\n"
507 " angles. If no angles are given color[0] is used, or black if none are\n"
508 " given.\n"
509 " </Field>\n"
510 " <Field\n"
511 "\t name=\"skyAngle\"\n"
512 "\t type=\"Real32\"\n"
513 "\t cardinality=\"multi\"\n"
514 "\t visibility=\"external\"\n"
515 "\t access=\"public\"\n"
516 "\t >\n"
517 "\tThe angles for the sky gradient bands. Corresponds to the skyColor colors,\n"
518 " with the exception of the apex. Values should be between 0 and PI.\n"
519 " </Field>\n"
520 " <Field\n"
521 "\t name=\"groundColor\"\n"
522 "\t type=\"Color4f\"\n"
523 "\t cardinality=\"multi\"\n"
524 "\t visibility=\"external\"\n"
525 "\t access=\"public\"\n"
526 "\t >\n"
527 "\tThe colors of the ground sphere-part. Interpretation is similar to the sky.\n"
528 " </Field>\n"
529 " <Field\n"
530 "\t name=\"groundAngle\"\n"
531 "\t type=\"Real32\"\n"
532 "\t cardinality=\"multi\"\n"
533 "\t visibility=\"external\"\n"
534 "\t access=\"public\"\n"
535 "\t >\n"
536 "\tThe angles of the ground sphere-part. Interpretation is similar to the sky, with\n"
537 " 0 being straight down.\n"
538 " </Field>\n"
539 " <Field\n"
540 "\t name=\"sphereRes\"\n"
541 "\t type=\"UInt32\"\n"
542 "\t cardinality=\"single\"\n"
543 "\t visibility=\"external\"\n"
544 "\t defaultValue=\"8\"\n"
545 "\t access=\"public\"\n"
546 "\t >\n"
547 "\tThe polygonal resolution of the sky/ground sphere.\n"
548 " </Field>\n"
549 " <Field\n"
550 "\t name=\"backTexture\"\n"
551 "\t type=\"TextureBaseChunkPtr\"\n"
552 "\t cardinality=\"single\"\n"
553 "\t visibility=\"external\"\n"
554 "\t defaultValue=\"NULL\"\n"
555 "\t access=\"public\"\n"
556 "\t >\n"
557 "\tTexture for the back (+Z) side of the sky cube.\n"
558 " </Field>\n"
559 " <Field\n"
560 "\t name=\"bottomTexture\"\n"
561 "\t type=\"TextureBaseChunkPtr\"\n"
562 "\t cardinality=\"single\"\n"
563 "\t visibility=\"external\"\n"
564 "\t defaultValue=\"NULL\"\n"
565 "\t access=\"public\"\n"
566 "\t >\n"
567 "\tTexture for the bottom (-Y) side of the sky cube.\n"
568 " </Field>\n"
569 " <Field\n"
570 "\t name=\"frontTexture\"\n"
571 "\t type=\"TextureBaseChunkPtr\"\n"
572 "\t cardinality=\"single\"\n"
573 "\t visibility=\"external\"\n"
574 "\t defaultValue=\"NULL\"\n"
575 "\t access=\"public\"\n"
576 "\t >\n"
577 "\tTexture for the front (-Z) side of the sky cube.\n"
578 " </Field>\n"
579 " <Field\n"
580 "\t name=\"leftTexture\"\n"
581 "\t type=\"TextureBaseChunkPtr\"\n"
582 "\t cardinality=\"single\"\n"
583 "\t visibility=\"external\"\n"
584 "\t defaultValue=\"NULL\"\n"
585 "\t access=\"public\"\n"
586 "\t >\n"
587 "\tTexture for the left (-X) side of the sky cube.\n"
588 " </Field>\n"
589 " <Field\n"
590 "\t name=\"rightTexture\"\n"
591 "\t type=\"TextureBaseChunkPtr\"\n"
592 "\t cardinality=\"single\"\n"
593 "\t visibility=\"external\"\n"
594 "\t defaultValue=\"NULL\"\n"
595 "\t access=\"public\"\n"
596 "\t >\n"
597 "\tTexture for the right (+X) side of the sky cube.\n"
598 " </Field>\n"
599 " <Field\n"
600 "\t name=\"topTexture\"\n"
601 "\t type=\"TextureBaseChunkPtr\"\n"
602 "\t cardinality=\"single\"\n"
603 "\t visibility=\"external\"\n"
604 "\t defaultValue=\"NULL\"\n"
605 "\t access=\"public\"\n"
606 "\t >\n"
607 "\tTexture for the top (+Y) side of the sky cube.\n"
608 " </Field>\n"
609 " <Field\n"
610 "\t name=\"boxInside\"\n"
611 "\t type=\"bool\"\n"
612 "\t cardinality=\"single\"\n"
613 "\t visibility=\"external\"\n"
614 "\t defaultValue=\"true\"\n"
615 "\t access=\"public\"\n"
616 "\t >\n"
617 "\tFlag to draw the box inside or outside of the sphere\n"
618 " </Field>\n"
619 " <Field\n"
620 "\t name=\"topTexCoord\"\n"
621 "\t type=\"Vec3f\"\n"
622 "\t cardinality=\"multi\"\n"
623 "\t visibility=\"external\"\n"
624 "\t access=\"public\"\n"
625 "\t >\n"
626 "\tTexture coordinates for the top face\n"
627 " </Field>\n"
628 " <Field\n"
629 "\t name=\"bottomTexCoord\"\n"
630 "\t type=\"Vec3f\"\n"
631 "\t cardinality=\"multi\"\n"
632 "\t visibility=\"external\"\n"
633 "\t access=\"public\"\n"
634 "\t >\n"
635 "\tBottom texture coordinates.\n"
636 " </Field>\n"
637 " <Field\n"
638 "\t name=\"rightTexCoord\"\n"
639 "\t type=\"Vec3f\"\n"
640 "\t cardinality=\"multi\"\n"
641 "\t visibility=\"external\"\n"
642 "\t access=\"public\"\n"
643 "\t >\n"
644 "\tRight texture coordinates.\n"
645 " </Field>\n"
646 " <Field\n"
647 "\t name=\"leftTexCoord\"\n"
648 "\t type=\"Vec3f\"\n"
649 "\t cardinality=\"multi\"\n"
650 "\t visibility=\"external\"\n"
651 "\t access=\"public\"\n"
652 "\t >\n"
653 "\tLeft texture coordinates.\n"
654 " </Field>\n"
655 " <Field\n"
656 "\t name=\"frontTexCoord\"\n"
657 "\t type=\"Vec3f\"\n"
658 "\t cardinality=\"multi\"\n"
659 "\t visibility=\"external\"\n"
660 "\t access=\"public\"\n"
661 "\t >\n"
662 "\tFront texture coordinates.\n"
663 " </Field>\n"
664 " <Field\n"
665 "\t name=\"backTexCoord\"\n"
666 "\t type=\"Vec3f\"\n"
667 "\t cardinality=\"multi\"\n"
668 "\t visibility=\"external\"\n"
669 "\t access=\"public\"\n"
670 "\t >\n"
671 "\tBack texture coordinates.\n"
672 " </Field>\n"
673 " <Field\n"
674 "\t name=\"beacon\"\n"
675 "\t type=\"Node\"\n"
676 " category=\"weakpointer\"\n"
677 "\t cardinality=\"single\"\n"
678 "\t visibility=\"external\"\n"
679 "\t access=\"public\"\n"
680 "\t >\n"
681 "\tThe object that defines the orientation of the background, i.e. the\n"
682 "\tlocal coordinate system it is drawn in.\n"
683 " </Field>\n"
684 " <Field\n"
685 " name=\"useVRMLCubeTextureSemantics\"\n"
686 " type=\"bool\"\n"
687 " cardinality=\"single\"\n"
688 " visibility=\"external\"\n"
689 " defaultValue=\"false\"\n"
690 " access=\"public\"\n"
691 " >\n"
692 " Whether to use VRML Semantics for the orientation of cube texture sides or\n"
693 " the default OpenGL semantics.\n"
694 " Note: OpenSG 1.x always used VRML Semantics.\n"
695 " </Field>\n"
696 "</FieldContainer>\n",
697 "A Sky/Ground/Skybox background, inspired by VRML, see \\ref\n"
698 "PageSystemWindowBackgroundSky for a description.\n"
699 "\n"
700 "The sky is defined by the _mfSkyAngle and _mfSkyColor fields, the ground by\n"
701 "the _mfGroundAngle and _mfGround Color fields. The resolution of the sky\n"
702 "sphere can be influenced by the _sfSphereRes field. The sky box is defined\n"
703 "by the _sfBackTexture, _sfFrontTexture, _sfLeftTexture, _sfRightTexture,\n"
704 "_sfTopTexture and _sfBottomTexture fields.\n"
707 /*------------------------------ get -----------------------------------*/
709 FieldContainerType &SkyBackgroundBase::getType(void)
711 return _type;
714 const FieldContainerType &SkyBackgroundBase::getType(void) const
716 return _type;
719 UInt32 SkyBackgroundBase::getContainerSize(void) const
721 return sizeof(SkyBackground);
724 /*------------------------- decorator get ------------------------------*/
727 MFColor4f *SkyBackgroundBase::editMFSkyColor(void)
729 editMField(SkyColorFieldMask, _mfSkyColor);
731 return &_mfSkyColor;
734 const MFColor4f *SkyBackgroundBase::getMFSkyColor(void) const
736 return &_mfSkyColor;
740 MFReal32 *SkyBackgroundBase::editMFSkyAngle(void)
742 editMField(SkyAngleFieldMask, _mfSkyAngle);
744 return &_mfSkyAngle;
747 const MFReal32 *SkyBackgroundBase::getMFSkyAngle(void) const
749 return &_mfSkyAngle;
753 MFColor4f *SkyBackgroundBase::editMFGroundColor(void)
755 editMField(GroundColorFieldMask, _mfGroundColor);
757 return &_mfGroundColor;
760 const MFColor4f *SkyBackgroundBase::getMFGroundColor(void) const
762 return &_mfGroundColor;
766 MFReal32 *SkyBackgroundBase::editMFGroundAngle(void)
768 editMField(GroundAngleFieldMask, _mfGroundAngle);
770 return &_mfGroundAngle;
773 const MFReal32 *SkyBackgroundBase::getMFGroundAngle(void) const
775 return &_mfGroundAngle;
779 SFUInt32 *SkyBackgroundBase::editSFSphereRes(void)
781 editSField(SphereResFieldMask);
783 return &_sfSphereRes;
786 const SFUInt32 *SkyBackgroundBase::getSFSphereRes(void) const
788 return &_sfSphereRes;
792 //! Get the SkyBackground::_sfBackTexture field.
793 const SFUnrecTextureBaseChunkPtr *SkyBackgroundBase::getSFBackTexture(void) const
795 return &_sfBackTexture;
798 SFUnrecTextureBaseChunkPtr *SkyBackgroundBase::editSFBackTexture (void)
800 editSField(BackTextureFieldMask);
802 return &_sfBackTexture;
805 //! Get the value of the SkyBackground::_sfBackTexture field.
806 TextureBaseChunk * SkyBackgroundBase::getBackTexture(void) const
808 return _sfBackTexture.getValue();
811 //! Set the value of the SkyBackground::_sfBackTexture field.
812 void SkyBackgroundBase::setBackTexture(TextureBaseChunk * const value)
814 editSField(BackTextureFieldMask);
816 _sfBackTexture.setValue(value);
820 //! Get the SkyBackground::_sfBottomTexture field.
821 const SFUnrecTextureBaseChunkPtr *SkyBackgroundBase::getSFBottomTexture(void) const
823 return &_sfBottomTexture;
826 SFUnrecTextureBaseChunkPtr *SkyBackgroundBase::editSFBottomTexture (void)
828 editSField(BottomTextureFieldMask);
830 return &_sfBottomTexture;
833 //! Get the value of the SkyBackground::_sfBottomTexture field.
834 TextureBaseChunk * SkyBackgroundBase::getBottomTexture(void) const
836 return _sfBottomTexture.getValue();
839 //! Set the value of the SkyBackground::_sfBottomTexture field.
840 void SkyBackgroundBase::setBottomTexture(TextureBaseChunk * const value)
842 editSField(BottomTextureFieldMask);
844 _sfBottomTexture.setValue(value);
848 //! Get the SkyBackground::_sfFrontTexture field.
849 const SFUnrecTextureBaseChunkPtr *SkyBackgroundBase::getSFFrontTexture(void) const
851 return &_sfFrontTexture;
854 SFUnrecTextureBaseChunkPtr *SkyBackgroundBase::editSFFrontTexture (void)
856 editSField(FrontTextureFieldMask);
858 return &_sfFrontTexture;
861 //! Get the value of the SkyBackground::_sfFrontTexture field.
862 TextureBaseChunk * SkyBackgroundBase::getFrontTexture(void) const
864 return _sfFrontTexture.getValue();
867 //! Set the value of the SkyBackground::_sfFrontTexture field.
868 void SkyBackgroundBase::setFrontTexture(TextureBaseChunk * const value)
870 editSField(FrontTextureFieldMask);
872 _sfFrontTexture.setValue(value);
876 //! Get the SkyBackground::_sfLeftTexture field.
877 const SFUnrecTextureBaseChunkPtr *SkyBackgroundBase::getSFLeftTexture(void) const
879 return &_sfLeftTexture;
882 SFUnrecTextureBaseChunkPtr *SkyBackgroundBase::editSFLeftTexture (void)
884 editSField(LeftTextureFieldMask);
886 return &_sfLeftTexture;
889 //! Get the value of the SkyBackground::_sfLeftTexture field.
890 TextureBaseChunk * SkyBackgroundBase::getLeftTexture(void) const
892 return _sfLeftTexture.getValue();
895 //! Set the value of the SkyBackground::_sfLeftTexture field.
896 void SkyBackgroundBase::setLeftTexture(TextureBaseChunk * const value)
898 editSField(LeftTextureFieldMask);
900 _sfLeftTexture.setValue(value);
904 //! Get the SkyBackground::_sfRightTexture field.
905 const SFUnrecTextureBaseChunkPtr *SkyBackgroundBase::getSFRightTexture(void) const
907 return &_sfRightTexture;
910 SFUnrecTextureBaseChunkPtr *SkyBackgroundBase::editSFRightTexture (void)
912 editSField(RightTextureFieldMask);
914 return &_sfRightTexture;
917 //! Get the value of the SkyBackground::_sfRightTexture field.
918 TextureBaseChunk * SkyBackgroundBase::getRightTexture(void) const
920 return _sfRightTexture.getValue();
923 //! Set the value of the SkyBackground::_sfRightTexture field.
924 void SkyBackgroundBase::setRightTexture(TextureBaseChunk * const value)
926 editSField(RightTextureFieldMask);
928 _sfRightTexture.setValue(value);
932 //! Get the SkyBackground::_sfTopTexture field.
933 const SFUnrecTextureBaseChunkPtr *SkyBackgroundBase::getSFTopTexture(void) const
935 return &_sfTopTexture;
938 SFUnrecTextureBaseChunkPtr *SkyBackgroundBase::editSFTopTexture (void)
940 editSField(TopTextureFieldMask);
942 return &_sfTopTexture;
945 //! Get the value of the SkyBackground::_sfTopTexture field.
946 TextureBaseChunk * SkyBackgroundBase::getTopTexture(void) const
948 return _sfTopTexture.getValue();
951 //! Set the value of the SkyBackground::_sfTopTexture field.
952 void SkyBackgroundBase::setTopTexture(TextureBaseChunk * const value)
954 editSField(TopTextureFieldMask);
956 _sfTopTexture.setValue(value);
960 SFBool *SkyBackgroundBase::editSFBoxInside(void)
962 editSField(BoxInsideFieldMask);
964 return &_sfBoxInside;
967 const SFBool *SkyBackgroundBase::getSFBoxInside(void) const
969 return &_sfBoxInside;
973 MFVec3f *SkyBackgroundBase::editMFTopTexCoord(void)
975 editMField(TopTexCoordFieldMask, _mfTopTexCoord);
977 return &_mfTopTexCoord;
980 const MFVec3f *SkyBackgroundBase::getMFTopTexCoord(void) const
982 return &_mfTopTexCoord;
986 MFVec3f *SkyBackgroundBase::editMFBottomTexCoord(void)
988 editMField(BottomTexCoordFieldMask, _mfBottomTexCoord);
990 return &_mfBottomTexCoord;
993 const MFVec3f *SkyBackgroundBase::getMFBottomTexCoord(void) const
995 return &_mfBottomTexCoord;
999 MFVec3f *SkyBackgroundBase::editMFRightTexCoord(void)
1001 editMField(RightTexCoordFieldMask, _mfRightTexCoord);
1003 return &_mfRightTexCoord;
1006 const MFVec3f *SkyBackgroundBase::getMFRightTexCoord(void) const
1008 return &_mfRightTexCoord;
1012 MFVec3f *SkyBackgroundBase::editMFLeftTexCoord(void)
1014 editMField(LeftTexCoordFieldMask, _mfLeftTexCoord);
1016 return &_mfLeftTexCoord;
1019 const MFVec3f *SkyBackgroundBase::getMFLeftTexCoord(void) const
1021 return &_mfLeftTexCoord;
1025 MFVec3f *SkyBackgroundBase::editMFFrontTexCoord(void)
1027 editMField(FrontTexCoordFieldMask, _mfFrontTexCoord);
1029 return &_mfFrontTexCoord;
1032 const MFVec3f *SkyBackgroundBase::getMFFrontTexCoord(void) const
1034 return &_mfFrontTexCoord;
1038 MFVec3f *SkyBackgroundBase::editMFBackTexCoord(void)
1040 editMField(BackTexCoordFieldMask, _mfBackTexCoord);
1042 return &_mfBackTexCoord;
1045 const MFVec3f *SkyBackgroundBase::getMFBackTexCoord(void) const
1047 return &_mfBackTexCoord;
1051 //! Get the SkyBackground::_sfBeacon field.
1052 const SFWeakNodePtr *SkyBackgroundBase::getSFBeacon(void) const
1054 return &_sfBeacon;
1057 SFWeakNodePtr *SkyBackgroundBase::editSFBeacon (void)
1059 editSField(BeaconFieldMask);
1061 return &_sfBeacon;
1064 //! Get the value of the SkyBackground::_sfBeacon field.
1065 Node * SkyBackgroundBase::getBeacon(void) const
1067 return _sfBeacon.getValue();
1070 //! Set the value of the SkyBackground::_sfBeacon field.
1071 void SkyBackgroundBase::setBeacon(Node * const value)
1073 editSField(BeaconFieldMask);
1075 _sfBeacon.setValue(value);
1079 SFBool *SkyBackgroundBase::editSFUseVRMLCubeTextureSemantics(void)
1081 editSField(UseVRMLCubeTextureSemanticsFieldMask);
1083 return &_sfUseVRMLCubeTextureSemantics;
1086 const SFBool *SkyBackgroundBase::getSFUseVRMLCubeTextureSemantics(void) const
1088 return &_sfUseVRMLCubeTextureSemantics;
1096 /*------------------------------ access -----------------------------------*/
1098 SizeT SkyBackgroundBase::getBinSize(ConstFieldMaskArg whichField)
1100 SizeT returnValue = Inherited::getBinSize(whichField);
1102 if(FieldBits::NoField != (SkyColorFieldMask & whichField))
1104 returnValue += _mfSkyColor.getBinSize();
1106 if(FieldBits::NoField != (SkyAngleFieldMask & whichField))
1108 returnValue += _mfSkyAngle.getBinSize();
1110 if(FieldBits::NoField != (GroundColorFieldMask & whichField))
1112 returnValue += _mfGroundColor.getBinSize();
1114 if(FieldBits::NoField != (GroundAngleFieldMask & whichField))
1116 returnValue += _mfGroundAngle.getBinSize();
1118 if(FieldBits::NoField != (SphereResFieldMask & whichField))
1120 returnValue += _sfSphereRes.getBinSize();
1122 if(FieldBits::NoField != (BackTextureFieldMask & whichField))
1124 returnValue += _sfBackTexture.getBinSize();
1126 if(FieldBits::NoField != (BottomTextureFieldMask & whichField))
1128 returnValue += _sfBottomTexture.getBinSize();
1130 if(FieldBits::NoField != (FrontTextureFieldMask & whichField))
1132 returnValue += _sfFrontTexture.getBinSize();
1134 if(FieldBits::NoField != (LeftTextureFieldMask & whichField))
1136 returnValue += _sfLeftTexture.getBinSize();
1138 if(FieldBits::NoField != (RightTextureFieldMask & whichField))
1140 returnValue += _sfRightTexture.getBinSize();
1142 if(FieldBits::NoField != (TopTextureFieldMask & whichField))
1144 returnValue += _sfTopTexture.getBinSize();
1146 if(FieldBits::NoField != (BoxInsideFieldMask & whichField))
1148 returnValue += _sfBoxInside.getBinSize();
1150 if(FieldBits::NoField != (TopTexCoordFieldMask & whichField))
1152 returnValue += _mfTopTexCoord.getBinSize();
1154 if(FieldBits::NoField != (BottomTexCoordFieldMask & whichField))
1156 returnValue += _mfBottomTexCoord.getBinSize();
1158 if(FieldBits::NoField != (RightTexCoordFieldMask & whichField))
1160 returnValue += _mfRightTexCoord.getBinSize();
1162 if(FieldBits::NoField != (LeftTexCoordFieldMask & whichField))
1164 returnValue += _mfLeftTexCoord.getBinSize();
1166 if(FieldBits::NoField != (FrontTexCoordFieldMask & whichField))
1168 returnValue += _mfFrontTexCoord.getBinSize();
1170 if(FieldBits::NoField != (BackTexCoordFieldMask & whichField))
1172 returnValue += _mfBackTexCoord.getBinSize();
1174 if(FieldBits::NoField != (BeaconFieldMask & whichField))
1176 returnValue += _sfBeacon.getBinSize();
1178 if(FieldBits::NoField != (UseVRMLCubeTextureSemanticsFieldMask & whichField))
1180 returnValue += _sfUseVRMLCubeTextureSemantics.getBinSize();
1183 return returnValue;
1186 void SkyBackgroundBase::copyToBin(BinaryDataHandler &pMem,
1187 ConstFieldMaskArg whichField)
1189 Inherited::copyToBin(pMem, whichField);
1191 if(FieldBits::NoField != (SkyColorFieldMask & whichField))
1193 _mfSkyColor.copyToBin(pMem);
1195 if(FieldBits::NoField != (SkyAngleFieldMask & whichField))
1197 _mfSkyAngle.copyToBin(pMem);
1199 if(FieldBits::NoField != (GroundColorFieldMask & whichField))
1201 _mfGroundColor.copyToBin(pMem);
1203 if(FieldBits::NoField != (GroundAngleFieldMask & whichField))
1205 _mfGroundAngle.copyToBin(pMem);
1207 if(FieldBits::NoField != (SphereResFieldMask & whichField))
1209 _sfSphereRes.copyToBin(pMem);
1211 if(FieldBits::NoField != (BackTextureFieldMask & whichField))
1213 _sfBackTexture.copyToBin(pMem);
1215 if(FieldBits::NoField != (BottomTextureFieldMask & whichField))
1217 _sfBottomTexture.copyToBin(pMem);
1219 if(FieldBits::NoField != (FrontTextureFieldMask & whichField))
1221 _sfFrontTexture.copyToBin(pMem);
1223 if(FieldBits::NoField != (LeftTextureFieldMask & whichField))
1225 _sfLeftTexture.copyToBin(pMem);
1227 if(FieldBits::NoField != (RightTextureFieldMask & whichField))
1229 _sfRightTexture.copyToBin(pMem);
1231 if(FieldBits::NoField != (TopTextureFieldMask & whichField))
1233 _sfTopTexture.copyToBin(pMem);
1235 if(FieldBits::NoField != (BoxInsideFieldMask & whichField))
1237 _sfBoxInside.copyToBin(pMem);
1239 if(FieldBits::NoField != (TopTexCoordFieldMask & whichField))
1241 _mfTopTexCoord.copyToBin(pMem);
1243 if(FieldBits::NoField != (BottomTexCoordFieldMask & whichField))
1245 _mfBottomTexCoord.copyToBin(pMem);
1247 if(FieldBits::NoField != (RightTexCoordFieldMask & whichField))
1249 _mfRightTexCoord.copyToBin(pMem);
1251 if(FieldBits::NoField != (LeftTexCoordFieldMask & whichField))
1253 _mfLeftTexCoord.copyToBin(pMem);
1255 if(FieldBits::NoField != (FrontTexCoordFieldMask & whichField))
1257 _mfFrontTexCoord.copyToBin(pMem);
1259 if(FieldBits::NoField != (BackTexCoordFieldMask & whichField))
1261 _mfBackTexCoord.copyToBin(pMem);
1263 if(FieldBits::NoField != (BeaconFieldMask & whichField))
1265 _sfBeacon.copyToBin(pMem);
1267 if(FieldBits::NoField != (UseVRMLCubeTextureSemanticsFieldMask & whichField))
1269 _sfUseVRMLCubeTextureSemantics.copyToBin(pMem);
1273 void SkyBackgroundBase::copyFromBin(BinaryDataHandler &pMem,
1274 ConstFieldMaskArg whichField)
1276 Inherited::copyFromBin(pMem, whichField);
1278 if(FieldBits::NoField != (SkyColorFieldMask & whichField))
1280 editMField(SkyColorFieldMask, _mfSkyColor);
1281 _mfSkyColor.copyFromBin(pMem);
1283 if(FieldBits::NoField != (SkyAngleFieldMask & whichField))
1285 editMField(SkyAngleFieldMask, _mfSkyAngle);
1286 _mfSkyAngle.copyFromBin(pMem);
1288 if(FieldBits::NoField != (GroundColorFieldMask & whichField))
1290 editMField(GroundColorFieldMask, _mfGroundColor);
1291 _mfGroundColor.copyFromBin(pMem);
1293 if(FieldBits::NoField != (GroundAngleFieldMask & whichField))
1295 editMField(GroundAngleFieldMask, _mfGroundAngle);
1296 _mfGroundAngle.copyFromBin(pMem);
1298 if(FieldBits::NoField != (SphereResFieldMask & whichField))
1300 editSField(SphereResFieldMask);
1301 _sfSphereRes.copyFromBin(pMem);
1303 if(FieldBits::NoField != (BackTextureFieldMask & whichField))
1305 editSField(BackTextureFieldMask);
1306 _sfBackTexture.copyFromBin(pMem);
1308 if(FieldBits::NoField != (BottomTextureFieldMask & whichField))
1310 editSField(BottomTextureFieldMask);
1311 _sfBottomTexture.copyFromBin(pMem);
1313 if(FieldBits::NoField != (FrontTextureFieldMask & whichField))
1315 editSField(FrontTextureFieldMask);
1316 _sfFrontTexture.copyFromBin(pMem);
1318 if(FieldBits::NoField != (LeftTextureFieldMask & whichField))
1320 editSField(LeftTextureFieldMask);
1321 _sfLeftTexture.copyFromBin(pMem);
1323 if(FieldBits::NoField != (RightTextureFieldMask & whichField))
1325 editSField(RightTextureFieldMask);
1326 _sfRightTexture.copyFromBin(pMem);
1328 if(FieldBits::NoField != (TopTextureFieldMask & whichField))
1330 editSField(TopTextureFieldMask);
1331 _sfTopTexture.copyFromBin(pMem);
1333 if(FieldBits::NoField != (BoxInsideFieldMask & whichField))
1335 editSField(BoxInsideFieldMask);
1336 _sfBoxInside.copyFromBin(pMem);
1338 if(FieldBits::NoField != (TopTexCoordFieldMask & whichField))
1340 editMField(TopTexCoordFieldMask, _mfTopTexCoord);
1341 _mfTopTexCoord.copyFromBin(pMem);
1343 if(FieldBits::NoField != (BottomTexCoordFieldMask & whichField))
1345 editMField(BottomTexCoordFieldMask, _mfBottomTexCoord);
1346 _mfBottomTexCoord.copyFromBin(pMem);
1348 if(FieldBits::NoField != (RightTexCoordFieldMask & whichField))
1350 editMField(RightTexCoordFieldMask, _mfRightTexCoord);
1351 _mfRightTexCoord.copyFromBin(pMem);
1353 if(FieldBits::NoField != (LeftTexCoordFieldMask & whichField))
1355 editMField(LeftTexCoordFieldMask, _mfLeftTexCoord);
1356 _mfLeftTexCoord.copyFromBin(pMem);
1358 if(FieldBits::NoField != (FrontTexCoordFieldMask & whichField))
1360 editMField(FrontTexCoordFieldMask, _mfFrontTexCoord);
1361 _mfFrontTexCoord.copyFromBin(pMem);
1363 if(FieldBits::NoField != (BackTexCoordFieldMask & whichField))
1365 editMField(BackTexCoordFieldMask, _mfBackTexCoord);
1366 _mfBackTexCoord.copyFromBin(pMem);
1368 if(FieldBits::NoField != (BeaconFieldMask & whichField))
1370 editSField(BeaconFieldMask);
1371 _sfBeacon.copyFromBin(pMem);
1373 if(FieldBits::NoField != (UseVRMLCubeTextureSemanticsFieldMask & whichField))
1375 editSField(UseVRMLCubeTextureSemanticsFieldMask);
1376 _sfUseVRMLCubeTextureSemantics.copyFromBin(pMem);
1380 //! create a new instance of the class
1381 SkyBackgroundTransitPtr SkyBackgroundBase::createLocal(BitVector bFlags)
1383 SkyBackgroundTransitPtr fc;
1385 if(getClassType().getPrototype() != NULL)
1387 FieldContainerTransitPtr tmpPtr =
1388 getClassType().getPrototype()-> shallowCopyLocal(bFlags);
1390 fc = dynamic_pointer_cast<SkyBackground>(tmpPtr);
1393 return fc;
1396 //! create a new instance of the class, copy the container flags
1397 SkyBackgroundTransitPtr SkyBackgroundBase::createDependent(BitVector bFlags)
1399 SkyBackgroundTransitPtr fc;
1401 if(getClassType().getPrototype() != NULL)
1403 FieldContainerTransitPtr tmpPtr =
1404 getClassType().getPrototype()-> shallowCopyDependent(bFlags);
1406 fc = dynamic_pointer_cast<SkyBackground>(tmpPtr);
1409 return fc;
1412 //! create a new instance of the class
1413 SkyBackgroundTransitPtr SkyBackgroundBase::create(void)
1415 SkyBackgroundTransitPtr fc;
1417 if(getClassType().getPrototype() != NULL)
1419 FieldContainerTransitPtr tmpPtr =
1420 getClassType().getPrototype()-> shallowCopy();
1422 fc = dynamic_pointer_cast<SkyBackground>(tmpPtr);
1425 return fc;
1428 SkyBackground *SkyBackgroundBase::createEmptyLocal(BitVector bFlags)
1430 SkyBackground *returnValue;
1432 newPtr<SkyBackground>(returnValue, bFlags);
1434 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
1436 return returnValue;
1439 //! create an empty new instance of the class, do not copy the prototype
1440 SkyBackground *SkyBackgroundBase::createEmpty(void)
1442 SkyBackground *returnValue;
1444 newPtr<SkyBackground>(returnValue, Thread::getCurrentLocalFlags());
1446 returnValue->_pFieldFlags->_bNamespaceMask &=
1447 ~Thread::getCurrentLocalFlags();
1449 return returnValue;
1453 FieldContainerTransitPtr SkyBackgroundBase::shallowCopyLocal(
1454 BitVector bFlags) const
1456 SkyBackground *tmpPtr;
1458 newPtr(tmpPtr, dynamic_cast<const SkyBackground *>(this), bFlags);
1460 FieldContainerTransitPtr returnValue(tmpPtr);
1462 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags;
1464 return returnValue;
1467 FieldContainerTransitPtr SkyBackgroundBase::shallowCopyDependent(
1468 BitVector bFlags) const
1470 SkyBackground *tmpPtr;
1472 newPtr(tmpPtr, dynamic_cast<const SkyBackground *>(this), ~bFlags);
1474 FieldContainerTransitPtr returnValue(tmpPtr);
1476 tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags;
1478 return returnValue;
1481 FieldContainerTransitPtr SkyBackgroundBase::shallowCopy(void) const
1483 SkyBackground *tmpPtr;
1485 newPtr(tmpPtr,
1486 dynamic_cast<const SkyBackground *>(this),
1487 Thread::getCurrentLocalFlags());
1489 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags();
1491 FieldContainerTransitPtr returnValue(tmpPtr);
1493 return returnValue;
1499 /*------------------------- constructors ----------------------------------*/
1501 SkyBackgroundBase::SkyBackgroundBase(void) :
1502 Inherited(),
1503 _mfSkyColor (),
1504 _mfSkyAngle (),
1505 _mfGroundColor (),
1506 _mfGroundAngle (),
1507 _sfSphereRes (UInt32(8)),
1508 _sfBackTexture (NULL),
1509 _sfBottomTexture (NULL),
1510 _sfFrontTexture (NULL),
1511 _sfLeftTexture (NULL),
1512 _sfRightTexture (NULL),
1513 _sfTopTexture (NULL),
1514 _sfBoxInside (bool(true)),
1515 _mfTopTexCoord (),
1516 _mfBottomTexCoord (),
1517 _mfRightTexCoord (),
1518 _mfLeftTexCoord (),
1519 _mfFrontTexCoord (),
1520 _mfBackTexCoord (),
1521 _sfBeacon (NULL),
1522 _sfUseVRMLCubeTextureSemantics(bool(false))
1526 SkyBackgroundBase::SkyBackgroundBase(const SkyBackgroundBase &source) :
1527 Inherited(source),
1528 _mfSkyColor (source._mfSkyColor ),
1529 _mfSkyAngle (source._mfSkyAngle ),
1530 _mfGroundColor (source._mfGroundColor ),
1531 _mfGroundAngle (source._mfGroundAngle ),
1532 _sfSphereRes (source._sfSphereRes ),
1533 _sfBackTexture (NULL),
1534 _sfBottomTexture (NULL),
1535 _sfFrontTexture (NULL),
1536 _sfLeftTexture (NULL),
1537 _sfRightTexture (NULL),
1538 _sfTopTexture (NULL),
1539 _sfBoxInside (source._sfBoxInside ),
1540 _mfTopTexCoord (source._mfTopTexCoord ),
1541 _mfBottomTexCoord (source._mfBottomTexCoord ),
1542 _mfRightTexCoord (source._mfRightTexCoord ),
1543 _mfLeftTexCoord (source._mfLeftTexCoord ),
1544 _mfFrontTexCoord (source._mfFrontTexCoord ),
1545 _mfBackTexCoord (source._mfBackTexCoord ),
1546 _sfBeacon (NULL),
1547 _sfUseVRMLCubeTextureSemantics(source._sfUseVRMLCubeTextureSemantics)
1552 /*-------------------------- destructors ----------------------------------*/
1554 SkyBackgroundBase::~SkyBackgroundBase(void)
1558 void SkyBackgroundBase::onCreate(const SkyBackground *source)
1560 Inherited::onCreate(source);
1562 if(source != NULL)
1564 SkyBackground *pThis = static_cast<SkyBackground *>(this);
1566 pThis->setBackTexture(source->getBackTexture());
1568 pThis->setBottomTexture(source->getBottomTexture());
1570 pThis->setFrontTexture(source->getFrontTexture());
1572 pThis->setLeftTexture(source->getLeftTexture());
1574 pThis->setRightTexture(source->getRightTexture());
1576 pThis->setTopTexture(source->getTopTexture());
1578 pThis->setBeacon(source->getBeacon());
1582 GetFieldHandlePtr SkyBackgroundBase::getHandleSkyColor (void) const
1584 MFColor4f::GetHandlePtr returnValue(
1585 new MFColor4f::GetHandle(
1586 &_mfSkyColor,
1587 this->getType().getFieldDesc(SkyColorFieldId),
1588 const_cast<SkyBackgroundBase *>(this)));
1590 return returnValue;
1593 EditFieldHandlePtr SkyBackgroundBase::editHandleSkyColor (void)
1595 MFColor4f::EditHandlePtr returnValue(
1596 new MFColor4f::EditHandle(
1597 &_mfSkyColor,
1598 this->getType().getFieldDesc(SkyColorFieldId),
1599 this));
1602 editMField(SkyColorFieldMask, _mfSkyColor);
1604 return returnValue;
1607 GetFieldHandlePtr SkyBackgroundBase::getHandleSkyAngle (void) const
1609 MFReal32::GetHandlePtr returnValue(
1610 new MFReal32::GetHandle(
1611 &_mfSkyAngle,
1612 this->getType().getFieldDesc(SkyAngleFieldId),
1613 const_cast<SkyBackgroundBase *>(this)));
1615 return returnValue;
1618 EditFieldHandlePtr SkyBackgroundBase::editHandleSkyAngle (void)
1620 MFReal32::EditHandlePtr returnValue(
1621 new MFReal32::EditHandle(
1622 &_mfSkyAngle,
1623 this->getType().getFieldDesc(SkyAngleFieldId),
1624 this));
1627 editMField(SkyAngleFieldMask, _mfSkyAngle);
1629 return returnValue;
1632 GetFieldHandlePtr SkyBackgroundBase::getHandleGroundColor (void) const
1634 MFColor4f::GetHandlePtr returnValue(
1635 new MFColor4f::GetHandle(
1636 &_mfGroundColor,
1637 this->getType().getFieldDesc(GroundColorFieldId),
1638 const_cast<SkyBackgroundBase *>(this)));
1640 return returnValue;
1643 EditFieldHandlePtr SkyBackgroundBase::editHandleGroundColor (void)
1645 MFColor4f::EditHandlePtr returnValue(
1646 new MFColor4f::EditHandle(
1647 &_mfGroundColor,
1648 this->getType().getFieldDesc(GroundColorFieldId),
1649 this));
1652 editMField(GroundColorFieldMask, _mfGroundColor);
1654 return returnValue;
1657 GetFieldHandlePtr SkyBackgroundBase::getHandleGroundAngle (void) const
1659 MFReal32::GetHandlePtr returnValue(
1660 new MFReal32::GetHandle(
1661 &_mfGroundAngle,
1662 this->getType().getFieldDesc(GroundAngleFieldId),
1663 const_cast<SkyBackgroundBase *>(this)));
1665 return returnValue;
1668 EditFieldHandlePtr SkyBackgroundBase::editHandleGroundAngle (void)
1670 MFReal32::EditHandlePtr returnValue(
1671 new MFReal32::EditHandle(
1672 &_mfGroundAngle,
1673 this->getType().getFieldDesc(GroundAngleFieldId),
1674 this));
1677 editMField(GroundAngleFieldMask, _mfGroundAngle);
1679 return returnValue;
1682 GetFieldHandlePtr SkyBackgroundBase::getHandleSphereRes (void) const
1684 SFUInt32::GetHandlePtr returnValue(
1685 new SFUInt32::GetHandle(
1686 &_sfSphereRes,
1687 this->getType().getFieldDesc(SphereResFieldId),
1688 const_cast<SkyBackgroundBase *>(this)));
1690 return returnValue;
1693 EditFieldHandlePtr SkyBackgroundBase::editHandleSphereRes (void)
1695 SFUInt32::EditHandlePtr returnValue(
1696 new SFUInt32::EditHandle(
1697 &_sfSphereRes,
1698 this->getType().getFieldDesc(SphereResFieldId),
1699 this));
1702 editSField(SphereResFieldMask);
1704 return returnValue;
1707 GetFieldHandlePtr SkyBackgroundBase::getHandleBackTexture (void) const
1709 SFUnrecTextureBaseChunkPtr::GetHandlePtr returnValue(
1710 new SFUnrecTextureBaseChunkPtr::GetHandle(
1711 &_sfBackTexture,
1712 this->getType().getFieldDesc(BackTextureFieldId),
1713 const_cast<SkyBackgroundBase *>(this)));
1715 return returnValue;
1718 EditFieldHandlePtr SkyBackgroundBase::editHandleBackTexture (void)
1720 SFUnrecTextureBaseChunkPtr::EditHandlePtr returnValue(
1721 new SFUnrecTextureBaseChunkPtr::EditHandle(
1722 &_sfBackTexture,
1723 this->getType().getFieldDesc(BackTextureFieldId),
1724 this));
1726 returnValue->setSetMethod(
1727 boost::bind(&SkyBackground::setBackTexture,
1728 static_cast<SkyBackground *>(this), _1));
1730 editSField(BackTextureFieldMask);
1732 return returnValue;
1735 GetFieldHandlePtr SkyBackgroundBase::getHandleBottomTexture (void) const
1737 SFUnrecTextureBaseChunkPtr::GetHandlePtr returnValue(
1738 new SFUnrecTextureBaseChunkPtr::GetHandle(
1739 &_sfBottomTexture,
1740 this->getType().getFieldDesc(BottomTextureFieldId),
1741 const_cast<SkyBackgroundBase *>(this)));
1743 return returnValue;
1746 EditFieldHandlePtr SkyBackgroundBase::editHandleBottomTexture (void)
1748 SFUnrecTextureBaseChunkPtr::EditHandlePtr returnValue(
1749 new SFUnrecTextureBaseChunkPtr::EditHandle(
1750 &_sfBottomTexture,
1751 this->getType().getFieldDesc(BottomTextureFieldId),
1752 this));
1754 returnValue->setSetMethod(
1755 boost::bind(&SkyBackground::setBottomTexture,
1756 static_cast<SkyBackground *>(this), _1));
1758 editSField(BottomTextureFieldMask);
1760 return returnValue;
1763 GetFieldHandlePtr SkyBackgroundBase::getHandleFrontTexture (void) const
1765 SFUnrecTextureBaseChunkPtr::GetHandlePtr returnValue(
1766 new SFUnrecTextureBaseChunkPtr::GetHandle(
1767 &_sfFrontTexture,
1768 this->getType().getFieldDesc(FrontTextureFieldId),
1769 const_cast<SkyBackgroundBase *>(this)));
1771 return returnValue;
1774 EditFieldHandlePtr SkyBackgroundBase::editHandleFrontTexture (void)
1776 SFUnrecTextureBaseChunkPtr::EditHandlePtr returnValue(
1777 new SFUnrecTextureBaseChunkPtr::EditHandle(
1778 &_sfFrontTexture,
1779 this->getType().getFieldDesc(FrontTextureFieldId),
1780 this));
1782 returnValue->setSetMethod(
1783 boost::bind(&SkyBackground::setFrontTexture,
1784 static_cast<SkyBackground *>(this), _1));
1786 editSField(FrontTextureFieldMask);
1788 return returnValue;
1791 GetFieldHandlePtr SkyBackgroundBase::getHandleLeftTexture (void) const
1793 SFUnrecTextureBaseChunkPtr::GetHandlePtr returnValue(
1794 new SFUnrecTextureBaseChunkPtr::GetHandle(
1795 &_sfLeftTexture,
1796 this->getType().getFieldDesc(LeftTextureFieldId),
1797 const_cast<SkyBackgroundBase *>(this)));
1799 return returnValue;
1802 EditFieldHandlePtr SkyBackgroundBase::editHandleLeftTexture (void)
1804 SFUnrecTextureBaseChunkPtr::EditHandlePtr returnValue(
1805 new SFUnrecTextureBaseChunkPtr::EditHandle(
1806 &_sfLeftTexture,
1807 this->getType().getFieldDesc(LeftTextureFieldId),
1808 this));
1810 returnValue->setSetMethod(
1811 boost::bind(&SkyBackground::setLeftTexture,
1812 static_cast<SkyBackground *>(this), _1));
1814 editSField(LeftTextureFieldMask);
1816 return returnValue;
1819 GetFieldHandlePtr SkyBackgroundBase::getHandleRightTexture (void) const
1821 SFUnrecTextureBaseChunkPtr::GetHandlePtr returnValue(
1822 new SFUnrecTextureBaseChunkPtr::GetHandle(
1823 &_sfRightTexture,
1824 this->getType().getFieldDesc(RightTextureFieldId),
1825 const_cast<SkyBackgroundBase *>(this)));
1827 return returnValue;
1830 EditFieldHandlePtr SkyBackgroundBase::editHandleRightTexture (void)
1832 SFUnrecTextureBaseChunkPtr::EditHandlePtr returnValue(
1833 new SFUnrecTextureBaseChunkPtr::EditHandle(
1834 &_sfRightTexture,
1835 this->getType().getFieldDesc(RightTextureFieldId),
1836 this));
1838 returnValue->setSetMethod(
1839 boost::bind(&SkyBackground::setRightTexture,
1840 static_cast<SkyBackground *>(this), _1));
1842 editSField(RightTextureFieldMask);
1844 return returnValue;
1847 GetFieldHandlePtr SkyBackgroundBase::getHandleTopTexture (void) const
1849 SFUnrecTextureBaseChunkPtr::GetHandlePtr returnValue(
1850 new SFUnrecTextureBaseChunkPtr::GetHandle(
1851 &_sfTopTexture,
1852 this->getType().getFieldDesc(TopTextureFieldId),
1853 const_cast<SkyBackgroundBase *>(this)));
1855 return returnValue;
1858 EditFieldHandlePtr SkyBackgroundBase::editHandleTopTexture (void)
1860 SFUnrecTextureBaseChunkPtr::EditHandlePtr returnValue(
1861 new SFUnrecTextureBaseChunkPtr::EditHandle(
1862 &_sfTopTexture,
1863 this->getType().getFieldDesc(TopTextureFieldId),
1864 this));
1866 returnValue->setSetMethod(
1867 boost::bind(&SkyBackground::setTopTexture,
1868 static_cast<SkyBackground *>(this), _1));
1870 editSField(TopTextureFieldMask);
1872 return returnValue;
1875 GetFieldHandlePtr SkyBackgroundBase::getHandleBoxInside (void) const
1877 SFBool::GetHandlePtr returnValue(
1878 new SFBool::GetHandle(
1879 &_sfBoxInside,
1880 this->getType().getFieldDesc(BoxInsideFieldId),
1881 const_cast<SkyBackgroundBase *>(this)));
1883 return returnValue;
1886 EditFieldHandlePtr SkyBackgroundBase::editHandleBoxInside (void)
1888 SFBool::EditHandlePtr returnValue(
1889 new SFBool::EditHandle(
1890 &_sfBoxInside,
1891 this->getType().getFieldDesc(BoxInsideFieldId),
1892 this));
1895 editSField(BoxInsideFieldMask);
1897 return returnValue;
1900 GetFieldHandlePtr SkyBackgroundBase::getHandleTopTexCoord (void) const
1902 MFVec3f::GetHandlePtr returnValue(
1903 new MFVec3f::GetHandle(
1904 &_mfTopTexCoord,
1905 this->getType().getFieldDesc(TopTexCoordFieldId),
1906 const_cast<SkyBackgroundBase *>(this)));
1908 return returnValue;
1911 EditFieldHandlePtr SkyBackgroundBase::editHandleTopTexCoord (void)
1913 MFVec3f::EditHandlePtr returnValue(
1914 new MFVec3f::EditHandle(
1915 &_mfTopTexCoord,
1916 this->getType().getFieldDesc(TopTexCoordFieldId),
1917 this));
1920 editMField(TopTexCoordFieldMask, _mfTopTexCoord);
1922 return returnValue;
1925 GetFieldHandlePtr SkyBackgroundBase::getHandleBottomTexCoord (void) const
1927 MFVec3f::GetHandlePtr returnValue(
1928 new MFVec3f::GetHandle(
1929 &_mfBottomTexCoord,
1930 this->getType().getFieldDesc(BottomTexCoordFieldId),
1931 const_cast<SkyBackgroundBase *>(this)));
1933 return returnValue;
1936 EditFieldHandlePtr SkyBackgroundBase::editHandleBottomTexCoord (void)
1938 MFVec3f::EditHandlePtr returnValue(
1939 new MFVec3f::EditHandle(
1940 &_mfBottomTexCoord,
1941 this->getType().getFieldDesc(BottomTexCoordFieldId),
1942 this));
1945 editMField(BottomTexCoordFieldMask, _mfBottomTexCoord);
1947 return returnValue;
1950 GetFieldHandlePtr SkyBackgroundBase::getHandleRightTexCoord (void) const
1952 MFVec3f::GetHandlePtr returnValue(
1953 new MFVec3f::GetHandle(
1954 &_mfRightTexCoord,
1955 this->getType().getFieldDesc(RightTexCoordFieldId),
1956 const_cast<SkyBackgroundBase *>(this)));
1958 return returnValue;
1961 EditFieldHandlePtr SkyBackgroundBase::editHandleRightTexCoord (void)
1963 MFVec3f::EditHandlePtr returnValue(
1964 new MFVec3f::EditHandle(
1965 &_mfRightTexCoord,
1966 this->getType().getFieldDesc(RightTexCoordFieldId),
1967 this));
1970 editMField(RightTexCoordFieldMask, _mfRightTexCoord);
1972 return returnValue;
1975 GetFieldHandlePtr SkyBackgroundBase::getHandleLeftTexCoord (void) const
1977 MFVec3f::GetHandlePtr returnValue(
1978 new MFVec3f::GetHandle(
1979 &_mfLeftTexCoord,
1980 this->getType().getFieldDesc(LeftTexCoordFieldId),
1981 const_cast<SkyBackgroundBase *>(this)));
1983 return returnValue;
1986 EditFieldHandlePtr SkyBackgroundBase::editHandleLeftTexCoord (void)
1988 MFVec3f::EditHandlePtr returnValue(
1989 new MFVec3f::EditHandle(
1990 &_mfLeftTexCoord,
1991 this->getType().getFieldDesc(LeftTexCoordFieldId),
1992 this));
1995 editMField(LeftTexCoordFieldMask, _mfLeftTexCoord);
1997 return returnValue;
2000 GetFieldHandlePtr SkyBackgroundBase::getHandleFrontTexCoord (void) const
2002 MFVec3f::GetHandlePtr returnValue(
2003 new MFVec3f::GetHandle(
2004 &_mfFrontTexCoord,
2005 this->getType().getFieldDesc(FrontTexCoordFieldId),
2006 const_cast<SkyBackgroundBase *>(this)));
2008 return returnValue;
2011 EditFieldHandlePtr SkyBackgroundBase::editHandleFrontTexCoord (void)
2013 MFVec3f::EditHandlePtr returnValue(
2014 new MFVec3f::EditHandle(
2015 &_mfFrontTexCoord,
2016 this->getType().getFieldDesc(FrontTexCoordFieldId),
2017 this));
2020 editMField(FrontTexCoordFieldMask, _mfFrontTexCoord);
2022 return returnValue;
2025 GetFieldHandlePtr SkyBackgroundBase::getHandleBackTexCoord (void) const
2027 MFVec3f::GetHandlePtr returnValue(
2028 new MFVec3f::GetHandle(
2029 &_mfBackTexCoord,
2030 this->getType().getFieldDesc(BackTexCoordFieldId),
2031 const_cast<SkyBackgroundBase *>(this)));
2033 return returnValue;
2036 EditFieldHandlePtr SkyBackgroundBase::editHandleBackTexCoord (void)
2038 MFVec3f::EditHandlePtr returnValue(
2039 new MFVec3f::EditHandle(
2040 &_mfBackTexCoord,
2041 this->getType().getFieldDesc(BackTexCoordFieldId),
2042 this));
2045 editMField(BackTexCoordFieldMask, _mfBackTexCoord);
2047 return returnValue;
2050 GetFieldHandlePtr SkyBackgroundBase::getHandleBeacon (void) const
2052 SFWeakNodePtr::GetHandlePtr returnValue(
2053 new SFWeakNodePtr::GetHandle(
2054 &_sfBeacon,
2055 this->getType().getFieldDesc(BeaconFieldId),
2056 const_cast<SkyBackgroundBase *>(this)));
2058 return returnValue;
2061 EditFieldHandlePtr SkyBackgroundBase::editHandleBeacon (void)
2063 SFWeakNodePtr::EditHandlePtr returnValue(
2064 new SFWeakNodePtr::EditHandle(
2065 &_sfBeacon,
2066 this->getType().getFieldDesc(BeaconFieldId),
2067 this));
2069 returnValue->setSetMethod(
2070 boost::bind(&SkyBackground::setBeacon,
2071 static_cast<SkyBackground *>(this), _1));
2073 editSField(BeaconFieldMask);
2075 return returnValue;
2078 GetFieldHandlePtr SkyBackgroundBase::getHandleUseVRMLCubeTextureSemantics (void) const
2080 SFBool::GetHandlePtr returnValue(
2081 new SFBool::GetHandle(
2082 &_sfUseVRMLCubeTextureSemantics,
2083 this->getType().getFieldDesc(UseVRMLCubeTextureSemanticsFieldId),
2084 const_cast<SkyBackgroundBase *>(this)));
2086 return returnValue;
2089 EditFieldHandlePtr SkyBackgroundBase::editHandleUseVRMLCubeTextureSemantics(void)
2091 SFBool::EditHandlePtr returnValue(
2092 new SFBool::EditHandle(
2093 &_sfUseVRMLCubeTextureSemantics,
2094 this->getType().getFieldDesc(UseVRMLCubeTextureSemanticsFieldId),
2095 this));
2098 editSField(UseVRMLCubeTextureSemanticsFieldMask);
2100 return returnValue;
2104 #ifdef OSG_MT_CPTR_ASPECT
2105 void SkyBackgroundBase::execSyncV( FieldContainer &oFrom,
2106 ConstFieldMaskArg whichField,
2107 AspectOffsetStore &oOffsets,
2108 ConstFieldMaskArg syncMode,
2109 const UInt32 uiSyncInfo)
2111 SkyBackground *pThis = static_cast<SkyBackground *>(this);
2113 pThis->execSync(static_cast<SkyBackground *>(&oFrom),
2114 whichField,
2115 oOffsets,
2116 syncMode,
2117 uiSyncInfo);
2119 #endif
2122 #ifdef OSG_MT_CPTR_ASPECT
2123 FieldContainer *SkyBackgroundBase::createAspectCopy(
2124 const FieldContainer *pRefAspect) const
2126 SkyBackground *returnValue;
2128 newAspectCopy(returnValue,
2129 dynamic_cast<const SkyBackground *>(pRefAspect),
2130 dynamic_cast<const SkyBackground *>(this));
2132 return returnValue;
2134 #endif
2136 void SkyBackgroundBase::resolveLinks(void)
2138 Inherited::resolveLinks();
2140 static_cast<SkyBackground *>(this)->setBackTexture(NULL);
2142 static_cast<SkyBackground *>(this)->setBottomTexture(NULL);
2144 static_cast<SkyBackground *>(this)->setFrontTexture(NULL);
2146 static_cast<SkyBackground *>(this)->setLeftTexture(NULL);
2148 static_cast<SkyBackground *>(this)->setRightTexture(NULL);
2150 static_cast<SkyBackground *>(this)->setTopTexture(NULL);
2152 static_cast<SkyBackground *>(this)->setBeacon(NULL);
2154 #ifdef OSG_MT_CPTR_ASPECT
2155 AspectOffsetStore oOffsets;
2157 _pAspectStore->fillOffsetArray(oOffsets, this);
2158 #endif
2160 #ifdef OSG_MT_CPTR_ASPECT
2161 _mfSkyColor.terminateShare(Thread::getCurrentAspect(),
2162 oOffsets);
2163 #endif
2164 #ifdef OSG_MT_CPTR_ASPECT
2165 _mfSkyAngle.terminateShare(Thread::getCurrentAspect(),
2166 oOffsets);
2167 #endif
2168 #ifdef OSG_MT_CPTR_ASPECT
2169 _mfGroundColor.terminateShare(Thread::getCurrentAspect(),
2170 oOffsets);
2171 #endif
2172 #ifdef OSG_MT_CPTR_ASPECT
2173 _mfGroundAngle.terminateShare(Thread::getCurrentAspect(),
2174 oOffsets);
2175 #endif
2176 #ifdef OSG_MT_CPTR_ASPECT
2177 _mfTopTexCoord.terminateShare(Thread::getCurrentAspect(),
2178 oOffsets);
2179 #endif
2180 #ifdef OSG_MT_CPTR_ASPECT
2181 _mfBottomTexCoord.terminateShare(Thread::getCurrentAspect(),
2182 oOffsets);
2183 #endif
2184 #ifdef OSG_MT_CPTR_ASPECT
2185 _mfRightTexCoord.terminateShare(Thread::getCurrentAspect(),
2186 oOffsets);
2187 #endif
2188 #ifdef OSG_MT_CPTR_ASPECT
2189 _mfLeftTexCoord.terminateShare(Thread::getCurrentAspect(),
2190 oOffsets);
2191 #endif
2192 #ifdef OSG_MT_CPTR_ASPECT
2193 _mfFrontTexCoord.terminateShare(Thread::getCurrentAspect(),
2194 oOffsets);
2195 #endif
2196 #ifdef OSG_MT_CPTR_ASPECT
2197 _mfBackTexCoord.terminateShare(Thread::getCurrentAspect(),
2198 oOffsets);
2199 #endif
2203 OSG_END_NAMESPACE