changed: gcc8 base update
[opensg.git] / Source / System / State / OpenGL / OSGTexGenChunkBase.cpp
blobb313f1241c0b9585c568b008f32f9b29ce4c69e9
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 TexGenChunk!
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"
64 #include "OSGGL.h" // GenFuncS default header
65 #include "OSGGL.h" // GenFuncT default header
66 #include "OSGGL.h" // GenFuncR default header
67 #include "OSGGL.h" // GenFuncQ default header
69 #include "OSGNode.h" // SBeacon Class
71 #include "OSGTexGenChunkBase.h"
72 #include "OSGTexGenChunk.h"
74 #include <boost/bind.hpp>
76 OSG_BEGIN_NAMESPACE
78 /***************************************************************************\
79 * Description *
80 \***************************************************************************/
82 /*! \class OSG::TexGenChunk
83 See \ref PageSystemTexGenChunk for a description.
85 Chunk for texture coordinate generation functions.
87 This chunk wraps glTexGen(). All 4 coordinates are wrapped in a single chunk
88 by using separate gen funcs for each variable (OSG::TexGenChunk::_sfGenFuncS,
89 OSG::TexGenChunk::_sfGenFuncT, OSG::TexGenChunk::_sfGenFuncR,
90 OSG::TexGenChunk::_sfGenFuncQ). The default for each of these is GL_NONE, or
91 off. The optional plane parameters are stored in
92 OSG::TexGenChunk::_sfGenFuncSPlane,
93 OSG::TexGenChunk::_sfGenFuncTPlane, OSG::TexGenChunk::_sfGenFuncRPlane and
94 OSG::TexGenChunk::_sfGenFuncQPlane.
97 /***************************************************************************\
98 * Field Documentation *
99 \***************************************************************************/
101 /*! \var GLenum TexGenChunkBase::_sfGenFuncS
105 /*! \var GLenum TexGenChunkBase::_sfGenFuncT
109 /*! \var GLenum TexGenChunkBase::_sfGenFuncR
113 /*! \var GLenum TexGenChunkBase::_sfGenFuncQ
117 /*! \var Vec4f TexGenChunkBase::_sfGenFuncSPlane
121 /*! \var Vec4f TexGenChunkBase::_sfGenFuncTPlane
125 /*! \var Vec4f TexGenChunkBase::_sfGenFuncRPlane
129 /*! \var Vec4f TexGenChunkBase::_sfGenFuncQPlane
133 /*! \var Node * TexGenChunkBase::_sfSBeacon
137 /*! \var Node * TexGenChunkBase::_sfTBeacon
141 /*! \var Node * TexGenChunkBase::_sfRBeacon
145 /*! \var Node * TexGenChunkBase::_sfQBeacon
149 /*! \var Matrix TexGenChunkBase::_sfEyeModelViewMatrix
153 /*! \var UInt32 TexGenChunkBase::_sfEyeModelViewMode
158 /***************************************************************************\
159 * FieldType/FieldTrait Instantiation *
160 \***************************************************************************/
162 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
163 PointerType FieldTraits<TexGenChunk *, nsOSG>::_type(
164 "TexGenChunkPtr",
165 "StateChunkPtr",
166 TexGenChunk::getClassType(),
167 nsOSG);
168 #endif
170 OSG_FIELDTRAITS_GETTYPE_NS(TexGenChunk *, nsOSG)
172 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField,
173 TexGenChunk *,
174 nsOSG)
176 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField,
177 TexGenChunk *,
178 nsOSG)
180 /***************************************************************************\
181 * Field Description *
182 \***************************************************************************/
184 void TexGenChunkBase::classDescInserter(TypeObject &oType)
186 FieldDescriptionBase *pDesc = NULL;
189 pDesc = new SFGLenum::Description(
190 SFGLenum::getClassType(),
191 "genFuncS",
193 GenFuncSFieldId, GenFuncSFieldMask,
194 false,
195 (Field::SFDefaultFlags | Field::FStdAccess),
196 static_cast<FieldEditMethodSig>(&TexGenChunk::editHandleGenFuncS),
197 static_cast<FieldGetMethodSig >(&TexGenChunk::getHandleGenFuncS));
199 oType.addInitialDesc(pDesc);
201 pDesc = new SFGLenum::Description(
202 SFGLenum::getClassType(),
203 "genFuncT",
205 GenFuncTFieldId, GenFuncTFieldMask,
206 false,
207 (Field::SFDefaultFlags | Field::FStdAccess),
208 static_cast<FieldEditMethodSig>(&TexGenChunk::editHandleGenFuncT),
209 static_cast<FieldGetMethodSig >(&TexGenChunk::getHandleGenFuncT));
211 oType.addInitialDesc(pDesc);
213 pDesc = new SFGLenum::Description(
214 SFGLenum::getClassType(),
215 "genFuncR",
217 GenFuncRFieldId, GenFuncRFieldMask,
218 false,
219 (Field::SFDefaultFlags | Field::FStdAccess),
220 static_cast<FieldEditMethodSig>(&TexGenChunk::editHandleGenFuncR),
221 static_cast<FieldGetMethodSig >(&TexGenChunk::getHandleGenFuncR));
223 oType.addInitialDesc(pDesc);
225 pDesc = new SFGLenum::Description(
226 SFGLenum::getClassType(),
227 "genFuncQ",
229 GenFuncQFieldId, GenFuncQFieldMask,
230 false,
231 (Field::SFDefaultFlags | Field::FStdAccess),
232 static_cast<FieldEditMethodSig>(&TexGenChunk::editHandleGenFuncQ),
233 static_cast<FieldGetMethodSig >(&TexGenChunk::getHandleGenFuncQ));
235 oType.addInitialDesc(pDesc);
237 pDesc = new SFVec4f::Description(
238 SFVec4f::getClassType(),
239 "genFuncSPlane",
241 GenFuncSPlaneFieldId, GenFuncSPlaneFieldMask,
242 false,
243 (Field::SFDefaultFlags | Field::FStdAccess),
244 static_cast<FieldEditMethodSig>(&TexGenChunk::editHandleGenFuncSPlane),
245 static_cast<FieldGetMethodSig >(&TexGenChunk::getHandleGenFuncSPlane));
247 oType.addInitialDesc(pDesc);
249 pDesc = new SFVec4f::Description(
250 SFVec4f::getClassType(),
251 "genFuncTPlane",
253 GenFuncTPlaneFieldId, GenFuncTPlaneFieldMask,
254 false,
255 (Field::SFDefaultFlags | Field::FStdAccess),
256 static_cast<FieldEditMethodSig>(&TexGenChunk::editHandleGenFuncTPlane),
257 static_cast<FieldGetMethodSig >(&TexGenChunk::getHandleGenFuncTPlane));
259 oType.addInitialDesc(pDesc);
261 pDesc = new SFVec4f::Description(
262 SFVec4f::getClassType(),
263 "genFuncRPlane",
265 GenFuncRPlaneFieldId, GenFuncRPlaneFieldMask,
266 false,
267 (Field::SFDefaultFlags | Field::FStdAccess),
268 static_cast<FieldEditMethodSig>(&TexGenChunk::editHandleGenFuncRPlane),
269 static_cast<FieldGetMethodSig >(&TexGenChunk::getHandleGenFuncRPlane));
271 oType.addInitialDesc(pDesc);
273 pDesc = new SFVec4f::Description(
274 SFVec4f::getClassType(),
275 "genFuncQPlane",
277 GenFuncQPlaneFieldId, GenFuncQPlaneFieldMask,
278 false,
279 (Field::SFDefaultFlags | Field::FStdAccess),
280 static_cast<FieldEditMethodSig>(&TexGenChunk::editHandleGenFuncQPlane),
281 static_cast<FieldGetMethodSig >(&TexGenChunk::getHandleGenFuncQPlane));
283 oType.addInitialDesc(pDesc);
285 pDesc = new SFWeakNodePtr::Description(
286 SFWeakNodePtr::getClassType(),
287 "sBeacon",
289 SBeaconFieldId, SBeaconFieldMask,
290 false,
291 (Field::SFDefaultFlags | Field::FStdAccess),
292 static_cast<FieldEditMethodSig>(&TexGenChunk::editHandleSBeacon),
293 static_cast<FieldGetMethodSig >(&TexGenChunk::getHandleSBeacon));
295 oType.addInitialDesc(pDesc);
297 pDesc = new SFWeakNodePtr::Description(
298 SFWeakNodePtr::getClassType(),
299 "tBeacon",
301 TBeaconFieldId, TBeaconFieldMask,
302 false,
303 (Field::SFDefaultFlags | Field::FStdAccess),
304 static_cast<FieldEditMethodSig>(&TexGenChunk::editHandleTBeacon),
305 static_cast<FieldGetMethodSig >(&TexGenChunk::getHandleTBeacon));
307 oType.addInitialDesc(pDesc);
309 pDesc = new SFWeakNodePtr::Description(
310 SFWeakNodePtr::getClassType(),
311 "rBeacon",
313 RBeaconFieldId, RBeaconFieldMask,
314 false,
315 (Field::SFDefaultFlags | Field::FStdAccess),
316 static_cast<FieldEditMethodSig>(&TexGenChunk::editHandleRBeacon),
317 static_cast<FieldGetMethodSig >(&TexGenChunk::getHandleRBeacon));
319 oType.addInitialDesc(pDesc);
321 pDesc = new SFWeakNodePtr::Description(
322 SFWeakNodePtr::getClassType(),
323 "qBeacon",
325 QBeaconFieldId, QBeaconFieldMask,
326 false,
327 (Field::SFDefaultFlags | Field::FStdAccess),
328 static_cast<FieldEditMethodSig>(&TexGenChunk::editHandleQBeacon),
329 static_cast<FieldGetMethodSig >(&TexGenChunk::getHandleQBeacon));
331 oType.addInitialDesc(pDesc);
333 pDesc = new SFMatrix::Description(
334 SFMatrix::getClassType(),
335 "eyeModelViewMatrix",
337 EyeModelViewMatrixFieldId, EyeModelViewMatrixFieldMask,
338 false,
339 (Field::SFDefaultFlags | Field::FStdAccess),
340 static_cast<FieldEditMethodSig>(&TexGenChunk::editHandleEyeModelViewMatrix),
341 static_cast<FieldGetMethodSig >(&TexGenChunk::getHandleEyeModelViewMatrix));
343 oType.addInitialDesc(pDesc);
345 pDesc = new SFUInt32::Description(
346 SFUInt32::getClassType(),
347 "eyeModelViewMode",
349 EyeModelViewModeFieldId, EyeModelViewModeFieldMask,
350 false,
351 (Field::SFDefaultFlags | Field::FStdAccess),
352 static_cast<FieldEditMethodSig>(&TexGenChunk::editHandleEyeModelViewMode),
353 static_cast<FieldGetMethodSig >(&TexGenChunk::getHandleEyeModelViewMode));
355 oType.addInitialDesc(pDesc);
359 TexGenChunkBase::TypeObject TexGenChunkBase::_type(
360 TexGenChunkBase::getClassname(),
361 Inherited::getClassname(),
362 "NULL",
363 nsOSG, //Namespace
364 reinterpret_cast<PrototypeCreateF>(&TexGenChunkBase::createEmptyLocal),
365 reinterpret_cast<InitContainerF>(&TexGenChunk::initMethod),
366 reinterpret_cast<ExitContainerF>(&TexGenChunk::exitMethod),
367 reinterpret_cast<InitalInsertDescFunc>(
368 reinterpret_cast<void *>(&TexGenChunk::classDescInserter)),
369 false,
371 "<?xml version=\"1.0\"?>\n"
372 "\n"
373 "<FieldContainer\n"
374 " name=\"TexGenChunk\"\n"
375 " parent=\"StateChunk\"\n"
376 " library=\"State\"\n"
377 " pointerfieldtypes=\"both\"\n"
378 " structure=\"concrete\"\n"
379 " systemcomponent=\"true\"\n"
380 " parentsystemcomponent=\"true\"\n"
381 " decoratable=\"false\"\n"
382 " useLocalIncludes=\"false\"\n"
383 " docGroupBase=\"GrpStateOpenGL\"\n"
384 " >\n"
385 " See \\ref PageSystemTexGenChunk for a description.\n"
386 "\n"
387 " Chunk for texture coordinate generation functions.\n"
388 "\n"
389 " This chunk wraps glTexGen(). All 4 coordinates are wrapped in a single chunk\n"
390 " by using separate gen funcs for each variable (OSG::TexGenChunk::_sfGenFuncS, \n"
391 " OSG::TexGenChunk::_sfGenFuncT, OSG::TexGenChunk::_sfGenFuncR, \n"
392 " OSG::TexGenChunk::_sfGenFuncQ). The default for each of these is GL_NONE, or\n"
393 " off. The optional plane parameters are stored in\n"
394 " OSG::TexGenChunk::_sfGenFuncSPlane, \n"
395 " OSG::TexGenChunk::_sfGenFuncTPlane, OSG::TexGenChunk::_sfGenFuncRPlane and\n"
396 " OSG::TexGenChunk::_sfGenFuncQPlane.\n"
397 " <Field\n"
398 "\t name=\"genFuncS\"\n"
399 "\t type=\"GLenum\"\n"
400 "\t cardinality=\"single\"\n"
401 "\t visibility=\"external\"\n"
402 "\t defaultValue=\"GL_NONE\"\n"
403 "\t defaultHeader=\"&quot;OSGGL.h&quot;\"\n"
404 "\t access=\"public\"\n"
405 "\t >\n"
406 " </Field>\n"
407 " <Field\n"
408 "\t name=\"genFuncT\"\n"
409 "\t type=\"GLenum\"\n"
410 "\t cardinality=\"single\"\n"
411 "\t visibility=\"external\"\n"
412 "\t defaultValue=\"GL_NONE\"\n"
413 "\t defaultHeader=\"&quot;OSGGL.h&quot;\"\n"
414 "\t access=\"public\"\n"
415 "\t >\n"
416 " </Field>\n"
417 " <Field\n"
418 "\t name=\"genFuncR\"\n"
419 "\t type=\"GLenum\"\n"
420 "\t cardinality=\"single\"\n"
421 "\t visibility=\"external\"\n"
422 "\t defaultValue=\"GL_NONE\"\n"
423 "\t defaultHeader=\"&quot;OSGGL.h&quot;\"\n"
424 "\t access=\"public\"\n"
425 "\t >\n"
426 " </Field>\n"
427 " <Field\n"
428 "\t name=\"genFuncQ\"\n"
429 "\t type=\"GLenum\"\n"
430 "\t cardinality=\"single\"\n"
431 "\t visibility=\"external\"\n"
432 "\t defaultValue=\"GL_NONE\"\n"
433 "\t defaultHeader=\"&quot;OSGGL.h&quot;\"\n"
434 "\t access=\"public\"\n"
435 "\t >\n"
436 " </Field>\n"
437 " <Field\n"
438 "\t name=\"genFuncSPlane\"\n"
439 "\t type=\"Vec4f\"\n"
440 "\t cardinality=\"single\"\n"
441 "\t visibility=\"external\"\n"
442 "\t defaultValue=\"1,0,0,0\"\n"
443 "\t access=\"public\"\n"
444 "\t >\n"
445 " </Field>\n"
446 " <Field\n"
447 "\t name=\"genFuncTPlane\"\n"
448 "\t type=\"Vec4f\"\n"
449 "\t cardinality=\"single\"\n"
450 "\t visibility=\"external\"\n"
451 "\t defaultValue=\"0,1,0,0\"\n"
452 "\t access=\"public\"\n"
453 "\t >\n"
454 " </Field>\n"
455 " <Field\n"
456 "\t name=\"genFuncRPlane\"\n"
457 "\t type=\"Vec4f\"\n"
458 "\t cardinality=\"single\"\n"
459 "\t visibility=\"external\"\n"
460 "\t defaultValue=\"0,0,1,0\"\n"
461 "\t access=\"public\"\n"
462 "\t >\n"
463 " </Field>\n"
464 " <Field\n"
465 "\t name=\"genFuncQPlane\"\n"
466 "\t type=\"Vec4f\"\n"
467 "\t cardinality=\"single\"\n"
468 "\t visibility=\"external\"\n"
469 "\t defaultValue=\"0,0,0,1\"\n"
470 "\t access=\"public\"\n"
471 "\t >\n"
472 " </Field>\n"
473 " <Field\n"
474 "\t name=\"sBeacon\"\n"
475 "\t type=\"Node\"\n"
476 " category=\"weakpointer\"\n"
477 "\t cardinality=\"single\"\n"
478 "\t visibility=\"external\"\n"
479 "\t access=\"public\"\n"
480 "\t >\n"
481 " </Field>\n"
482 " <Field\n"
483 "\t name=\"tBeacon\"\n"
484 "\t type=\"Node\"\n"
485 " category=\"weakpointer\"\n"
486 "\t cardinality=\"single\"\n"
487 "\t visibility=\"external\"\n"
488 "\t access=\"public\"\n"
489 "\t >\n"
490 " </Field>\n"
491 " <Field\n"
492 "\t name=\"rBeacon\"\n"
493 "\t type=\"Node\"\n"
494 " category=\"weakpointer\"\n"
495 "\t cardinality=\"single\"\n"
496 "\t visibility=\"external\"\n"
497 "\t access=\"public\"\n"
498 "\t >\n"
499 " </Field>\n"
500 " <Field\n"
501 "\t name=\"qBeacon\"\n"
502 "\t type=\"Node\"\n"
503 " category=\"weakpointer\"\n"
504 "\t cardinality=\"single\"\n"
505 "\t visibility=\"external\"\n"
506 "\t access=\"public\"\n"
507 "\t >\n"
508 " </Field>\n"
509 "\n"
510 " <Field\n"
511 "\t name=\"eyeModelViewMatrix\"\n"
512 "\t type=\"Matrix\"\n"
513 "\t cardinality=\"single\"\n"
514 "\t visibility=\"external\"\n"
515 "\t access=\"public\"\n"
516 "\t >\n"
517 " </Field>\n"
518 " <Field\n"
519 "\t name=\"eyeModelViewMode\"\n"
520 "\t type=\"UInt32\"\n"
521 "\t cardinality=\"single\"\n"
522 "\t visibility=\"external\"\n"
523 "\t access=\"public\"\n"
524 " defaultValue=\"0x0001\"\n"
525 "\t >\n"
526 " </Field>\n"
527 "\n"
528 "</FieldContainer>\n",
529 "See \\ref PageSystemTexGenChunk for a description.\n"
530 "\n"
531 "Chunk for texture coordinate generation functions.\n"
532 "\n"
533 "This chunk wraps glTexGen(). All 4 coordinates are wrapped in a single chunk\n"
534 "by using separate gen funcs for each variable (OSG::TexGenChunk::_sfGenFuncS, \n"
535 "OSG::TexGenChunk::_sfGenFuncT, OSG::TexGenChunk::_sfGenFuncR, \n"
536 "OSG::TexGenChunk::_sfGenFuncQ). The default for each of these is GL_NONE, or\n"
537 "off. The optional plane parameters are stored in\n"
538 "OSG::TexGenChunk::_sfGenFuncSPlane, \n"
539 "OSG::TexGenChunk::_sfGenFuncTPlane, OSG::TexGenChunk::_sfGenFuncRPlane and\n"
540 "OSG::TexGenChunk::_sfGenFuncQPlane.\n"
543 /*------------------------------ get -----------------------------------*/
545 FieldContainerType &TexGenChunkBase::getType(void)
547 return _type;
550 const FieldContainerType &TexGenChunkBase::getType(void) const
552 return _type;
555 UInt32 TexGenChunkBase::getContainerSize(void) const
557 return sizeof(TexGenChunk);
560 /*------------------------- decorator get ------------------------------*/
563 SFGLenum *TexGenChunkBase::editSFGenFuncS(void)
565 editSField(GenFuncSFieldMask);
567 return &_sfGenFuncS;
570 const SFGLenum *TexGenChunkBase::getSFGenFuncS(void) const
572 return &_sfGenFuncS;
576 SFGLenum *TexGenChunkBase::editSFGenFuncT(void)
578 editSField(GenFuncTFieldMask);
580 return &_sfGenFuncT;
583 const SFGLenum *TexGenChunkBase::getSFGenFuncT(void) const
585 return &_sfGenFuncT;
589 SFGLenum *TexGenChunkBase::editSFGenFuncR(void)
591 editSField(GenFuncRFieldMask);
593 return &_sfGenFuncR;
596 const SFGLenum *TexGenChunkBase::getSFGenFuncR(void) const
598 return &_sfGenFuncR;
602 SFGLenum *TexGenChunkBase::editSFGenFuncQ(void)
604 editSField(GenFuncQFieldMask);
606 return &_sfGenFuncQ;
609 const SFGLenum *TexGenChunkBase::getSFGenFuncQ(void) const
611 return &_sfGenFuncQ;
615 SFVec4f *TexGenChunkBase::editSFGenFuncSPlane(void)
617 editSField(GenFuncSPlaneFieldMask);
619 return &_sfGenFuncSPlane;
622 const SFVec4f *TexGenChunkBase::getSFGenFuncSPlane(void) const
624 return &_sfGenFuncSPlane;
628 SFVec4f *TexGenChunkBase::editSFGenFuncTPlane(void)
630 editSField(GenFuncTPlaneFieldMask);
632 return &_sfGenFuncTPlane;
635 const SFVec4f *TexGenChunkBase::getSFGenFuncTPlane(void) const
637 return &_sfGenFuncTPlane;
641 SFVec4f *TexGenChunkBase::editSFGenFuncRPlane(void)
643 editSField(GenFuncRPlaneFieldMask);
645 return &_sfGenFuncRPlane;
648 const SFVec4f *TexGenChunkBase::getSFGenFuncRPlane(void) const
650 return &_sfGenFuncRPlane;
654 SFVec4f *TexGenChunkBase::editSFGenFuncQPlane(void)
656 editSField(GenFuncQPlaneFieldMask);
658 return &_sfGenFuncQPlane;
661 const SFVec4f *TexGenChunkBase::getSFGenFuncQPlane(void) const
663 return &_sfGenFuncQPlane;
667 //! Get the TexGenChunk::_sfSBeacon field.
668 const SFWeakNodePtr *TexGenChunkBase::getSFSBeacon(void) const
670 return &_sfSBeacon;
673 SFWeakNodePtr *TexGenChunkBase::editSFSBeacon (void)
675 editSField(SBeaconFieldMask);
677 return &_sfSBeacon;
680 //! Get the value of the TexGenChunk::_sfSBeacon field.
681 Node * TexGenChunkBase::getSBeacon(void) const
683 return _sfSBeacon.getValue();
686 //! Set the value of the TexGenChunk::_sfSBeacon field.
687 void TexGenChunkBase::setSBeacon(Node * const value)
689 editSField(SBeaconFieldMask);
691 _sfSBeacon.setValue(value);
695 //! Get the TexGenChunk::_sfTBeacon field.
696 const SFWeakNodePtr *TexGenChunkBase::getSFTBeacon(void) const
698 return &_sfTBeacon;
701 SFWeakNodePtr *TexGenChunkBase::editSFTBeacon (void)
703 editSField(TBeaconFieldMask);
705 return &_sfTBeacon;
708 //! Get the value of the TexGenChunk::_sfTBeacon field.
709 Node * TexGenChunkBase::getTBeacon(void) const
711 return _sfTBeacon.getValue();
714 //! Set the value of the TexGenChunk::_sfTBeacon field.
715 void TexGenChunkBase::setTBeacon(Node * const value)
717 editSField(TBeaconFieldMask);
719 _sfTBeacon.setValue(value);
723 //! Get the TexGenChunk::_sfRBeacon field.
724 const SFWeakNodePtr *TexGenChunkBase::getSFRBeacon(void) const
726 return &_sfRBeacon;
729 SFWeakNodePtr *TexGenChunkBase::editSFRBeacon (void)
731 editSField(RBeaconFieldMask);
733 return &_sfRBeacon;
736 //! Get the value of the TexGenChunk::_sfRBeacon field.
737 Node * TexGenChunkBase::getRBeacon(void) const
739 return _sfRBeacon.getValue();
742 //! Set the value of the TexGenChunk::_sfRBeacon field.
743 void TexGenChunkBase::setRBeacon(Node * const value)
745 editSField(RBeaconFieldMask);
747 _sfRBeacon.setValue(value);
751 //! Get the TexGenChunk::_sfQBeacon field.
752 const SFWeakNodePtr *TexGenChunkBase::getSFQBeacon(void) const
754 return &_sfQBeacon;
757 SFWeakNodePtr *TexGenChunkBase::editSFQBeacon (void)
759 editSField(QBeaconFieldMask);
761 return &_sfQBeacon;
764 //! Get the value of the TexGenChunk::_sfQBeacon field.
765 Node * TexGenChunkBase::getQBeacon(void) const
767 return _sfQBeacon.getValue();
770 //! Set the value of the TexGenChunk::_sfQBeacon field.
771 void TexGenChunkBase::setQBeacon(Node * const value)
773 editSField(QBeaconFieldMask);
775 _sfQBeacon.setValue(value);
779 SFMatrix *TexGenChunkBase::editSFEyeModelViewMatrix(void)
781 editSField(EyeModelViewMatrixFieldMask);
783 return &_sfEyeModelViewMatrix;
786 const SFMatrix *TexGenChunkBase::getSFEyeModelViewMatrix(void) const
788 return &_sfEyeModelViewMatrix;
792 SFUInt32 *TexGenChunkBase::editSFEyeModelViewMode(void)
794 editSField(EyeModelViewModeFieldMask);
796 return &_sfEyeModelViewMode;
799 const SFUInt32 *TexGenChunkBase::getSFEyeModelViewMode(void) const
801 return &_sfEyeModelViewMode;
809 /*------------------------------ access -----------------------------------*/
811 SizeT TexGenChunkBase::getBinSize(ConstFieldMaskArg whichField)
813 SizeT returnValue = Inherited::getBinSize(whichField);
815 if(FieldBits::NoField != (GenFuncSFieldMask & whichField))
817 returnValue += _sfGenFuncS.getBinSize();
819 if(FieldBits::NoField != (GenFuncTFieldMask & whichField))
821 returnValue += _sfGenFuncT.getBinSize();
823 if(FieldBits::NoField != (GenFuncRFieldMask & whichField))
825 returnValue += _sfGenFuncR.getBinSize();
827 if(FieldBits::NoField != (GenFuncQFieldMask & whichField))
829 returnValue += _sfGenFuncQ.getBinSize();
831 if(FieldBits::NoField != (GenFuncSPlaneFieldMask & whichField))
833 returnValue += _sfGenFuncSPlane.getBinSize();
835 if(FieldBits::NoField != (GenFuncTPlaneFieldMask & whichField))
837 returnValue += _sfGenFuncTPlane.getBinSize();
839 if(FieldBits::NoField != (GenFuncRPlaneFieldMask & whichField))
841 returnValue += _sfGenFuncRPlane.getBinSize();
843 if(FieldBits::NoField != (GenFuncQPlaneFieldMask & whichField))
845 returnValue += _sfGenFuncQPlane.getBinSize();
847 if(FieldBits::NoField != (SBeaconFieldMask & whichField))
849 returnValue += _sfSBeacon.getBinSize();
851 if(FieldBits::NoField != (TBeaconFieldMask & whichField))
853 returnValue += _sfTBeacon.getBinSize();
855 if(FieldBits::NoField != (RBeaconFieldMask & whichField))
857 returnValue += _sfRBeacon.getBinSize();
859 if(FieldBits::NoField != (QBeaconFieldMask & whichField))
861 returnValue += _sfQBeacon.getBinSize();
863 if(FieldBits::NoField != (EyeModelViewMatrixFieldMask & whichField))
865 returnValue += _sfEyeModelViewMatrix.getBinSize();
867 if(FieldBits::NoField != (EyeModelViewModeFieldMask & whichField))
869 returnValue += _sfEyeModelViewMode.getBinSize();
872 return returnValue;
875 void TexGenChunkBase::copyToBin(BinaryDataHandler &pMem,
876 ConstFieldMaskArg whichField)
878 Inherited::copyToBin(pMem, whichField);
880 if(FieldBits::NoField != (GenFuncSFieldMask & whichField))
882 _sfGenFuncS.copyToBin(pMem);
884 if(FieldBits::NoField != (GenFuncTFieldMask & whichField))
886 _sfGenFuncT.copyToBin(pMem);
888 if(FieldBits::NoField != (GenFuncRFieldMask & whichField))
890 _sfGenFuncR.copyToBin(pMem);
892 if(FieldBits::NoField != (GenFuncQFieldMask & whichField))
894 _sfGenFuncQ.copyToBin(pMem);
896 if(FieldBits::NoField != (GenFuncSPlaneFieldMask & whichField))
898 _sfGenFuncSPlane.copyToBin(pMem);
900 if(FieldBits::NoField != (GenFuncTPlaneFieldMask & whichField))
902 _sfGenFuncTPlane.copyToBin(pMem);
904 if(FieldBits::NoField != (GenFuncRPlaneFieldMask & whichField))
906 _sfGenFuncRPlane.copyToBin(pMem);
908 if(FieldBits::NoField != (GenFuncQPlaneFieldMask & whichField))
910 _sfGenFuncQPlane.copyToBin(pMem);
912 if(FieldBits::NoField != (SBeaconFieldMask & whichField))
914 _sfSBeacon.copyToBin(pMem);
916 if(FieldBits::NoField != (TBeaconFieldMask & whichField))
918 _sfTBeacon.copyToBin(pMem);
920 if(FieldBits::NoField != (RBeaconFieldMask & whichField))
922 _sfRBeacon.copyToBin(pMem);
924 if(FieldBits::NoField != (QBeaconFieldMask & whichField))
926 _sfQBeacon.copyToBin(pMem);
928 if(FieldBits::NoField != (EyeModelViewMatrixFieldMask & whichField))
930 _sfEyeModelViewMatrix.copyToBin(pMem);
932 if(FieldBits::NoField != (EyeModelViewModeFieldMask & whichField))
934 _sfEyeModelViewMode.copyToBin(pMem);
938 void TexGenChunkBase::copyFromBin(BinaryDataHandler &pMem,
939 ConstFieldMaskArg whichField)
941 Inherited::copyFromBin(pMem, whichField);
943 if(FieldBits::NoField != (GenFuncSFieldMask & whichField))
945 editSField(GenFuncSFieldMask);
946 _sfGenFuncS.copyFromBin(pMem);
948 if(FieldBits::NoField != (GenFuncTFieldMask & whichField))
950 editSField(GenFuncTFieldMask);
951 _sfGenFuncT.copyFromBin(pMem);
953 if(FieldBits::NoField != (GenFuncRFieldMask & whichField))
955 editSField(GenFuncRFieldMask);
956 _sfGenFuncR.copyFromBin(pMem);
958 if(FieldBits::NoField != (GenFuncQFieldMask & whichField))
960 editSField(GenFuncQFieldMask);
961 _sfGenFuncQ.copyFromBin(pMem);
963 if(FieldBits::NoField != (GenFuncSPlaneFieldMask & whichField))
965 editSField(GenFuncSPlaneFieldMask);
966 _sfGenFuncSPlane.copyFromBin(pMem);
968 if(FieldBits::NoField != (GenFuncTPlaneFieldMask & whichField))
970 editSField(GenFuncTPlaneFieldMask);
971 _sfGenFuncTPlane.copyFromBin(pMem);
973 if(FieldBits::NoField != (GenFuncRPlaneFieldMask & whichField))
975 editSField(GenFuncRPlaneFieldMask);
976 _sfGenFuncRPlane.copyFromBin(pMem);
978 if(FieldBits::NoField != (GenFuncQPlaneFieldMask & whichField))
980 editSField(GenFuncQPlaneFieldMask);
981 _sfGenFuncQPlane.copyFromBin(pMem);
983 if(FieldBits::NoField != (SBeaconFieldMask & whichField))
985 editSField(SBeaconFieldMask);
986 _sfSBeacon.copyFromBin(pMem);
988 if(FieldBits::NoField != (TBeaconFieldMask & whichField))
990 editSField(TBeaconFieldMask);
991 _sfTBeacon.copyFromBin(pMem);
993 if(FieldBits::NoField != (RBeaconFieldMask & whichField))
995 editSField(RBeaconFieldMask);
996 _sfRBeacon.copyFromBin(pMem);
998 if(FieldBits::NoField != (QBeaconFieldMask & whichField))
1000 editSField(QBeaconFieldMask);
1001 _sfQBeacon.copyFromBin(pMem);
1003 if(FieldBits::NoField != (EyeModelViewMatrixFieldMask & whichField))
1005 editSField(EyeModelViewMatrixFieldMask);
1006 _sfEyeModelViewMatrix.copyFromBin(pMem);
1008 if(FieldBits::NoField != (EyeModelViewModeFieldMask & whichField))
1010 editSField(EyeModelViewModeFieldMask);
1011 _sfEyeModelViewMode.copyFromBin(pMem);
1015 //! create a new instance of the class
1016 TexGenChunkTransitPtr TexGenChunkBase::createLocal(BitVector bFlags)
1018 TexGenChunkTransitPtr fc;
1020 if(getClassType().getPrototype() != NULL)
1022 FieldContainerTransitPtr tmpPtr =
1023 getClassType().getPrototype()-> shallowCopyLocal(bFlags);
1025 fc = dynamic_pointer_cast<TexGenChunk>(tmpPtr);
1028 return fc;
1031 //! create a new instance of the class, copy the container flags
1032 TexGenChunkTransitPtr TexGenChunkBase::createDependent(BitVector bFlags)
1034 TexGenChunkTransitPtr fc;
1036 if(getClassType().getPrototype() != NULL)
1038 FieldContainerTransitPtr tmpPtr =
1039 getClassType().getPrototype()-> shallowCopyDependent(bFlags);
1041 fc = dynamic_pointer_cast<TexGenChunk>(tmpPtr);
1044 return fc;
1047 //! create a new instance of the class
1048 TexGenChunkTransitPtr TexGenChunkBase::create(void)
1050 TexGenChunkTransitPtr fc;
1052 if(getClassType().getPrototype() != NULL)
1054 FieldContainerTransitPtr tmpPtr =
1055 getClassType().getPrototype()-> shallowCopy();
1057 fc = dynamic_pointer_cast<TexGenChunk>(tmpPtr);
1060 return fc;
1063 TexGenChunk *TexGenChunkBase::createEmptyLocal(BitVector bFlags)
1065 TexGenChunk *returnValue;
1067 newPtr<TexGenChunk>(returnValue, bFlags);
1069 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
1071 return returnValue;
1074 //! create an empty new instance of the class, do not copy the prototype
1075 TexGenChunk *TexGenChunkBase::createEmpty(void)
1077 TexGenChunk *returnValue;
1079 newPtr<TexGenChunk>(returnValue, Thread::getCurrentLocalFlags());
1081 returnValue->_pFieldFlags->_bNamespaceMask &=
1082 ~Thread::getCurrentLocalFlags();
1084 return returnValue;
1088 FieldContainerTransitPtr TexGenChunkBase::shallowCopyLocal(
1089 BitVector bFlags) const
1091 TexGenChunk *tmpPtr;
1093 newPtr(tmpPtr, dynamic_cast<const TexGenChunk *>(this), bFlags);
1095 FieldContainerTransitPtr returnValue(tmpPtr);
1097 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags;
1099 return returnValue;
1102 FieldContainerTransitPtr TexGenChunkBase::shallowCopyDependent(
1103 BitVector bFlags) const
1105 TexGenChunk *tmpPtr;
1107 newPtr(tmpPtr, dynamic_cast<const TexGenChunk *>(this), ~bFlags);
1109 FieldContainerTransitPtr returnValue(tmpPtr);
1111 tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags;
1113 return returnValue;
1116 FieldContainerTransitPtr TexGenChunkBase::shallowCopy(void) const
1118 TexGenChunk *tmpPtr;
1120 newPtr(tmpPtr,
1121 dynamic_cast<const TexGenChunk *>(this),
1122 Thread::getCurrentLocalFlags());
1124 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags();
1126 FieldContainerTransitPtr returnValue(tmpPtr);
1128 return returnValue;
1134 /*------------------------- constructors ----------------------------------*/
1136 TexGenChunkBase::TexGenChunkBase(void) :
1137 Inherited(),
1138 _sfGenFuncS (GLenum(GL_NONE)),
1139 _sfGenFuncT (GLenum(GL_NONE)),
1140 _sfGenFuncR (GLenum(GL_NONE)),
1141 _sfGenFuncQ (GLenum(GL_NONE)),
1142 _sfGenFuncSPlane (Vec4f(1,0,0,0)),
1143 _sfGenFuncTPlane (Vec4f(0,1,0,0)),
1144 _sfGenFuncRPlane (Vec4f(0,0,1,0)),
1145 _sfGenFuncQPlane (Vec4f(0,0,0,1)),
1146 _sfSBeacon (NULL),
1147 _sfTBeacon (NULL),
1148 _sfRBeacon (NULL),
1149 _sfQBeacon (NULL),
1150 _sfEyeModelViewMatrix (),
1151 _sfEyeModelViewMode (UInt32(0x0001))
1155 TexGenChunkBase::TexGenChunkBase(const TexGenChunkBase &source) :
1156 Inherited(source),
1157 _sfGenFuncS (source._sfGenFuncS ),
1158 _sfGenFuncT (source._sfGenFuncT ),
1159 _sfGenFuncR (source._sfGenFuncR ),
1160 _sfGenFuncQ (source._sfGenFuncQ ),
1161 _sfGenFuncSPlane (source._sfGenFuncSPlane ),
1162 _sfGenFuncTPlane (source._sfGenFuncTPlane ),
1163 _sfGenFuncRPlane (source._sfGenFuncRPlane ),
1164 _sfGenFuncQPlane (source._sfGenFuncQPlane ),
1165 _sfSBeacon (NULL),
1166 _sfTBeacon (NULL),
1167 _sfRBeacon (NULL),
1168 _sfQBeacon (NULL),
1169 _sfEyeModelViewMatrix (source._sfEyeModelViewMatrix ),
1170 _sfEyeModelViewMode (source._sfEyeModelViewMode )
1175 /*-------------------------- destructors ----------------------------------*/
1177 TexGenChunkBase::~TexGenChunkBase(void)
1181 void TexGenChunkBase::onCreate(const TexGenChunk *source)
1183 Inherited::onCreate(source);
1185 if(source != NULL)
1187 TexGenChunk *pThis = static_cast<TexGenChunk *>(this);
1189 pThis->setSBeacon(source->getSBeacon());
1191 pThis->setTBeacon(source->getTBeacon());
1193 pThis->setRBeacon(source->getRBeacon());
1195 pThis->setQBeacon(source->getQBeacon());
1199 GetFieldHandlePtr TexGenChunkBase::getHandleGenFuncS (void) const
1201 SFGLenum::GetHandlePtr returnValue(
1202 new SFGLenum::GetHandle(
1203 &_sfGenFuncS,
1204 this->getType().getFieldDesc(GenFuncSFieldId),
1205 const_cast<TexGenChunkBase *>(this)));
1207 return returnValue;
1210 EditFieldHandlePtr TexGenChunkBase::editHandleGenFuncS (void)
1212 SFGLenum::EditHandlePtr returnValue(
1213 new SFGLenum::EditHandle(
1214 &_sfGenFuncS,
1215 this->getType().getFieldDesc(GenFuncSFieldId),
1216 this));
1219 editSField(GenFuncSFieldMask);
1221 return returnValue;
1224 GetFieldHandlePtr TexGenChunkBase::getHandleGenFuncT (void) const
1226 SFGLenum::GetHandlePtr returnValue(
1227 new SFGLenum::GetHandle(
1228 &_sfGenFuncT,
1229 this->getType().getFieldDesc(GenFuncTFieldId),
1230 const_cast<TexGenChunkBase *>(this)));
1232 return returnValue;
1235 EditFieldHandlePtr TexGenChunkBase::editHandleGenFuncT (void)
1237 SFGLenum::EditHandlePtr returnValue(
1238 new SFGLenum::EditHandle(
1239 &_sfGenFuncT,
1240 this->getType().getFieldDesc(GenFuncTFieldId),
1241 this));
1244 editSField(GenFuncTFieldMask);
1246 return returnValue;
1249 GetFieldHandlePtr TexGenChunkBase::getHandleGenFuncR (void) const
1251 SFGLenum::GetHandlePtr returnValue(
1252 new SFGLenum::GetHandle(
1253 &_sfGenFuncR,
1254 this->getType().getFieldDesc(GenFuncRFieldId),
1255 const_cast<TexGenChunkBase *>(this)));
1257 return returnValue;
1260 EditFieldHandlePtr TexGenChunkBase::editHandleGenFuncR (void)
1262 SFGLenum::EditHandlePtr returnValue(
1263 new SFGLenum::EditHandle(
1264 &_sfGenFuncR,
1265 this->getType().getFieldDesc(GenFuncRFieldId),
1266 this));
1269 editSField(GenFuncRFieldMask);
1271 return returnValue;
1274 GetFieldHandlePtr TexGenChunkBase::getHandleGenFuncQ (void) const
1276 SFGLenum::GetHandlePtr returnValue(
1277 new SFGLenum::GetHandle(
1278 &_sfGenFuncQ,
1279 this->getType().getFieldDesc(GenFuncQFieldId),
1280 const_cast<TexGenChunkBase *>(this)));
1282 return returnValue;
1285 EditFieldHandlePtr TexGenChunkBase::editHandleGenFuncQ (void)
1287 SFGLenum::EditHandlePtr returnValue(
1288 new SFGLenum::EditHandle(
1289 &_sfGenFuncQ,
1290 this->getType().getFieldDesc(GenFuncQFieldId),
1291 this));
1294 editSField(GenFuncQFieldMask);
1296 return returnValue;
1299 GetFieldHandlePtr TexGenChunkBase::getHandleGenFuncSPlane (void) const
1301 SFVec4f::GetHandlePtr returnValue(
1302 new SFVec4f::GetHandle(
1303 &_sfGenFuncSPlane,
1304 this->getType().getFieldDesc(GenFuncSPlaneFieldId),
1305 const_cast<TexGenChunkBase *>(this)));
1307 return returnValue;
1310 EditFieldHandlePtr TexGenChunkBase::editHandleGenFuncSPlane (void)
1312 SFVec4f::EditHandlePtr returnValue(
1313 new SFVec4f::EditHandle(
1314 &_sfGenFuncSPlane,
1315 this->getType().getFieldDesc(GenFuncSPlaneFieldId),
1316 this));
1319 editSField(GenFuncSPlaneFieldMask);
1321 return returnValue;
1324 GetFieldHandlePtr TexGenChunkBase::getHandleGenFuncTPlane (void) const
1326 SFVec4f::GetHandlePtr returnValue(
1327 new SFVec4f::GetHandle(
1328 &_sfGenFuncTPlane,
1329 this->getType().getFieldDesc(GenFuncTPlaneFieldId),
1330 const_cast<TexGenChunkBase *>(this)));
1332 return returnValue;
1335 EditFieldHandlePtr TexGenChunkBase::editHandleGenFuncTPlane (void)
1337 SFVec4f::EditHandlePtr returnValue(
1338 new SFVec4f::EditHandle(
1339 &_sfGenFuncTPlane,
1340 this->getType().getFieldDesc(GenFuncTPlaneFieldId),
1341 this));
1344 editSField(GenFuncTPlaneFieldMask);
1346 return returnValue;
1349 GetFieldHandlePtr TexGenChunkBase::getHandleGenFuncRPlane (void) const
1351 SFVec4f::GetHandlePtr returnValue(
1352 new SFVec4f::GetHandle(
1353 &_sfGenFuncRPlane,
1354 this->getType().getFieldDesc(GenFuncRPlaneFieldId),
1355 const_cast<TexGenChunkBase *>(this)));
1357 return returnValue;
1360 EditFieldHandlePtr TexGenChunkBase::editHandleGenFuncRPlane (void)
1362 SFVec4f::EditHandlePtr returnValue(
1363 new SFVec4f::EditHandle(
1364 &_sfGenFuncRPlane,
1365 this->getType().getFieldDesc(GenFuncRPlaneFieldId),
1366 this));
1369 editSField(GenFuncRPlaneFieldMask);
1371 return returnValue;
1374 GetFieldHandlePtr TexGenChunkBase::getHandleGenFuncQPlane (void) const
1376 SFVec4f::GetHandlePtr returnValue(
1377 new SFVec4f::GetHandle(
1378 &_sfGenFuncQPlane,
1379 this->getType().getFieldDesc(GenFuncQPlaneFieldId),
1380 const_cast<TexGenChunkBase *>(this)));
1382 return returnValue;
1385 EditFieldHandlePtr TexGenChunkBase::editHandleGenFuncQPlane (void)
1387 SFVec4f::EditHandlePtr returnValue(
1388 new SFVec4f::EditHandle(
1389 &_sfGenFuncQPlane,
1390 this->getType().getFieldDesc(GenFuncQPlaneFieldId),
1391 this));
1394 editSField(GenFuncQPlaneFieldMask);
1396 return returnValue;
1399 GetFieldHandlePtr TexGenChunkBase::getHandleSBeacon (void) const
1401 SFWeakNodePtr::GetHandlePtr returnValue(
1402 new SFWeakNodePtr::GetHandle(
1403 &_sfSBeacon,
1404 this->getType().getFieldDesc(SBeaconFieldId),
1405 const_cast<TexGenChunkBase *>(this)));
1407 return returnValue;
1410 EditFieldHandlePtr TexGenChunkBase::editHandleSBeacon (void)
1412 SFWeakNodePtr::EditHandlePtr returnValue(
1413 new SFWeakNodePtr::EditHandle(
1414 &_sfSBeacon,
1415 this->getType().getFieldDesc(SBeaconFieldId),
1416 this));
1418 returnValue->setSetMethod(
1419 boost::bind(&TexGenChunk::setSBeacon,
1420 static_cast<TexGenChunk *>(this), _1));
1422 editSField(SBeaconFieldMask);
1424 return returnValue;
1427 GetFieldHandlePtr TexGenChunkBase::getHandleTBeacon (void) const
1429 SFWeakNodePtr::GetHandlePtr returnValue(
1430 new SFWeakNodePtr::GetHandle(
1431 &_sfTBeacon,
1432 this->getType().getFieldDesc(TBeaconFieldId),
1433 const_cast<TexGenChunkBase *>(this)));
1435 return returnValue;
1438 EditFieldHandlePtr TexGenChunkBase::editHandleTBeacon (void)
1440 SFWeakNodePtr::EditHandlePtr returnValue(
1441 new SFWeakNodePtr::EditHandle(
1442 &_sfTBeacon,
1443 this->getType().getFieldDesc(TBeaconFieldId),
1444 this));
1446 returnValue->setSetMethod(
1447 boost::bind(&TexGenChunk::setTBeacon,
1448 static_cast<TexGenChunk *>(this), _1));
1450 editSField(TBeaconFieldMask);
1452 return returnValue;
1455 GetFieldHandlePtr TexGenChunkBase::getHandleRBeacon (void) const
1457 SFWeakNodePtr::GetHandlePtr returnValue(
1458 new SFWeakNodePtr::GetHandle(
1459 &_sfRBeacon,
1460 this->getType().getFieldDesc(RBeaconFieldId),
1461 const_cast<TexGenChunkBase *>(this)));
1463 return returnValue;
1466 EditFieldHandlePtr TexGenChunkBase::editHandleRBeacon (void)
1468 SFWeakNodePtr::EditHandlePtr returnValue(
1469 new SFWeakNodePtr::EditHandle(
1470 &_sfRBeacon,
1471 this->getType().getFieldDesc(RBeaconFieldId),
1472 this));
1474 returnValue->setSetMethod(
1475 boost::bind(&TexGenChunk::setRBeacon,
1476 static_cast<TexGenChunk *>(this), _1));
1478 editSField(RBeaconFieldMask);
1480 return returnValue;
1483 GetFieldHandlePtr TexGenChunkBase::getHandleQBeacon (void) const
1485 SFWeakNodePtr::GetHandlePtr returnValue(
1486 new SFWeakNodePtr::GetHandle(
1487 &_sfQBeacon,
1488 this->getType().getFieldDesc(QBeaconFieldId),
1489 const_cast<TexGenChunkBase *>(this)));
1491 return returnValue;
1494 EditFieldHandlePtr TexGenChunkBase::editHandleQBeacon (void)
1496 SFWeakNodePtr::EditHandlePtr returnValue(
1497 new SFWeakNodePtr::EditHandle(
1498 &_sfQBeacon,
1499 this->getType().getFieldDesc(QBeaconFieldId),
1500 this));
1502 returnValue->setSetMethod(
1503 boost::bind(&TexGenChunk::setQBeacon,
1504 static_cast<TexGenChunk *>(this), _1));
1506 editSField(QBeaconFieldMask);
1508 return returnValue;
1511 GetFieldHandlePtr TexGenChunkBase::getHandleEyeModelViewMatrix (void) const
1513 SFMatrix::GetHandlePtr returnValue(
1514 new SFMatrix::GetHandle(
1515 &_sfEyeModelViewMatrix,
1516 this->getType().getFieldDesc(EyeModelViewMatrixFieldId),
1517 const_cast<TexGenChunkBase *>(this)));
1519 return returnValue;
1522 EditFieldHandlePtr TexGenChunkBase::editHandleEyeModelViewMatrix(void)
1524 SFMatrix::EditHandlePtr returnValue(
1525 new SFMatrix::EditHandle(
1526 &_sfEyeModelViewMatrix,
1527 this->getType().getFieldDesc(EyeModelViewMatrixFieldId),
1528 this));
1531 editSField(EyeModelViewMatrixFieldMask);
1533 return returnValue;
1536 GetFieldHandlePtr TexGenChunkBase::getHandleEyeModelViewMode (void) const
1538 SFUInt32::GetHandlePtr returnValue(
1539 new SFUInt32::GetHandle(
1540 &_sfEyeModelViewMode,
1541 this->getType().getFieldDesc(EyeModelViewModeFieldId),
1542 const_cast<TexGenChunkBase *>(this)));
1544 return returnValue;
1547 EditFieldHandlePtr TexGenChunkBase::editHandleEyeModelViewMode(void)
1549 SFUInt32::EditHandlePtr returnValue(
1550 new SFUInt32::EditHandle(
1551 &_sfEyeModelViewMode,
1552 this->getType().getFieldDesc(EyeModelViewModeFieldId),
1553 this));
1556 editSField(EyeModelViewModeFieldMask);
1558 return returnValue;
1562 #ifdef OSG_MT_CPTR_ASPECT
1563 void TexGenChunkBase::execSyncV( FieldContainer &oFrom,
1564 ConstFieldMaskArg whichField,
1565 AspectOffsetStore &oOffsets,
1566 ConstFieldMaskArg syncMode,
1567 const UInt32 uiSyncInfo)
1569 TexGenChunk *pThis = static_cast<TexGenChunk *>(this);
1571 pThis->execSync(static_cast<TexGenChunk *>(&oFrom),
1572 whichField,
1573 oOffsets,
1574 syncMode,
1575 uiSyncInfo);
1577 #endif
1580 #ifdef OSG_MT_CPTR_ASPECT
1581 FieldContainer *TexGenChunkBase::createAspectCopy(
1582 const FieldContainer *pRefAspect) const
1584 TexGenChunk *returnValue;
1586 newAspectCopy(returnValue,
1587 dynamic_cast<const TexGenChunk *>(pRefAspect),
1588 dynamic_cast<const TexGenChunk *>(this));
1590 return returnValue;
1592 #endif
1594 void TexGenChunkBase::resolveLinks(void)
1596 Inherited::resolveLinks();
1598 static_cast<TexGenChunk *>(this)->setSBeacon(NULL);
1600 static_cast<TexGenChunk *>(this)->setTBeacon(NULL);
1602 static_cast<TexGenChunk *>(this)->setRBeacon(NULL);
1604 static_cast<TexGenChunk *>(this)->setQBeacon(NULL);
1610 OSG_END_NAMESPACE