#include <OSGVRMLNodeDescs.h>
Inheritance diagram for osg::VRMLPixelTextureDesc:
Member | |
| Field * | getField (FieldContainerPtr pFC1, FieldContainerPtr pFC2, GenericAttPtr pGenAtt, const Char8 *szFieldname) |
| FieldNameTypeHash | _mFieldTypes |
| GenericAttPtr | _pGenAtt |
| FieldContainerPtr | _pNodeProto |
| FieldContainerPtr | _pNodeCoreProto |
| Field * | _pCurrField |
| std::string | _szCurrentName |
| bool | _bSaveOnEnd |
| *static UInt32 | _uiIndent = 0 |
Public Member Functions | |
Constructors | |
| * | VRMLPixelTextureDesc (void) |
Destructor | |
| *virtual | ~VRMLPixelTextureDesc (void) |
Helper | |
| *virtual void | init (const Char8 *szName) |
| virtual void | reset (void) |
Field | |
| *virtual bool | prototypeAddField (const Char8 *szFieldType, const UInt32 uiFieldTypeId, const Char8 *szFieldName) |
| virtual void | endProtoInterface (void) |
| virtual void | getFieldAndDesc (FieldContainerPtr pFC, const Char8 *szFieldname, Field *&pField, const FieldDescription *&pDesc) |
Node | |
| *virtual FieldContainerPtr | beginNode (const Char8 *szTypename, const Char8 *szName, FieldContainerPtr pCurrentFC) |
| virtual void | endNode (FieldContainerPtr) |
Field Value | |
| *virtual void | addFieldValue (Field *pField, const Char8 *szFieldVal) |
Dump | |
| *virtual void | dump (const Char8 *szNodeName) |
Helper | |
| virtual void | setOnEndSave (const Char8 *szName) |
| virtual void | clearOnEndSave (void) |
| virtual bool | getOnEndSave (void) |
| virtual const Char8 * | getSavename (void) |
| virtual FieldContainerPtr | getSaveFieldContainer (void) |
Field | |
| *virtual Field * | getField (const Char8 *szFieldname) |
Prototypes | |
| virtual void | prototypeAddFieldValue (const Char8 *szFieldVal) |
FieldValue | |
| virtual bool | use (FieldContainerPtr) |
Static Public Member Functions | |
Class Get | |
| *static UInt32 | getIndent (void) |
| static void | incIndent (void) |
| static void | decIndent (void) |
| static void | resetIndent (void) |
Protected Types | |
| typedef std::map< const Char8 *, UInt32, LTString > | FieldNameTypeHash |
Protected Attributes | |
Member | |
| *SFImagePtr | _defaultImage |
| SFBool | _defaultRepeatS |
| SFBool | _defaultRepeatT |
| SFImagePtr | _image |
| SFBool | _repeatS |
| SFBool | _repeatT |
Private Types | |
| typedef VRMLNodeDesc | Inherited |
Private Member Functions | |
| VRMLPixelTextureDesc (const VRMLPixelTextureDesc &source) | |
| prohibit default function (move to 'public' if needed) | |
| void | operator= (const VRMLPixelTextureDesc &source) |
| prohibit default function (move to 'public' if needed) | |
Definition at line 1210 of file OSGVRMLNodeDescs.h.
|
|
Definition at line 1299 of file OSGVRMLNodeDescs.h. |
|
|
Definition at line 298 of file OSGVRMLNodeDescs.h. |
|
|
Definition at line 3615 of file OSGVRMLNodeDescs.cpp. 03615 : 03616 Inherited(), 03617 03618 _defaultImage (), 03619 _defaultRepeatS(), 03620 _defaultRepeatT(), 03621 03622 _image (), 03623 _repeatS (), 03624 _repeatT () 03625 { 03626 }
|
|
|
Definition at line 3631 of file OSGVRMLNodeDescs.cpp.
|
|
|
|
|
|
Reimplemented from osg::VRMLNodeDesc. Definition at line 3638 of file OSGVRMLNodeDescs.cpp. References osg::VRMLNodeDesc::getIndent(), osg::indentLog(), and PINFO. 03639 { 03640 #ifdef OSG_DEBUG_VRML 03641 indentLog(getIndent(), PINFO); 03642 PINFO << "PixelTextureDesc::init : " << szName << std::endl; 03643 #endif 03644 }
|
|
|
Reimplemented from osg::VRMLNodeDesc. Definition at line 3646 of file OSGVRMLNodeDescs.cpp.
|
|
||||||||||||||||
|
Reimplemented from osg::VRMLNodeDesc. Definition at line 3653 of file OSGVRMLNodeDescs.cpp. References _defaultImage, _defaultRepeatS, _defaultRepeatT, osg::VRMLNodeDesc::_pCurrField, osg::VRMLNodeDesc::getIndent(), osg::indentLog(), PINFO, and osg::stringcasecmp(). 03656 { 03657 bool bFound = false; 03658 03659 _pCurrField = NULL; 03660 03661 if(stringcasecmp("image", szFieldname) == 0) 03662 { 03663 _pCurrField = &_defaultImage; 03664 03665 bFound = true; 03666 } 03667 else if(stringcasecmp("repeatS", szFieldname) == 0) 03668 { 03669 _pCurrField = &_defaultRepeatS; 03670 03671 bFound = true; 03672 } 03673 else if(stringcasecmp("repeatT", szFieldname) == 0) 03674 { 03675 _pCurrField = &_defaultRepeatT; 03676 03677 bFound = true; 03678 } 03679 03680 if(bFound == true) 03681 { 03682 #ifdef OSG_DEBUG_VRML 03683 indentLog(getIndent(), PINFO); 03684 PINFO << "PixelTextureDesc::prototypeAddField : add part " 03685 << szFieldname 03686 << std::endl; 03687 #endif 03688 03689 return true; 03690 } 03691 else 03692 { 03693 return false; 03694 } 03695 }
|
|
|
Reimplemented from osg::VRMLNodeDesc. Definition at line 3697 of file OSGVRMLNodeDescs.cpp.
|
|
||||||||||||||||||||
|
Reimplemented from osg::VRMLNodeDesc. Definition at line 3701 of file OSGVRMLNodeDescs.cpp. References _image, _repeatS, _repeatT, and osg::stringcasecmp(). 03706 { 03707 if(stringcasecmp("image", szFieldname) == 0) 03708 { 03709 pField = &_image; 03710 } 03711 else if(stringcasecmp("repeatS", szFieldname) == 0) 03712 { 03713 pField = &_repeatS; 03714 } 03715 else if(stringcasecmp("repeatT", szFieldname) == 0) 03716 { 03717 pField = &_repeatT; 03718 } 03719 03720 pDesc = NULL; 03721 }
|
|
||||||||||||||||
|
Reimplemented from osg::VRMLNodeDesc. Definition at line 3726 of file OSGVRMLNodeDescs.cpp. References _defaultRepeatS, _defaultRepeatT, _image, _repeatS, _repeatT, osg::ImageBase::create(), osg::TextureChunkBase::create(), osg::VRMLNodeDesc::getIndent(), osg::VRMLNodeDesc::incIndent(), osg::indentLog(), PINFO, and osg::SField< FieldTypeT, fieldNameSpace >::setValue(). 03730 { 03731 TextureChunkPtr returnValue = TextureChunk::create(); 03732 03733 ImagePtr iPtr=Image::create(); 03734 _image.setValue(iPtr); 03735 03736 _repeatS = _defaultRepeatS; 03737 _repeatT = _defaultRepeatT; 03738 03739 #ifdef OSG_DEBUG_VRML 03740 indentLog(getIndent(), PINFO); 03741 PINFO << "Begin PixelTexture " << &(*returnValue) << std::endl; 03742 03743 incIndent(); 03744 #endif 03745 03746 return returnValue; 03747 }
|
|
|
Reimplemented from osg::VRMLNodeDesc. Definition at line 3749 of file OSGVRMLNodeDescs.cpp. References _image, _repeatS, _repeatT, osg::AttachmentPtr::dcast(), osg::VRMLNodeDesc::decIndent(), osg::VRMLNodeDesc::getIndent(), osg::SField< FieldTypeT, fieldNameSpace >::getValue(), osg::indentLog(), osg::NullFC, PINFO, and PWARNING. 03750 { 03751 TextureChunkPtr pTexture = NullFC; 03752 03753 pTexture = TextureChunkPtr::dcast(pFC); 03754 03755 if(pTexture != NullFC) 03756 { 03757 if(_image.getValue() != NullFC) 03758 { 03759 pTexture->setImage(_image.getValue()); 03760 03761 if(_repeatS.getValue() == true) 03762 { 03763 pTexture->setWrapS(GL_REPEAT); 03764 } 03765 else 03766 { 03767 pTexture->setWrapS(GL_CLAMP); 03768 } 03769 03770 if(_repeatT.getValue() == true) 03771 { 03772 pTexture->setWrapT(GL_REPEAT); 03773 } 03774 else 03775 { 03776 pTexture->setWrapS(GL_CLAMP); 03777 } 03778 } 03779 } 03780 else 03781 { 03782 PWARNING << "VRMLPixelTextureDesc::endNode : Invalid texture ptr" 03783 << std::endl; 03784 } 03785 03786 #ifdef OSG_DEBUG_VRML 03787 decIndent(); 03788 03789 indentLog(getIndent(), PINFO); 03790 PINFO << "End PixelTexture " 03791 << _repeatS.getValue() << " " 03792 << _repeatT.getValue() << " " 03793 << &(*pFC) << std::endl; 03794 #endif 03795 }
|
|
||||||||||||
|
Reimplemented from osg::VRMLNodeDesc. Definition at line 3800 of file OSGVRMLNodeDescs.cpp. References _image, osg::SField< FieldTypeT, fieldNameSpace >::getValue(), osg::NullFC, and osg::Field::pushValueByStr(). 03802 { 03803 if(pField != NULL) 03804 { 03805 if( (pField == &_image) && (_image.getValue() != NullFC) ) 03806 { 03807 _image.getValue()->addValue(szFieldVal); 03808 } 03809 else 03810 { 03811 pField->pushValueByStr(szFieldVal); 03812 } 03813 } 03814 }
|
|
|
Reimplemented from osg::VRMLNodeDesc. Definition at line 3819 of file OSGVRMLNodeDescs.cpp.
|
|
|
|
|
|
|
|
|
Definition at line 150 of file OSGVRMLNodeDescs.cpp. References osg::VRMLNodeDesc::_uiIndent. Referenced by osg::VRMLFile::createStandardPrototypes(), osg::VRMLFile::scanFile(), osg::VRMLFile::scanStandardPrototypes(), and osg::VRMLFile::scanStream(). 00151 { 00152 _uiIndent = 0; 00153 }
|
|
|
Definition at line 209 of file OSGVRMLNodeDescs.cpp. References osg::VRMLNodeDesc::_bSaveOnEnd, and osg::VRMLNodeDesc::_szCurrentName. Referenced by osg::VRMLFile::beginNode(). 00210 { 00211 _szCurrentName = szName; // does that make a copy? I expect it to... 00212 _bSaveOnEnd = true; 00213 }
|
|
|
Definition at line 215 of file OSGVRMLNodeDescs.cpp. References osg::VRMLNodeDesc::_bSaveOnEnd. Referenced by osg::VRMLFile::endNode(). 00216 { 00217 _bSaveOnEnd = false; 00218 }
|
|
|
Definition at line 220 of file OSGVRMLNodeDescs.cpp. References osg::VRMLNodeDesc::_bSaveOnEnd. Referenced by osg::VRMLFile::endNode(). 00221 { 00222 return _bSaveOnEnd; 00223 }
|
|
|
Definition at line 225 of file OSGVRMLNodeDescs.cpp. References osg::VRMLNodeDesc::_szCurrentName. Referenced by osg::VRMLFile::endNode(). 00226 { 00227 return _szCurrentName.c_str(); 00228 }
|
|
|
Reimplemented in osg::VRMLAppearanceDesc. Definition at line 230 of file OSGVRMLNodeDescs.cpp. References osg::NullFC. Referenced by osg::VRMLFile::endNode(). 00231 { 00232 return NullFC; 00233 }
|
|
|
Definition at line 238 of file OSGVRMLNodeDescs.cpp. References osg::VRMLNodeDesc::_pGenAtt, osg::VRMLNodeDesc::_pNodeCoreProto, and osg::VRMLNodeDesc::_pNodeProto. Referenced by osg::VRMLNodeDesc::prototypeAddField(). 00239 { 00240 return getField(_pNodeProto, _pNodeCoreProto, _pGenAtt, szFieldname); 00241 }
|
|
||||||||||||||||||||
|
Definition at line 604 of file OSGVRMLNodeDescs.cpp. References osg::VRMLNodeDesc::decIndent(), osg::VRMLNodeDesc::getIndent(), osg::VRMLNodeDesc::incIndent(), osg::indentLog(), osg::NullFC, and PINFO. 00608 { 00609 Field *returnValue = NULL; 00610 00611 if(szFieldname == NULL) 00612 { 00613 return returnValue; 00614 } 00615 00616 #ifdef OSG_DEBUG_VRML 00617 indentLog(getIndent(), PINFO); 00618 PINFO << "VRMLNodeDesc::getField " << std::endl; 00619 00620 incIndent(); 00621 00622 indentLog(getIndent(), PINFO); 00623 PINFO << "Trying to find field : " << szFieldname << std::endl; 00624 #endif 00625 00626 if(pFC1 != NullFC) 00627 { 00628 returnValue = pFC1->getField(szFieldname); 00629 } 00630 00631 #ifdef OSG_DEBUG_VRML 00632 incIndent(); 00633 00634 indentLog(getIndent(), PINFO); 00635 PINFO << "Got this from node : " << returnValue << std::endl; 00636 #endif 00637 00638 if(returnValue != NULL) 00639 return returnValue; 00640 00641 if(pFC2 != NullFC) 00642 { 00643 returnValue = pFC2->getField(szFieldname); 00644 00645 #ifdef OSG_DEBUG_VRML 00646 indentLog(getIndent(), PINFO); 00647 PINFO << "Got this from nodecore : " << returnValue << std::endl; 00648 #endif 00649 } 00650 else 00651 { 00652 #ifdef OSG_DEBUG_VRML 00653 indentLog(getIndent(), PINFO); 00654 PINFO << "No core to check" << std::endl; 00655 #endif 00656 } 00657 00658 00659 if(returnValue != NULL) 00660 return returnValue; 00661 00662 if(pGenAtt != NullFC) 00663 { 00664 returnValue = pGenAtt->getField(szFieldname); 00665 } 00666 00667 #ifdef OSG_DEBUG_VRML 00668 indentLog(getIndent(), PINFO); 00669 PINFO << "Got this from attachment : " << returnValue << std::endl; 00670 00671 decIndent(); 00672 decIndent(); 00673 #endif 00674 00675 return returnValue; 00676 }
|
|
|
Definition at line 474 of file OSGVRMLNodeDescs.cpp. References osg::VRMLNodeDesc::_pCurrField, and osg::Field::pushValueByStr(). 00475 { 00476 if(_pCurrField != NULL) 00477 { 00478 _pCurrField->pushValueByStr(szFieldVal); 00479 } 00480 }
|
|
|
Reimplemented in osg::VRMLAppearanceDesc. Definition at line 557 of file OSGVRMLNodeDescs.cpp. Referenced by osg::VRMLFile::use().
|
|
|
Definition at line 1287 of file OSGVRMLNodeDescs.h. Referenced by prototypeAddField(). |
|
|
Definition at line 1288 of file OSGVRMLNodeDescs.h. Referenced by beginNode(), and prototypeAddField(). |
|
|
Definition at line 1289 of file OSGVRMLNodeDescs.h. Referenced by beginNode(), and prototypeAddField(). |
|
|
Definition at line 1291 of file OSGVRMLNodeDescs.h. Referenced by addFieldValue(), beginNode(), endNode(), and getFieldAndDesc(). |
|
|
Definition at line 1292 of file OSGVRMLNodeDescs.h. Referenced by beginNode(), endNode(), and getFieldAndDesc(). |
|
|
Definition at line 1293 of file OSGVRMLNodeDescs.h. Referenced by beginNode(), endNode(), and getFieldAndDesc(). |
|
|
Definition at line 123 of file OSGVRMLNodeDescs.cpp. Referenced by osg::VRMLNodeDesc::decIndent(), osg::VRMLNodeDesc::getIndent(), osg::VRMLNodeDesc::incIndent(), and osg::VRMLNodeDesc::resetIndent(). |
|
|
Definition at line 307 of file OSGVRMLNodeDescs.h. |
|
|
|
|
|
|
Definition at line 316 of file OSGVRMLNodeDescs.h. Referenced by osg::VRMLNodeDesc::getSavename(), and osg::VRMLNodeDesc::setOnEndSave(). |
|
|
Definition at line 317 of file OSGVRMLNodeDescs.h. Referenced by osg::VRMLNodeDesc::clearOnEndSave(), osg::VRMLNodeDesc::getOnEndSave(), and osg::VRMLNodeDesc::setOnEndSave(). |
1.4.3