Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

osg::VRMLMaterialDesc Class Reference
[VRML-specific File Input/Output]

VRML Material Desc. More...

#include <OSGVRMLNodeDescs.h>

Inheritance diagram for osg::VRMLMaterialDesc:

osg::VRMLNodeDesc List of all members.

Member

FieldgetField (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 Char8getSavename (void)
virtual FieldContainerPtr getSaveFieldContainer (void)
Field
*virtual FieldgetField (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)

Detailed Description

VRML Material description

Definition at line 909 of file OSGVRMLNodeDescs.h.


Member Typedef Documentation

typedef VRMLNodeDesc osg::VRMLMaterialDesc::Inherited [private]
 

Definition at line 1001 of file OSGVRMLNodeDescs.h.

typedef std::map< const Char8 *, UInt32, LTString> osg::VRMLNodeDesc::FieldNameTypeHash [protected, inherited]
 

Definition at line 298 of file OSGVRMLNodeDescs.h.


Constructor & Destructor Documentation

VRMLMaterialDesc::VRMLMaterialDesc void   ) 
 

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 }

VRMLMaterialDesc::~VRMLMaterialDesc void   )  [virtual]
 

Definition at line 2924 of file OSGVRMLNodeDescs.cpp.

References _pDefMat, and osg::subRefCP().

02925 {
02926     subRefCP(_pDefMat);
02927 }

osg::VRMLMaterialDesc::VRMLMaterialDesc const VRMLMaterialDesc source  )  [private]
 


Member Function Documentation

void VRMLMaterialDesc::init const Char8 szName  )  [virtual]
 

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 }

void VRMLMaterialDesc::reset void   )  [virtual]
 

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().

MaterialPtr VRMLMaterialDesc::getDefaultMaterial void   )  [virtual]
 

Definition at line 2952 of file OSGVRMLNodeDescs.cpp.

References _pDefMat.

Referenced by osg::VRMLAppearanceDesc::endNode(), and osg::VRMLShapeDesc::endNode().

02953 {
02954     return _pDefMat;
02955 }

bool VRMLMaterialDesc::prototypeAddField const Char8 szFieldType,
const UInt32  uiFieldTypeId,
const Char8 szFieldName
[virtual]
 

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 }

void VRMLMaterialDesc::endProtoInterface void   )  [virtual]
 

Reimplemented from osg::VRMLNodeDesc.

Definition at line 3021 of file OSGVRMLNodeDescs.cpp.

References _defaultAmbientIntensity, _defaultDiffuseColor, _defaultEmissiveColor, _defaultShininess, _defaultSpecularColor, _defaultTransparency, _pDefMat, osg::addRefCP(), osg::MaterialChunkBase::create(), osg::ChunkMaterialBase::create(), osg::SField< FieldTypeT, fieldNameSpace >::getValue(), and osg::Color4< ValueTypeT >::setValuesRGBA().

03022 {
03023     Color4f          cCol;
03024     MaterialChunkPtr pMatChunk;
03025 
03026     cCol.setValuesRGBA(_defaultDiffuseColor    .getValue().red() *
03027                        _defaultAmbientIntensity.getValue(),
03028                        _defaultDiffuseColor    .getValue().green() *
03029                        _defaultAmbientIntensity.getValue(),
03030                        _defaultDiffuseColor    .getValue().blue() *
03031                        _defaultAmbientIntensity.getValue(),
03032                        1.f - _defaultTransparency    .getValue());
03033 
03034     _pDefMat = ChunkMaterial::create();
03035     addRefCP(_pDefMat);
03036 
03037     pMatChunk = MaterialChunk::create();
03038 
03039     pMatChunk->setAmbient(cCol);
03040 
03041     cCol.setValuesRGBA   (_defaultDiffuseColor.getValue()[0],
03042                           _defaultDiffuseColor.getValue()[1],
03043                           _defaultDiffuseColor.getValue()[2],
03044                           1.f - _defaultTransparency.getValue());
03045 
03046     pMatChunk->setDiffuse(cCol);
03047 
03048     cCol.setValuesRGBA    (_defaultSpecularColor.getValue()[0],
03049                            _defaultSpecularColor.getValue()[1],
03050                            _defaultSpecularColor.getValue()[2],
03051                            1.f - _defaultTransparency.getValue());
03052     pMatChunk->setSpecular(cCol);
03053 
03054     pMatChunk->setShininess(_defaultShininess.getValue() * 128.f);
03055 
03056     cCol.setValuesRGBA    (_defaultEmissiveColor.getValue()[0],
03057                            _defaultEmissiveColor.getValue()[1],
03058                            _defaultEmissiveColor.getValue()[2],
03059                            1.f - _defaultTransparency.getValue());
03060     pMatChunk->setEmission(cCol);
03061 
03062     _pDefMat->addChunk(pMatChunk);
03063 }

void VRMLMaterialDesc::getFieldAndDesc FieldContainerPtr  pFC,
const Char8 szFieldname,
Field *&  pField,
const FieldDescription *&  pDesc
[virtual]
 

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 }

FieldContainerPtr VRMLMaterialDesc::beginNode const Char8 szTypename,
const Char8 szName,
FieldContainerPtr  pCurrentFC
[virtual]
 

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 }

void VRMLMaterialDesc::endNode FieldContainerPtr   )  [virtual]
 

Reimplemented from osg::VRMLNodeDesc.

Definition at line 3114 of file OSGVRMLNodeDescs.cpp.

References _ambientIntensity, _diffuseColor, _emissiveColor, _pMat, _shininess, _specularColor, _transparency, osg::beginEditCP(), osg::endEditCP(), osg::SField< FieldTypeT, fieldNameSpace >::getValue(), osg::NullFC, and osg::Color4< ValueTypeT >::setValuesRGBA().

03115 {
03116     if(_pMat != NullFC)
03117     {
03118         Color4f cCol;
03119 
03120         cCol.setValuesRGBA (_diffuseColor    .getValue().red() *
03121                             _ambientIntensity.getValue(),
03122                             _diffuseColor    .getValue().green() *
03123                             _ambientIntensity.getValue(),
03124                             _diffuseColor    .getValue().blue() *
03125                             _ambientIntensity.getValue(),
03126                             1.f - _transparency.getValue());
03127 
03128         beginEditCP(_pMat);
03129 
03130         _pMat->setAmbient  (cCol);
03131 
03132         cCol.setValuesRGBA (_diffuseColor.getValue()[0],
03133                             _diffuseColor.getValue()[1],
03134                             _diffuseColor.getValue()[2],
03135                             1.f - _transparency.getValue());
03136         _pMat->setDiffuse  (cCol);
03137 
03138         cCol.setValuesRGBA (_specularColor.getValue()[0],
03139                             _specularColor.getValue()[1],
03140                             _specularColor.getValue()[2],
03141                             1.f - _transparency.getValue());
03142         _pMat->setSpecular (cCol);
03143 
03144         _pMat->setShininess(_shininess.getValue() * 128.f );
03145 
03146         cCol.setValuesRGBA (_emissiveColor.getValue()[0],
03147                             _emissiveColor.getValue()[1],
03148                             _emissiveColor.getValue()[2],
03149                             1.f - _transparency.getValue());
03150         _pMat->setEmission (cCol);
03151 
03152         endEditCP(_pMat);
03153     }
03154 }

void VRMLMaterialDesc::dump const Char8 szNodeName  )  [virtual]
 

Reimplemented from osg::VRMLNodeDesc.

Definition at line 3159 of file OSGVRMLNodeDescs.cpp.

03160 {
03161 }

void osg::VRMLMaterialDesc::operator= const VRMLMaterialDesc source  )  [private]
 

UInt32 VRMLNodeDesc::getIndent void   )  [static, inherited]
 

Definition at line 128 of file OSGVRMLNodeDescs.cpp.

References osg::VRMLNodeDesc::_uiIndent.

Referenced by osg::VRMLViewpointDesc::beginNode(), osg::VRMLInlineDesc::beginNode(), osg::VRMLGroupDesc::beginNode(), osg::VRMLSwitchDesc::beginNode(), osg::VRMLLODDesc::beginNode(), osg::VRMLPixelTextureDesc::beginNode(), osg::VRMLImageTextureDesc::beginNode(), osg::VRMLTextureTransformDesc::beginNode(), osg::VRMLAppearanceDesc::beginNode(), osg::VRMLGeometryPointSetDesc::beginNode(), osg::VRMLGeometryDesc::beginNode(), osg::VRMLShapeDesc::beginNode(), osg::VRMLFile::beginNode(), osg::VRMLFile::endField(), osg::VRMLViewpointDesc::endNode(), osg::VRMLInlineDesc::endNode(), osg::VRMLExtrusionDesc::endNode(), osg::VRMLGroupDesc::endNode(), osg::VRMLSwitchDesc::endNode(), osg::VRMLLODDesc::endNode(), osg::VRMLPixelTextureDesc::endNode(), osg::VRMLImageTextureDesc::endNode(), osg::VRMLTextureTransformDesc::endNode(), osg::VRMLAppearanceDesc::endNode(), osg::VRMLGeometryObjectDesc::endNode(), osg::VRMLGeometryPointSetDesc::endNode(), osg::VRMLGeometryDesc::endNode(), osg::VRMLShapeDesc::endNode(), osg::VRMLFile::endNode(), osg::VRMLNodeDesc::getField(), osg::VRMLViewpointDesc::getFieldAndDesc(), osg::VRMLInlineDesc::getFieldAndDesc(), osg::VRMLExtrusionDesc::getFieldAndDesc(), osg::VRMLGroupDesc::getFieldAndDesc(), osg::VRMLSwitchDesc::getFieldAndDesc(), osg::VRMLLODDesc::getFieldAndDesc(), osg::VRMLAppearanceDesc::getFieldAndDesc(), osg::VRMLGeometryObjectDesc::getFieldAndDesc(), osg::VRMLGeometryPartDesc::getFieldAndDesc(), osg::VRMLGeometryPointSetDesc::getFieldAndDesc(), osg::VRMLGeometryDesc::getFieldAndDesc(), osg::VRMLShapeDesc::getFieldAndDesc(), osg::VRMLNodeDesc::getFieldAndDesc(), osg::VRMLFile::getFieldType(), osg::VRMLInlineDesc::init(), osg::VRMLExtrusionDesc::init(), osg::VRMLGroupDesc::init(), osg::VRMLSwitchDesc::init(), osg::VRMLLODDesc::init(), osg::VRMLPixelTextureDesc::init(), osg::VRMLImageTextureDesc::init(), osg::VRMLTextureTransformDesc::init(), init(), osg::VRMLAppearanceDesc::init(), osg::VRMLGeometryObjectDesc::init(), osg::VRMLGeometryPartDesc::init(), osg::VRMLGeometryPointSetDesc::init(), osg::VRMLGeometryDesc::init(), osg::VRMLShapeDesc::init(), osg::VRMLPixelTextureDesc::prototypeAddField(), osg::VRMLImageTextureDesc::prototypeAddField(), osg::VRMLTextureTransformDesc::prototypeAddField(), prototypeAddField(), osg::VRMLGeometryPartDesc::prototypeAddField(), osg::VRMLGeometryPointSetDesc::prototypeAddField(), osg::VRMLGeometryDesc::prototypeAddField(), osg::VRMLShapeDesc::prototypeAddField(), osg::VRMLNodeDesc::prototypeAddField(), osg::VRMLFile::setContainerFieldValue(), and osg::VRMLFile::use().

00129 {
00130     return _uiIndent;
00131 }

void VRMLNodeDesc::incIndent void   )  [static, inherited]
 

Definition at line 133 of file OSGVRMLNodeDescs.cpp.

References osg::VRMLNodeDesc::_uiIndent.

Referenced by osg::VRMLViewpointDesc::beginNode(), osg::VRMLInlineDesc::beginNode(), osg::VRMLGroupDesc::beginNode(), osg::VRMLSwitchDesc::beginNode(), osg::VRMLLODDesc::beginNode(), osg::VRMLPixelTextureDesc::beginNode(), osg::VRMLImageTextureDesc::beginNode(), osg::VRMLTextureTransformDesc::beginNode(), osg::VRMLAppearanceDesc::beginNode(), osg::VRMLGeometryPointSetDesc::beginNode(), osg::VRMLGeometryDesc::beginNode(), osg::VRMLShapeDesc::beginNode(), osg::VRMLFile::beginNode(), osg::VRMLNodeDesc::getField(), osg::VRMLInlineDesc::getFieldAndDesc(), osg::VRMLExtrusionDesc::getFieldAndDesc(), osg::VRMLGroupDesc::getFieldAndDesc(), osg::VRMLSwitchDesc::getFieldAndDesc(), osg::VRMLLODDesc::getFieldAndDesc(), osg::VRMLAppearanceDesc::getFieldAndDesc(), osg::VRMLGeometryObjectDesc::getFieldAndDesc(), osg::VRMLGeometryPartDesc::getFieldAndDesc(), osg::VRMLShapeDesc::getFieldAndDesc(), osg::VRMLNodeDesc::getFieldAndDesc(), osg::VRMLShapeDesc::prototypeAddField(), and osg::VRMLFile::use().

00134 {
00135     _uiIndent += 4;
00136 }

void VRMLNodeDesc::decIndent void   )  [static, inherited]
 

Definition at line 138 of file OSGVRMLNodeDescs.cpp.

References osg::VRMLNodeDesc::_uiIndent, and PWARNING.

Referenced by osg::VRMLFile::endField(), osg::VRMLViewpointDesc::endNode(), osg::VRMLInlineDesc::endNode(), osg::VRMLGroupDesc::endNode(), osg::VRMLSwitchDesc::endNode(), osg::VRMLLODDesc::endNode(), osg::VRMLPixelTextureDesc::endNode(), osg::VRMLImageTextureDesc::endNode(), osg::VRMLTextureTransformDesc::endNode(), osg::VRMLAppearanceDesc::endNode(), osg::VRMLGeometryPointSetDesc::endNode(), osg::VRMLGeometryDesc::endNode(), osg::VRMLShapeDesc::endNode(), osg::VRMLFile::endNode(), osg::VRMLNodeDesc::getField(), osg::VRMLInlineDesc::getFieldAndDesc(), osg::VRMLExtrusionDesc::getFieldAndDesc(), osg::VRMLGroupDesc::getFieldAndDesc(), osg::VRMLSwitchDesc::getFieldAndDesc(), osg::VRMLLODDesc::getFieldAndDesc(), osg::VRMLAppearanceDesc::getFieldAndDesc(), osg::VRMLGeometryObjectDesc::getFieldAndDesc(), osg::VRMLGeometryPartDesc::getFieldAndDesc(), osg::VRMLShapeDesc::getFieldAndDesc(), osg::VRMLNodeDesc::getFieldAndDesc(), osg::VRMLShapeDesc::prototypeAddField(), and osg::VRMLFile::use().

00139 {
00140     if(_uiIndent < 4)
00141     {
00142         PWARNING << "Indent smaller 4 decremented" << std::endl;
00143 
00144         _uiIndent = 4;
00145     }
00146 
00147     _uiIndent -= 4;
00148 }

void VRMLNodeDesc::resetIndent void   )  [static, inherited]
 

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 }

void VRMLNodeDesc::setOnEndSave const Char8 szName  )  [virtual, inherited]
 

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 }

void VRMLNodeDesc::clearOnEndSave void   )  [virtual, inherited]
 

Definition at line 215 of file OSGVRMLNodeDescs.cpp.

References osg::VRMLNodeDesc::_bSaveOnEnd.

Referenced by osg::VRMLFile::endNode().

00216 {
00217     _bSaveOnEnd = false;
00218 }

bool VRMLNodeDesc::getOnEndSave void   )  [virtual, inherited]
 

Definition at line 220 of file OSGVRMLNodeDescs.cpp.

References osg::VRMLNodeDesc::_bSaveOnEnd.

Referenced by osg::VRMLFile::endNode().

00221 {
00222     return _bSaveOnEnd;
00223 }

const Char8 * VRMLNodeDesc::getSavename void   )  [virtual, inherited]
 

Definition at line 225 of file OSGVRMLNodeDescs.cpp.

References osg::VRMLNodeDesc::_szCurrentName.

Referenced by osg::VRMLFile::endNode().

00226 {
00227     return _szCurrentName.c_str();
00228 }

FieldContainerPtr VRMLNodeDesc::getSaveFieldContainer void   )  [virtual, inherited]
 

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 }

Field * VRMLNodeDesc::getField const Char8 szFieldname  )  [virtual, inherited]
 

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 }

Field * VRMLNodeDesc::getField FieldContainerPtr  pFC1,
FieldContainerPtr  pFC2,
GenericAttPtr  pGenAtt,
const Char8 szFieldname
[protected, inherited]
 

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 }

void VRMLNodeDesc::prototypeAddFieldValue const Char8 szFieldVal  )  [virtual, inherited]
 

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 }

void VRMLNodeDesc::addFieldValue Field pField,
const Char8 szFieldVal
[virtual, inherited]
 

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 }

bool VRMLNodeDesc::use FieldContainerPtr   )  [virtual, inherited]
 

Reimplemented in osg::VRMLAppearanceDesc.

Definition at line 557 of file OSGVRMLNodeDescs.cpp.

Referenced by osg::VRMLFile::use().

00558 {
00559     return false;
00560 }


Member Data Documentation

* SFReal32 osg::VRMLMaterialDesc::_defaultAmbientIntensity [protected]
 

Definition at line 980 of file OSGVRMLNodeDescs.h.

Referenced by endProtoInterface(), prototypeAddField(), and reset().

SFColor3f osg::VRMLMaterialDesc::_defaultDiffuseColor [protected]
 

Definition at line 981 of file OSGVRMLNodeDescs.h.

Referenced by endProtoInterface(), prototypeAddField(), and reset().

SFColor3f osg::VRMLMaterialDesc::_defaultEmissiveColor [protected]
 

Definition at line 982 of file OSGVRMLNodeDescs.h.

Referenced by endProtoInterface(), prototypeAddField(), and reset().

SFReal32 osg::VRMLMaterialDesc::_defaultShininess [protected]
 

Definition at line 983 of file OSGVRMLNodeDescs.h.

Referenced by endProtoInterface(), prototypeAddField(), and reset().

SFColor3f osg::VRMLMaterialDesc::_defaultSpecularColor [protected]
 

Definition at line 984 of file OSGVRMLNodeDescs.h.

Referenced by endProtoInterface(), prototypeAddField(), and reset().

SFReal32 osg::VRMLMaterialDesc::_defaultTransparency [protected]
 

Definition at line 985 of file OSGVRMLNodeDescs.h.

Referenced by