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

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

VRML Appearance Desc. More...

#include <OSGVRMLNodeDescs.h>

Inheritance diagram for osg::VRMLAppearanceDesc:

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
VRMLAppearanceDesc (void)
Destructor
*virtual ~VRMLAppearanceDesc (void)
Helper
*virtual void init (const Char8 *szName)
virtual void setMaterialDesc (VRMLMaterialDesc *pMaterialDesc)
virtual FieldContainerPtr getSaveFieldContainer (void)
Field
*virtual bool prototypeAddField (const Char8 *szFieldType, const UInt32 uiFieldTypeId, const Char8 *szFieldName)
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 bool use (FieldContainerPtr pFC)
Dump
*virtual void dump (const Char8 *szNodeName)
Helper
virtual void reset (void)
virtual void setOnEndSave (const Char8 *szName)
virtual void clearOnEndSave (void)
virtual bool getOnEndSave (void)
virtual const Char8getSavename (void)
Field
*virtual FieldgetField (const Char8 *szFieldname)
Prototypes
virtual void prototypeAddFieldValue (const Char8 *szFieldVal)
virtual void endProtoInterface (void)
FieldValue
*virtual void addFieldValue (Field *pField, const Char8 *szFieldVal)

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
*VRMLMaterialDesc_pMaterialDesc

Private Types

typedef VRMLNodeDesc Inherited

Private Member Functions

 VRMLAppearanceDesc (const VRMLAppearanceDesc &source)
 prohibit default function (move to 'public' if needed)
void operator= (const VRMLAppearanceDesc &source)
 prohibit default function (move to 'public' if needed)

Detailed Description

VRML Appearance description

Definition at line 810 of file OSGVRMLNodeDescs.h.


Member Typedef Documentation

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

Definition at line 893 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

VRMLAppearanceDesc::VRMLAppearanceDesc void   ) 
 

Definition at line 2594 of file OSGVRMLNodeDescs.cpp.

02594                                            :
02595     Inherited         (),
02596 
02597     _pMaterialDesc    (NULL)
02598 {
02599 }

VRMLAppearanceDesc::~VRMLAppearanceDesc void   )  [virtual]
 

Definition at line 2604 of file OSGVRMLNodeDescs.cpp.

02605 {
02606 }

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


Member Function Documentation

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

Reimplemented from osg::VRMLNodeDesc.

Definition at line 2611 of file OSGVRMLNodeDescs.cpp.

References osg::VRMLNodeDesc::_pGenAtt, osg::VRMLNodeDesc::_pNodeProto, osg::addRefCP(), osg::DynFieldAttachment< AttachmentDescT >::create(), osg::ChunkMaterialBase::create(), osg::VRMLNodeDesc::getIndent(), osg::indentLog(), and PINFO.

02612 {
02613 #ifdef OSG_DEBUG_VRML
02614     indentLog(getIndent(), PINFO);
02615     PINFO << "ApperanceDesc::init : " << szName << std::endl;
02616 #endif
02617 
02618     _pNodeProto = ChunkMaterial::create();
02619     addRefCP(_pNodeProto);
02620 
02621     _pGenAtt    = GenericAtt::create();
02622     _pGenAtt->setInternal(true);
02623 }

void VRMLAppearanceDesc::setMaterialDesc VRMLMaterialDesc pMaterialDesc  )  [virtual]
 

Definition at line 2625 of file OSGVRMLNodeDescs.cpp.

References _pMaterialDesc.

02626 {
02627     _pMaterialDesc = pMaterialDesc;
02628 }

FieldContainerPtr VRMLAppearanceDesc::getSaveFieldContainer void   )  [virtual]
 

Reimplemented from osg::VRMLNodeDesc.

Definition at line 2630 of file OSGVRMLNodeDescs.cpp.

References osg::NullFC.

02631 {
02632     return NullFC;
02633 }

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

Reimplemented from osg::VRMLNodeDesc.

Definition at line 2638 of file OSGVRMLNodeDescs.cpp.

References osg::VRMLNodeDesc::_pCurrField, osg::VRMLNodeDesc::prototypeAddField(), and osg::stringcasecmp().

02641 {
02642     _pCurrField = NULL;
02643 
02644     if(szFieldname == NULL)
02645         return false;
02646 
02647     if(stringcasecmp("material", szFieldname) == 0)
02648     {
02649         return true;
02650     }
02651     else if(stringcasecmp("texture", szFieldname) == 0)
02652     {
02653         return true;
02654     }
02655     else if(stringcasecmp("textureTransform", szFieldname) == 0)
02656     {
02657         return true;
02658     }
02659     else
02660     {
02661         return VRMLNodeDesc::prototypeAddField(szFieldType,
02662                                                uiFieldTypeId,
02663                                                szFieldname);
02664     }
02665 }

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

Reimplemented from osg::VRMLNodeDesc.

Definition at line 2667 of file OSGVRMLNodeDescs.cpp.

References osg::VRMLNodeDesc::_pGenAtt, osg::VRMLNodeDesc::decIndent(), osg::VRMLNodeDesc::getFieldAndDesc(), osg::VRMLNodeDesc::getIndent(), osg::VRMLNodeDesc::incIndent(), osg::indentLog(), osg::NullFC, PINFO, and osg::stringcasecmp().

02672 {
02673 
02674 #ifdef OSG_DEBUG_VRML
02675     indentLog(getIndent(), PINFO);
02676     PINFO << "VRMLAppearanceDesc::getFieldAndDesc : looking for "
02677           << szFieldname
02678           << std::endl;
02679 #endif
02680 
02681     if(pFC == NullFC)
02682         return;
02683 
02684     if(szFieldname == NULL)
02685         return;
02686 
02687     incIndent();
02688 
02689     if(stringcasecmp("material", szFieldname) == 0)
02690     {
02691 #ifdef OSG_DEBUG_VRML
02692         indentLog(getIndent(), PINFO);
02693         PINFO << "VRMLAppearanceDesc::getFieldAndDesc : request internal "
02694               << szFieldname
02695               << std::endl;
02696 #endif
02697 
02698         pField = pFC->getField("chunks");
02699 
02700         if(pField != NULL)
02701             pDesc = pFC->getType().findFieldDescription("chunks");
02702     }
02703     else if(stringcasecmp("texture", szFieldname) == 0)
02704     {
02705 #ifdef OSG_DEBUG_VRML
02706         indentLog(getIndent(), PINFO);
02707         PINFO << "VRMLAppearanceDesc::getFieldAndDesc : request internal "
02708               << szFieldname
02709               << std::endl;
02710 #endif
02711 
02712         pField = pFC->getField("chunks");
02713 
02714         if(pField != NULL)
02715             pDesc = pFC->getType().findFieldDescription("chunks");
02716     }
02717     else if(stringcasecmp("textureTransform", szFieldname) == 0)
02718     {
02719 #ifdef OSG_DEBUG_VRML
02720         indentLog(getIndent(), PINFO);
02721         PINFO << "VRMLAppearanceDesc::getFieldAndDesc : request internal "
02722               << szFieldname
02723               << std::endl;
02724 #endif
02725 
02726         pField = pFC->getField("chunks");
02727 
02728         if(pField != NULL)
02729             pDesc = pFC->getType().findFieldDescription("chunks");
02730     }
02731     else
02732     {
02733         Inherited::getFieldAndDesc(_pGenAtt,
02734                                    szFieldname,
02735                                    pField,
02736                                    pDesc);
02737     }
02738 
02739 #ifdef OSG_DEBUG_VRML
02740     decIndent();
02741 #endif
02742 }

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

Reimplemented from osg::VRMLNodeDesc.

Definition at line 2747 of file OSGVRMLNodeDescs.cpp.

References osg::VRMLNodeDesc::_pNodeProto, osg::VRMLNodeDesc::getIndent(), osg::VRMLNodeDesc::incIndent(), osg::indentLog(), osg::NullFC, and PINFO.

02751 {
02752     FieldContainerPtr returnValue = NullFC;
02753 
02754     returnValue = _pNodeProto->shallowCopy();
02755 
02756 #ifdef OSG_DEBUG_VRML
02757     indentLog(getIndent(), PINFO);
02758     PINFO << "Begin Appearance " << &(*returnValue) << std::endl;
02759 
02760     incIndent();
02761 #endif
02762 
02763     return returnValue;
02764 }

void VRMLAppearanceDesc::endNode FieldContainerPtr   )  [virtual]
 

Reimplemented from osg::VRMLNodeDesc.

Definition at line 2766 of file OSGVRMLNodeDescs.cpp.

References _pMaterialDesc, osg::beginEditCP(), osg::ChunkMaterialBase::ChunksFieldMask, osg::AttachmentPtr::dcast(), osg::AttachmentContainerPtr::dcast(), osg::VRMLNodeDesc::decIndent(), osg::BlendChunkBase::DestFactorFieldMask, osg::endEditCP(), osg::TextureChunkBase::getClassType(), osg::VRMLMaterialDesc::getDefaultMaterial(), osg::VRMLNodeDesc::getIndent(), osg::indentLog(), osg::NullFC, PINFO, PWARNING, and osg::BlendChunkBase::SrcFactorFieldMask.

02767 {
02768     if(pFC != NullFC)
02769     {
02770         ChunkMaterialPtr pChunkMat = ChunkMaterialPtr::dcast(pFC);
02771 
02772         if(pChunkMat != NullFC)
02773         {
02774             StateChunkPtr cp = pChunkMat->find(TextureChunk::getClassType());
02775             
02776             TextureChunkPtr tex = NullFC;
02777             
02778             if(cp != NullFC)
02779                 tex = TextureChunkPtr::dcast(cp);
02780             
02781             if (pChunkMat->isTransparent() == true ||
02782                 (tex != NullFC && tex->getImage() != NullFC && 
02783                  tex->getImage()->hasAlphaChannel()
02784                ))
02785             {
02786                 BlendChunkPtr pBlendChunk = OSG::BlendChunk::create();
02787 
02788                 beginEditCP(pBlendChunk, BlendChunk::SrcFactorFieldMask |
02789                                          BlendChunk::DestFactorFieldMask);
02790                 {
02791                     pBlendChunk->setSrcFactor (GL_SRC_ALPHA);
02792                     pBlendChunk->setDestFactor(GL_ONE_MINUS_SRC_ALPHA);
02793                 }
02794                 endEditCP(pBlendChunk, BlendChunk::SrcFactorFieldMask |
02795                                        BlendChunk::DestFactorFieldMask);
02796 
02797                 beginEditCP(pChunkMat, ChunkMaterial::ChunksFieldMask);
02798                 {
02799                     pChunkMat->addChunk(pBlendChunk);
02800                 }
02801                 endEditCP  (pChunkMat, ChunkMaterial::ChunksFieldMask);
02802             }
02803         }
02804     }
02805 
02806 #if 0
02807             TextureChunkPtr pTexture =
02808                 TextureChunkPtr::dcast(_sfTexture.getValue());
02809 
02810             if(pChunkMat != NullFC)
02811             {
02812                 if(pTexture != NullFC)
02813                 {
02814                     beginEditCP(pChunkMat);
02815                     {
02816                         pChunkMat->addChunk(pTexture);
02817                     }
02818                     endEditCP(pChunkMat);
02819                 }
02820             }
02821             else
02822             {
02823                 if(pTexture != NullFC)
02824                 {
02825                     FieldContainerPtr pMat =
02826                         _pMaterialDesc->getDefaultMaterial()->shallowCopy();
02827 
02828                     ChunkMaterialPtr pChunkMat =
02829                         ChunkMaterialPtr::dcast(pMat);
02830 
02831                     if(pChunkMat != NullFC)
02832                     {
02833                         if(pTexture != NullFC)
02834                         {
02835                             beginEditCP(pChunkMat);
02836                             {
02837                                 pChunkMat->addChunk(pTexture);
02838                             }
02839                             endEditCP(pChunkMat);
02840                         }
02841 
02842                         beginEditCP(pMatGroup);
02843                         {
02844                             pMatGroup->setMaterial(pChunkMat);
02845                         }
02846                         endEditCP(pMatGroup);
02847                     }
02848                 }
02849                 else
02850                 {
02851                     PWARNING << "No material, adding default" << std::endl;
02852                     beginEditCP(pMatGroup);
02853                     {
02854                         pMatGroup->setMaterial(
02855                               _pMaterialDesc->getDefaultMaterial());
02856                     }
02857                     endEditCP(pMatGroup);
02858                 }
02859     }
02860 #endif
02861 
02862 #ifdef OSG_DEBUG_VRML
02863     decIndent();
02864 
02865     indentLog(getIndent(), PINFO);
02866     PINFO << "End Appearance " <<  std::endl;
02867 #endif
02868 }

bool VRMLAppearanceDesc::use FieldContainerPtr  pFC  )  [virtual]
 

Reimplemented from osg::VRMLNodeDesc.

Definition at line 2873 of file OSGVRMLNodeDescs.cpp.

02874 {
02875     return false;
02876 }

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

Reimplemented from osg::VRMLNodeDesc.

Definition at line 2881 of file OSGVRMLNodeDescs.cpp.

02882 {
02883 }

void osg::VRMLAppearanceDesc::operator= const VRMLAppearanceDesc 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(), 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(), 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(), 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(), osg::VRMLMaterialDesc::init(), 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(), osg::VRMLMaterialDesc::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(), 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(), 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(), 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(), 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::reset void   )  [virtual, inherited]
 

Reimplemented in osg::VRMLMaterialDesc, osg::VRMLTextureTransformDesc, osg::VRMLImageTextureDesc, osg::VRMLPixelTextureDesc, and osg::VRMLViewpointDesc.

Definition at line 205 of file OSGVRMLNodeDescs.cpp.

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

00206 {
00207 }

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 }

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::endProtoInterface void   )  [virtual, inherited]
 

Reimplemented in osg::VRMLMaterialDesc, osg::VRMLTextureTransformDesc, osg::VRMLImageTextureDesc, osg::VRMLPixelTextureDesc, osg::VRMLLODDesc, osg::VRMLSwitchDesc, osg::VRMLGroupDesc, osg::VRMLExtrusionDesc, osg::VRMLInlineDesc, and osg::VRMLViewpointDesc.

Definition at line 482 of file OSGVRMLNodeDescs.cpp.

00483 {
00484 }

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 }


Member Data Documentation

* VRMLMaterialDesc* osg::VRMLAppearanceDesc::_pMaterialDesc [protected]
 

Definition at line 887 of file OSGVRMLNodeDescs.h.

Referenced by endNode(), and setMaterialDesc().

UInt32 VRMLNodeDesc::_uiIndent = 0 [static, protected, inherited]
 

Definition at line 123 of file OSGVRMLNodeDescs.cpp.

Referenced by osg::VRMLNodeDesc::decIndent(), osg::VRMLNodeDesc::getIndent(), osg::VRMLNodeDesc::incIndent(), and osg::VRMLNodeDesc::resetIndent().

FieldNameTypeHash osg::VRMLNodeDesc::_mFieldTypes [protected, inherited]
 

Definition at line 307 of file OSGVRMLNodeDescs.h.

GenericAttPtr osg::VRMLNodeDesc::_pGenAtt [protected, inherited]
 

Definition at line 309 of file OSGVRMLNodeDescs.h.

Referenced by osg::VRMLViewpointDesc::beginNode(), osg::VRMLInlineDesc::beginNode(), osg::VRMLExtrusionDesc::beginNode(), osg::VRMLGroupDesc::beginNode(), osg::VRMLSwitchDesc::beginNode(), osg::VRMLLODDesc::beginNode(), osg::VRMLGeometryObjectDesc::beginNode(), osg::VRMLGeometryPointSetDesc::beginNode(), osg::VRMLGeometryDesc::beginNode(), osg::VRMLNodeDesc::beginNode(), osg::VRMLNodeDesc::dump(), osg::VRMLNodeDesc::getField(), getFieldAndDesc(), osg::VRMLViewpointDesc::init(), osg::VRMLInlineDesc::init(), osg::VRMLExtrusionDesc::init(), osg::VRMLGroupDesc::init(), osg::VRMLSwitchDesc::init(), osg::VRMLLODDesc::init(), init(), osg::VRMLGeometryObjectDesc::init(), osg::VRMLGeometryPartDesc::init(), osg::VRMLGeometryPointSetDesc::init(), osg::VRMLGeometryDesc::init(), osg::VRMLShapeDesc::init(), osg::VRMLNodeDesc::init(), and osg::VRMLNodeDesc::prototypeAddField().

FieldContainerPtr osg::VRMLNodeDesc::_pNodeProto [protected, inherited]
 

Definition at line 311 of file OSGVRMLNodeDescs.h.

Referenced by osg::VRMLViewpointDesc::beginNode(), osg::VRMLInlineDesc::beginNode(), osg::VRMLExtrusionDesc::beginNode(), osg::VRMLGroupDesc::beginNode(), osg::VRMLSwitchDesc::beginNode(), osg::VRMLLODDesc::beginNode(), beginNode(), osg::VRMLGeometryObjectDesc::beginNode(), osg::VRMLGeometryPartDesc::beginNode(), osg::VRMLGeometryPointSetDesc::beginNode(), osg::VRMLGeometryDesc::beginNode(), osg::VRMLShapeDesc::beginNode(), osg::VRMLNodeDesc::beginNode(), osg::VRMLNodeDesc::dump(), osg::VRMLNodeDesc::getField(), osg::VRMLViewpointDesc::init(), osg::VRMLInlineDesc::init(), osg::VRMLExtrusionDesc::init(), osg::VRMLGroupDesc::init(), osg::VRMLSwitchDesc::init(), osg::VRMLLODDesc::init(), init(), osg::VRMLGeometryObjectDesc::init(), osg::VRMLGeometryPartDesc::init(), osg::VRMLGeometryPointSetDesc::init(), osg::VRMLGeometryDesc::init(), osg::VRMLShapeDesc::init(), osg::VRMLNodeDesc::init(), osg::VRMLShapeDesc::prototypeAddField(), and osg::VRMLNodeDesc::prototypeAddField().

FieldContainerPtr osg::VRMLNodeDesc::_pNodeCoreProto [protected, inherited]
 

Definition at line 312 of file OSGVRMLNodeDescs.h.

Referenced by osg::VRMLViewpointDesc::beginNode(), osg::VRMLInlineDesc::beginNode(), osg::VRMLGroupDesc::beginNode(), osg::VRMLSwitchDesc::beginNode(), osg::VRMLLODDesc::beginNode(), osg::VRMLGeometryPointSetDesc::beginNode(), osg::VRMLGeometryDesc::beginNode(), osg::VRMLShapeDesc::beginNode(), osg::VRMLNodeDesc::beginNode(), osg::VRMLNodeDesc::dump(), osg::VRMLNodeDesc::getField(), osg::VRMLViewpointDesc::init(), osg::VRMLInlineDesc::init(), osg::VRMLGroupDesc::init(), osg::VRMLSwitchDesc::init(), osg::VRMLLODDesc::init(), osg::VRMLGeometryPointSetDesc::init(), osg::VRMLGeometryDesc::init(), osg::VRMLShapeDesc::init(), osg::VRMLNodeDesc::init(), osg::VRMLViewpointDesc::prototypeAddField(), osg::VRMLShapeDesc::prototypeAddField(), and osg::VRMLNodeDesc::prototypeAddField().

Field* osg::VRMLNodeDesc::_pCurrField [protected, inherited]
 

Definition at line 314 of file OSGVRMLNodeDescs.h.

Referenced by osg::VRMLViewpointDesc::prototypeAddField(), osg::VRMLInlineDesc::prototypeAddField(), osg::VRMLExtrusionDesc::prototypeAddField(), osg::VRMLGroupDesc::prototypeAddField(), osg::VRMLSwitchDesc::prototypeAddField(), osg::VRMLLODDesc::prototypeAddField(), osg::VRMLPixelTextureDesc::prototypeAddField(), osg::VRMLImageTextureDesc::prototypeAddField(), osg::VRMLTextureTransformDesc::prototypeAddField(), osg::VRMLMaterialDesc::prototypeAddField(), prototypeAddField(), osg::VRMLGeometryObjectDesc::prototypeAddField(), osg::VRMLGeometryPartDesc::prototypeAddField(), osg::VRMLGeometryPointSetDesc::prototypeAddField(), osg::VRMLGeometryDesc::prototypeAddField(), osg::VRMLShapeDesc::prototypeAddField(), osg::VRMLNodeDesc::prototypeAddField(), and osg::VRMLNodeDesc::prototypeAddFieldValue().

std::string osg::VRMLNod