1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
7 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
9 \*---------------------------------------------------------------------------*/
10 /*---------------------------------------------------------------------------*\
13 * This library is free software; you can redistribute it and/or modify it *
14 * under the terms of the GNU Library General Public License as published *
15 * by the Free Software Foundation, version 2. *
17 * This library is distributed in the hope that it will be useful, but *
18 * WITHOUT ANY WARRANTY; without even the implied warranty of *
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
20 * Library General Public License for more details. *
22 * You should have received a copy of the GNU Library General Public *
23 * License along with this library; if not, write to the Free Software *
24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
26 \*---------------------------------------------------------------------------*/
27 /*---------------------------------------------------------------------------*\
35 \*---------------------------------------------------------------------------*/
37 /*****************************************************************************\
38 *****************************************************************************
40 ** This file is automatically generated. **
42 ** Any changes made to this file WILL be lost when it is **
43 ** regenerated, which can become necessary at any time. **
45 ** Do not change this file, changes should be done in the derived **
48 *****************************************************************************
49 \*****************************************************************************/
55 //! access the type of the class
57 OSG::FieldContainerType &ImageBase::getClassType(void)
62 //! access the numerical type of the class
64 OSG::UInt32 ImageBase::getClassTypeId(void)
70 OSG::UInt16 ImageBase::getClassGroupId(void)
72 return _type.getGroupId();
75 /*------------------------------ get -----------------------------------*/
77 //! Get the value of the Image::_sfDimension field.
80 Int32 &ImageBase::editDimension(void)
82 editSField(DimensionFieldMask);
84 return _sfDimension.getValue();
87 //! Get the value of the Image::_sfDimension field.
89 Int32 ImageBase::getDimension(void) const
91 return _sfDimension.getValue();
94 //! Set the value of the Image::_sfDimension field.
96 void ImageBase::setDimension(const Int32 value)
98 editSField(DimensionFieldMask);
100 _sfDimension.setValue(value);
102 //! Get the value of the Image::_sfWidth field.
105 Int32 &ImageBase::editWidth(void)
107 editSField(WidthFieldMask);
109 return _sfWidth.getValue();
112 //! Get the value of the Image::_sfWidth field.
114 Int32 ImageBase::getWidth(void) const
116 return _sfWidth.getValue();
119 //! Set the value of the Image::_sfWidth field.
121 void ImageBase::setWidth(const Int32 value)
123 editSField(WidthFieldMask);
125 _sfWidth.setValue(value);
127 //! Get the value of the Image::_sfHeight field.
130 Int32 &ImageBase::editHeight(void)
132 editSField(HeightFieldMask);
134 return _sfHeight.getValue();
137 //! Get the value of the Image::_sfHeight field.
139 Int32 ImageBase::getHeight(void) const
141 return _sfHeight.getValue();
144 //! Set the value of the Image::_sfHeight field.
146 void ImageBase::setHeight(const Int32 value)
148 editSField(HeightFieldMask);
150 _sfHeight.setValue(value);
152 //! Get the value of the Image::_sfDepth field.
155 Int32 &ImageBase::editDepth(void)
157 editSField(DepthFieldMask);
159 return _sfDepth.getValue();
162 //! Get the value of the Image::_sfDepth field.
164 Int32 ImageBase::getDepth(void) const
166 return _sfDepth.getValue();
169 //! Set the value of the Image::_sfDepth field.
171 void ImageBase::setDepth(const Int32 value)
173 editSField(DepthFieldMask);
175 _sfDepth.setValue(value);
177 //! Get the value of the Image::_sfBpp field.
180 Int32 &ImageBase::editBpp(void)
182 editSField(BppFieldMask);
184 return _sfBpp.getValue();
187 //! Get the value of the Image::_sfBpp field.
189 Int32 ImageBase::getBpp(void) const
191 return _sfBpp.getValue();
194 //! Set the value of the Image::_sfBpp field.
196 void ImageBase::setBpp(const Int32 value)
198 editSField(BppFieldMask);
200 _sfBpp.setValue(value);
202 //! Get the value of the Image::_sfMipMapCount field.
205 Int32 &ImageBase::editMipMapCount(void)
207 editSField(MipMapCountFieldMask);
209 return _sfMipMapCount.getValue();
212 //! Get the value of the Image::_sfMipMapCount field.
214 Int32 ImageBase::getMipMapCount(void) const
216 return _sfMipMapCount.getValue();
219 //! Set the value of the Image::_sfMipMapCount field.
221 void ImageBase::setMipMapCount(const Int32 value)
223 editSField(MipMapCountFieldMask);
225 _sfMipMapCount.setValue(value);
227 //! Get the value of the Image::_sfFrameCount field.
230 Int32 &ImageBase::editFrameCount(void)
232 editSField(FrameCountFieldMask);
234 return _sfFrameCount.getValue();
237 //! Get the value of the Image::_sfFrameCount field.
239 Int32 ImageBase::getFrameCount(void) const
241 return _sfFrameCount.getValue();
244 //! Set the value of the Image::_sfFrameCount field.
246 void ImageBase::setFrameCount(const Int32 value)
248 editSField(FrameCountFieldMask);
250 _sfFrameCount.setValue(value);
252 //! Get the value of the Image::_sfFrameDelay field.
255 Time &ImageBase::editFrameDelay(void)
257 editSField(FrameDelayFieldMask);
259 return _sfFrameDelay.getValue();
262 //! Get the value of the Image::_sfFrameDelay field.
264 const Time &ImageBase::getFrameDelay(void) const
266 return _sfFrameDelay.getValue();
269 //! Set the value of the Image::_sfFrameDelay field.
271 void ImageBase::setFrameDelay(const Time &value)
273 editSField(FrameDelayFieldMask);
275 _sfFrameDelay.setValue(value);
277 //! Get the value of the Image::_sfPixelFormat field.
280 UInt32 &ImageBase::editPixelFormat(void)
282 editSField(PixelFormatFieldMask);
284 return _sfPixelFormat.getValue();
287 //! Get the value of the Image::_sfPixelFormat field.
289 UInt32 ImageBase::getPixelFormat(void) const
291 return _sfPixelFormat.getValue();
294 //! Set the value of the Image::_sfPixelFormat field.
296 void ImageBase::setPixelFormat(const UInt32 value)
298 editSField(PixelFormatFieldMask);
300 _sfPixelFormat.setValue(value);
302 //! Get the value of the Image::_sfFrameSize field.
305 Int32 &ImageBase::editFrameSize(void)
307 editSField(FrameSizeFieldMask);
309 return _sfFrameSize.getValue();
312 //! Get the value of the Image::_sfFrameSize field.
314 Int32 ImageBase::getFrameSize(void) const
316 return _sfFrameSize.getValue();
319 //! Set the value of the Image::_sfFrameSize field.
321 void ImageBase::setFrameSize(const Int32 value)
323 editSField(FrameSizeFieldMask);
325 _sfFrameSize.setValue(value);
327 //! Get the value of the Image::_sfName field.
330 std::string &ImageBase::editName(void)
332 editSField(NameFieldMask);
334 return _sfName.getValue();
337 //! Get the value of the Image::_sfName field.
339 const std::string &ImageBase::getName(void) const
341 return _sfName.getValue();
344 //! Set the value of the Image::_sfName field.
346 void ImageBase::setName(const std::string &value)
348 editSField(NameFieldMask);
350 _sfName.setValue(value);
352 //! Get the value of the Image::_sfDataType field.
355 Int32 &ImageBase::editDataType(void)
357 editSField(DataTypeFieldMask);
359 return _sfDataType.getValue();
362 //! Get the value of the Image::_sfDataType field.
364 Int32 ImageBase::getDataType(void) const
366 return _sfDataType.getValue();
369 //! Set the value of the Image::_sfDataType field.
371 void ImageBase::setDataType(const Int32 value)
373 editSField(DataTypeFieldMask);
375 _sfDataType.setValue(value);
377 //! Get the value of the Image::_sfComponentSize field.
380 Int32 &ImageBase::editComponentSize(void)
382 editSField(ComponentSizeFieldMask);
384 return _sfComponentSize.getValue();
387 //! Get the value of the Image::_sfComponentSize field.
389 Int32 ImageBase::getComponentSize(void) const
391 return _sfComponentSize.getValue();
394 //! Set the value of the Image::_sfComponentSize field.
396 void ImageBase::setComponentSize(const Int32 value)
398 editSField(ComponentSizeFieldMask);
400 _sfComponentSize.setValue(value);
402 //! Get the value of the Image::_sfSideCount field.
405 Int32 &ImageBase::editSideCount(void)
407 editSField(SideCountFieldMask);
409 return _sfSideCount.getValue();
412 //! Get the value of the Image::_sfSideCount field.
414 Int32 ImageBase::getSideCount(void) const
416 return _sfSideCount.getValue();
419 //! Set the value of the Image::_sfSideCount field.
421 void ImageBase::setSideCount(const Int32 value)
423 editSField(SideCountFieldMask);
425 _sfSideCount.setValue(value);
427 //! Get the value of the Image::_sfSideSize field.
430 Int32 &ImageBase::editSideSize(void)
432 editSField(SideSizeFieldMask);
434 return _sfSideSize.getValue();
437 //! Get the value of the Image::_sfSideSize field.
439 Int32 ImageBase::getSideSize(void) const
441 return _sfSideSize.getValue();
444 //! Set the value of the Image::_sfSideSize field.
446 void ImageBase::setSideSize(const Int32 value)
448 editSField(SideSizeFieldMask);
450 _sfSideSize.setValue(value);
452 //! Get the value of the Image::_sfForceCompressedData field.
455 bool &ImageBase::editForceCompressedData(void)
457 editSField(ForceCompressedDataFieldMask);
459 return _sfForceCompressedData.getValue();
462 //! Get the value of the Image::_sfForceCompressedData field.
464 bool ImageBase::getForceCompressedData(void) const
466 return _sfForceCompressedData.getValue();
469 //! Set the value of the Image::_sfForceCompressedData field.
471 void ImageBase::setForceCompressedData(const bool value)
473 editSField(ForceCompressedDataFieldMask);
475 _sfForceCompressedData.setValue(value);
477 //! Get the value of the Image::_sfForceAlphaChannel field.
480 bool &ImageBase::editForceAlphaChannel(void)
482 editSField(ForceAlphaChannelFieldMask);
484 return _sfForceAlphaChannel.getValue();
487 //! Get the value of the Image::_sfForceAlphaChannel field.
489 bool ImageBase::getForceAlphaChannel(void) const
491 return _sfForceAlphaChannel.getValue();
494 //! Set the value of the Image::_sfForceAlphaChannel field.
496 void ImageBase::setForceAlphaChannel(const bool value)
498 editSField(ForceAlphaChannelFieldMask);
500 _sfForceAlphaChannel.setValue(value);
502 //! Get the value of the Image::_sfForceColorChannel field.
505 bool &ImageBase::editForceColorChannel(void)
507 editSField(ForceColorChannelFieldMask);
509 return _sfForceColorChannel.getValue();
512 //! Get the value of the Image::_sfForceColorChannel field.
514 bool ImageBase::getForceColorChannel(void) const
516 return _sfForceColorChannel.getValue();
519 //! Set the value of the Image::_sfForceColorChannel field.
521 void ImageBase::setForceColorChannel(const bool value)
523 editSField(ForceColorChannelFieldMask);
525 _sfForceColorChannel.setValue(value);
527 //! Get the value of the Image::_sfForceAlphaBinary field.
530 bool &ImageBase::editForceAlphaBinary(void)
532 editSField(ForceAlphaBinaryFieldMask);
534 return _sfForceAlphaBinary.getValue();
537 //! Get the value of the Image::_sfForceAlphaBinary field.
539 bool ImageBase::getForceAlphaBinary(void) const
541 return _sfForceAlphaBinary.getValue();
544 //! Set the value of the Image::_sfForceAlphaBinary field.
546 void ImageBase::setForceAlphaBinary(const bool value)
548 editSField(ForceAlphaBinaryFieldMask);
550 _sfForceAlphaBinary.setValue(value);
552 //! Get the value of the Image::_sfResX field.
555 Real32 &ImageBase::editResX(void)
557 editSField(ResXFieldMask);
559 return _sfResX.getValue();
562 //! Get the value of the Image::_sfResX field.
564 Real32 ImageBase::getResX(void) const
566 return _sfResX.getValue();
569 //! Set the value of the Image::_sfResX field.
571 void ImageBase::setResX(const Real32 value)
573 editSField(ResXFieldMask);
575 _sfResX.setValue(value);
577 //! Get the value of the Image::_sfResY field.
580 Real32 &ImageBase::editResY(void)
582 editSField(ResYFieldMask);
584 return _sfResY.getValue();
587 //! Get the value of the Image::_sfResY field.
589 Real32 ImageBase::getResY(void) const
591 return _sfResY.getValue();
594 //! Set the value of the Image::_sfResY field.
596 void ImageBase::setResY(const Real32 value)
598 editSField(ResYFieldMask);
600 _sfResY.setValue(value);
602 //! Get the value of the Image::_sfResUnit field.
605 UInt16 &ImageBase::editResUnit(void)
607 editSField(ResUnitFieldMask);
609 return _sfResUnit.getValue();
612 //! Get the value of the Image::_sfResUnit field.
614 UInt16 ImageBase::getResUnit(void) const
616 return _sfResUnit.getValue();
619 //! Set the value of the Image::_sfResUnit field.
621 void ImageBase::setResUnit(const UInt16 value)
623 editSField(ResUnitFieldMask);
625 _sfResUnit.setValue(value);
627 //! Get the value of the Image::_sfClearOnLoad field.
630 bool &ImageBase::editClearOnLoad(void)
632 editSField(ClearOnLoadFieldMask);
634 return _sfClearOnLoad.getValue();
637 //! Get the value of the Image::_sfClearOnLoad field.
639 bool ImageBase::getClearOnLoad(void) const
641 return _sfClearOnLoad.getValue();
644 //! Set the value of the Image::_sfClearOnLoad field.
646 void ImageBase::setClearOnLoad(const bool value)
648 editSField(ClearOnLoadFieldMask);
650 _sfClearOnLoad.setValue(value);
653 //! Get the value of the \a index element the Image::_mfPixel field.
655 UInt8 ImageBase::getPixel(const UInt32 index) const
657 return _mfPixel[index];
661 MFUInt8 ::reference ImageBase::editPixel(const UInt32 index)
663 editMField(PixelFieldMask, _mfPixel);
665 return _mfPixel[index];
669 #ifdef OSG_MT_CPTR_ASPECT
671 void ImageBase::execSync ( ImageBase *pFrom,
672 ConstFieldMaskArg whichField,
673 AspectOffsetStore &oOffsets,
674 ConstFieldMaskArg syncMode,
675 const UInt32 uiSyncInfo)
677 Inherited::execSync(pFrom, whichField, oOffsets, syncMode, uiSyncInfo);
679 if(FieldBits::NoField != (ParentsFieldMask & whichField))
680 _mfParents.syncWith(pFrom->_mfParents,
685 if(FieldBits::NoField != (DimensionFieldMask & whichField))
686 _sfDimension.syncWith(pFrom->_sfDimension);
688 if(FieldBits::NoField != (WidthFieldMask & whichField))
689 _sfWidth.syncWith(pFrom->_sfWidth);
691 if(FieldBits::NoField != (HeightFieldMask & whichField))
692 _sfHeight.syncWith(pFrom->_sfHeight);
694 if(FieldBits::NoField != (DepthFieldMask & whichField))
695 _sfDepth.syncWith(pFrom->_sfDepth);
697 if(FieldBits::NoField != (BppFieldMask & whichField))
698 _sfBpp.syncWith(pFrom->_sfBpp);
700 if(FieldBits::NoField != (MipMapCountFieldMask & whichField))
701 _sfMipMapCount.syncWith(pFrom->_sfMipMapCount);
703 if(FieldBits::NoField != (FrameCountFieldMask & whichField))
704 _sfFrameCount.syncWith(pFrom->_sfFrameCount);
706 if(FieldBits::NoField != (FrameDelayFieldMask & whichField))
707 _sfFrameDelay.syncWith(pFrom->_sfFrameDelay);
709 if(FieldBits::NoField != (PixelFormatFieldMask & whichField))
710 _sfPixelFormat.syncWith(pFrom->_sfPixelFormat);
712 if(FieldBits::NoField != (PixelFieldMask & whichField))
713 _mfPixel.syncWith(pFrom->_mfPixel,
718 if(FieldBits::NoField != (FrameSizeFieldMask & whichField))
719 _sfFrameSize.syncWith(pFrom->_sfFrameSize);
721 if(FieldBits::NoField != (NameFieldMask & whichField))
722 _sfName.syncWith(pFrom->_sfName);
724 if(FieldBits::NoField != (DataTypeFieldMask & whichField))
725 _sfDataType.syncWith(pFrom->_sfDataType);
727 if(FieldBits::NoField != (ComponentSizeFieldMask & whichField))
728 _sfComponentSize.syncWith(pFrom->_sfComponentSize);
730 if(FieldBits::NoField != (SideCountFieldMask & whichField))
731 _sfSideCount.syncWith(pFrom->_sfSideCount);
733 if(FieldBits::NoField != (SideSizeFieldMask & whichField))
734 _sfSideSize.syncWith(pFrom->_sfSideSize);
736 if(FieldBits::NoField != (ForceCompressedDataFieldMask & whichField))
737 _sfForceCompressedData.syncWith(pFrom->_sfForceCompressedData);
739 if(FieldBits::NoField != (ForceAlphaChannelFieldMask & whichField))
740 _sfForceAlphaChannel.syncWith(pFrom->_sfForceAlphaChannel);
742 if(FieldBits::NoField != (ForceColorChannelFieldMask & whichField))
743 _sfForceColorChannel.syncWith(pFrom->_sfForceColorChannel);
745 if(FieldBits::NoField != (ForceAlphaBinaryFieldMask & whichField))
746 _sfForceAlphaBinary.syncWith(pFrom->_sfForceAlphaBinary);
748 if(FieldBits::NoField != (ResXFieldMask & whichField))
749 _sfResX.syncWith(pFrom->_sfResX);
751 if(FieldBits::NoField != (ResYFieldMask & whichField))
752 _sfResY.syncWith(pFrom->_sfResY);
754 if(FieldBits::NoField != (ResUnitFieldMask & whichField))
755 _sfResUnit.syncWith(pFrom->_sfResUnit);
757 if(FieldBits::NoField != (ClearOnLoadFieldMask & whichField))
758 _sfClearOnLoad.syncWith(pFrom->_sfClearOnLoad);
764 const Char8 *ImageBase::getClassname(void)
768 OSG_GEN_CONTAINERPTR(Image);