#include <OSGVRMLNodeDescs.h>
Inheritance diagram for osg::VRMLMaterialDesc:

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 | |
| * | VRMLMaterialDesc (void) |
Destructor | |
| *virtual | ~VRMLMaterialDesc (void) |
Helper | |
| *virtual void | init (const Char8 *szName) |
| virtual void | reset (void) |
| virtual MaterialPtr | getDefaultMaterial (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) |
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 void | addFieldValue (Field *pField, const Char8 *szFieldVal) |
| 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 | |
| *SFReal32 | _defaultAmbientIntensity |
| SFColor3f | _defaultDiffuseColor |
| SFColor3f | _defaultEmissiveColor |
| SFReal32 | _defaultShininess |
| SFColor3f | _defaultSpecularColor |
| SFReal32 | _defaultTransparency |
| SFReal32 | _ambientIntensity |
| SFColor3f | _diffuseColor |
| SFColor3f | _emissiveColor |
| SFReal32 | _shininess |
| SFColor3f | _specularColor |
| SFReal32 | _transparency |
| ChunkMaterialPtr | _pDefMat |
| MaterialChunkPtr | _pMat |
Private Types | |
| typedef VRMLNodeDesc | Inherited |
Private Member Functions | |
| VRMLMaterialDesc (const VRMLMaterialDesc &source) | |
| prohibit default function (move to 'public' if needed) | |
| void | operator= (const VRMLMaterialDesc &source) |
| prohibit default function (move to 'public' if needed) | |
Definition at line 909 of file OSGVRMLNodeDescs.h.
|
|
Definition at line 1001 of file OSGVRMLNodeDescs.h. |
|
|
Definition at line 298 of file OSGVRMLNodeDescs.h. |
|
|
Definition at line 2899 of file OSGVRMLNodeDescs.cpp. 02899 : 02900 Inherited(), 02901 02902 _defaultAmbientIntensity(), 02903 _defaultDiffuseColor (), 02904 _defaultEmissiveColor (), 02905 _defaultShininess (), 02906 _defaultSpecularColor (), 02907 _defaultTransparency (), 02908 02909 _ambientIntensity (), 02910 _diffuseColor (), 02911 _emissiveColor (), 02912 _shininess (), 02913 _specularColor (), 02914 _transparency (), 02915 02916 _pDefMat (NullFC), 02917 _pMat (NullFC) 02918 { 02919 }
|
|
|
Definition at line 2924 of file OSGVRMLNodeDescs.cpp. References _pDefMat, and osg::subRefCP().
|
|
|
|
|
|
Reimplemented from osg::VRMLNodeDesc. Definition at line 2932 of file OSGVRMLNodeDescs.cpp. References osg::VRMLNodeDesc::getIndent(), osg::indentLog(), and PINFO. 02933 { 02934 #ifdef OSG_DEBUG_VRML 02935 indentLog(getIndent(), PINFO); 02936 PINFO << "MaterialDesc::init : " << szName << std::endl; 02937 #endif 02938 }
|
|
|
Reimplemented from osg::VRMLNodeDesc. Definition at line 2940 of file OSGVRMLNodeDescs.cpp. References _ambientIntensity, _defaultAmbientIntensity, _defaultDiffuseColor, _defaultEmissiveColor, _defaultShininess, _defaultSpecularColor, _defaultTransparency, _diffuseColor, _emissiveColor, _pMat, _shininess, _specularColor, _transparency, osg::NullFC, and osg::SField< FieldTypeT, fieldNameSpace >::setValue(). Referenced by beginNode(). 02941 { 02942 _pMat = NullFC; 02943 02944 _ambientIntensity.setValue(_defaultAmbientIntensity); 02945 _diffuseColor .setValue(_defaultDiffuseColor); 02946 _emissiveColor .setValue(_defaultEmissiveColor); 02947 _shininess .setValue(_defaultShininess); 02948 _specularColor .setValue(_defaultSpecularColor); 02949 _transparency .setValue(_defaultTransparency); 02950 }
|
|
|
Definition at line 2952 of file OSGVRMLNodeDescs.cpp. References _pDefMat. Referenced by osg::VRMLAppearanceDesc::endNode(), and osg::VRMLShapeDesc::endNode(). 02953 { 02954 return _pDefMat; 02955 }
|
|
||||||||||||||||
|
Reimplemented from osg::VRMLNodeDesc. Definition at line 2960 of file OSGVRMLNodeDescs.cpp. References _defaultAmbientIntensity, _defaultDiffuseColor, _defaultEmissiveColor, _defaultShininess, _defaultSpecularColor, _defaultTransparency, osg::VRMLNodeDesc::_pCurrField, osg::VRMLNodeDesc::getIndent(), osg::indentLog(), PINFO, and osg::stringcasecmp(). 02963 { 02964 bool bFound = false; 02965 02966 _pCurrField = NULL; 02967 02968 if(stringcasecmp("ambientIntensity", szFieldname) == 0) 02969 { 02970 _pCurrField = &_defaultAmbientIntensity; 02971 02972 bFound = true; 02973 } 02974 else if(stringcasecmp("diffuseColor", szFieldname) == 0) 02975 { 02976 _pCurrField = &_defaultDiffuseColor; 02977 02978 bFound = true; 02979 } 02980 else if(stringcasecmp("emissiveColor", szFieldname) == 0) 02981 { 02982 _pCurrField = &_defaultEmissiveColor; 02983 02984 bFound = true; 02985 } 02986 else if(stringcasecmp("shininess", szFieldname) == 0) 02987 { 02988 _pCurrField = &_defaultShininess; 02989 02990 bFound = true; 02991 } 02992 else if(stringcasecmp("specularColor", szFieldname) == 0) 02993 { 02994 _pCurrField = &_defaultSpecularColor; 02995 02996 bFound = true; 02997 } 02998 else if(stringcasecmp("transparency", szFieldname) == 0) 02999 { 03000 _pCurrField = &_defaultTransparency; 03001 03002 bFound = true; 03003 } 03004 03005 if(bFound == true) 03006 { 03007 #ifdef OSG_DEBUG_VRML 03008 indentLog(getIndent(), PINFO); 03009 PINFO << "MaterialDesc::prototypeAddField : add part " 03010 << szFieldname 03011 << std::endl; 03012 #endif 03013 return true; 03014 } 03015 else 03016 { 03017 return false; 03018 } 03019 }
|
|
|
||||||||||||||||||||
|
Reimplemented from osg::VRMLNodeDesc. Definition at line 3065 of file OSGVRMLNodeDescs.cpp. References _ambientIntensity, _diffuseColor, _emissiveColor, _shininess, _specularColor, _transparency, and osg::stringcasecmp(). 03070 { 03071 if(stringcasecmp("ambientIntensity", szFieldname) == 0) 03072 { 03073 pField = &_ambientIntensity; 03074 } 03075 else if(stringcasecmp("diffuseColor", szFieldname) == 0) 03076 { 03077 pField = &_diffuseColor; 03078 } 03079 else if(stringcasecmp("emissiveColor", szFieldname) == 0) 03080 { 03081 pField = &_emissiveColor; 03082 } 03083 else if(stringcasecmp("shininess", szFieldname) == 0) 03084 { 03085 pField = &_shininess; 03086 } 03087 else if(stringcasecmp("specularColor", szFieldname) == 0) 03088 { 03089 pField = &_specularColor; 03090 } 03091 else if(stringcasecmp("transparency", szFieldname) == 0) 03092 { 03093 pField = &_transparency; 03094 } 03095 03096 pDesc = NULL; 03097 }
|
|
||||||||||||||||
|
Reimplemented from osg::VRMLNodeDesc. Definition at line 3102 of file OSGVRMLNodeDescs.cpp. References _pMat, osg::MaterialChunkBase::create(), and reset(). 03106 { 03107 reset(); 03108 03109 _pMat = MaterialChunk::create(); 03110 03111 return _pMat; 03112 }
|
|
|
|
Reimplemented from osg::VRMLNodeDesc. Definition at line 3159 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::VRMLGeometryDesc, osg::VRMLGeometryPointSetDesc, and osg::VRMLPixelTextureDesc. Definition at line 548 of file OSGVRMLNodeDescs.cpp. References osg::Field::pushValueByStr(). Referenced by osg::VRMLFile::addFieldValue(). 00550 { 00551 if(pField != NULL) 00552 { 00553 pField->pushValueByStr(szFieldVal); 00554 } 00555 }
|
|
|
Reimplemented in osg::VRMLAppearanceDesc. Definition at line 557 of file OSGVRMLNodeDescs.cpp. Referenced by osg::VRMLFile::use().
|
|
|
Definition at line 980 of file OSGVRMLNodeDescs.h. Referenced by endProtoInterface(), prototypeAddField(), and reset(). |
|
|
Definition at line 981 of file OSGVRMLNodeDescs.h. Referenced by endProtoInterface(), prototypeAddField(), and reset(). |
|
|
Definition at line 982 of file OSGVRMLNodeDescs.h. Referenced by endProtoInterface(), prototypeAddField(), and reset(). |
|
|
Definition at line 983 of file OSGVRMLNodeDescs.h. Referenced by endProtoInterface(), prototypeAddField(), and reset(). |
|
|
Definition at line 984 of file OSGVRMLNodeDescs.h. Referenced by endProtoInterface(), prototypeAddField(), and reset(). |
|
|
Definition at line 985 of file OSGVRMLNodeDescs.h. |