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

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

VRML Shape Desc. More...

#include <OSGVRMLNodeDescs.h>

Inheritance diagram for osg::VRMLShapeDesc:

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
VRMLShapeDesc (void)
Destructor
*virtual ~VRMLShapeDesc (void)
Helper
*virtual void init (const Char8 *szName)
void setMaterialDesc (VRMLMaterialDesc *pMaterialDesc)
Get
*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 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)
virtual FieldContainerPtr getSaveFieldContainer (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)
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
*VRMLMaterialDesc_pMaterialDesc

Private Types

typedef VRMLNodeDesc Inherited

Private Member Functions

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

Detailed Description

VRML Shape description

Definition at line 344 of file OSGVRMLNodeDescs.h.


Member Typedef Documentation

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

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

VRMLShapeDesc::VRMLShapeDesc void   ) 
 

Definition at line 693 of file OSGVRMLNodeDescs.cpp.

00693                                  :
00694     Inherited     (),
00695 
00696     _pMaterialDesc(NULL)
00697 {
00698 }

VRMLShapeDesc::~VRMLShapeDesc void   )  [virtual]
 

Definition at line 703 of file OSGVRMLNodeDescs.cpp.

00704 {
00705 }

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


Member Function Documentation

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

Reimplemented from osg::VRMLNodeDesc.

Definition at line 710 of file OSGVRMLNodeDescs.cpp.

References osg::VRMLNodeDesc::_pGenAtt, osg::VRMLNodeDesc::_pNodeCoreProto, osg::VRMLNodeDesc::_pNodeProto, osg::DynFieldAttachment< AttachmentDescT >::create(), osg::MaterialGroupBase::create(), osg::Node::create(), osg::VRMLNodeDesc::getIndent(), osg::indentLog(), and PINFO.

00711 {
00712 #ifdef OSG_DEBUG_VRML
00713     indentLog(getIndent(), PINFO);
00714     PINFO << "ShapeDesc::init : " << szName << std::endl;
00715 #endif
00716 
00717     _pNodeProto     = Node::create();
00718     _pNodeCoreProto = MaterialGroup::create();
00719 
00720     _pGenAtt        = GenericAtt::create();
00721     _pGenAtt->setInternal(true);
00722 }

void VRMLShapeDesc::setMaterialDesc VRMLMaterialDesc pMaterialDesc  ) 
 

Definition at line 724 of file OSGVRMLNodeDescs.cpp.

References _pMaterialDesc.

00725 {
00726     _pMaterialDesc = pMaterialDesc;
00727 }

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

Reimplemented from osg::VRMLNodeDesc.

Definition at line 732 of file OSGVRMLNodeDescs.cpp.

References osg::VRMLNodeDesc::_pCurrField, osg::VRMLNodeDesc::_pNodeCoreProto, osg::VRMLNodeDesc::_pNodeProto, osg::VRMLNodeDesc::decIndent(), osg::VRMLNodeDesc::getIndent(), osg::VRMLNodeDesc::incIndent(), osg::indentLog(), PINFO, osg::VRMLNodeDesc::prototypeAddField(), and osg::stringcasecmp().

00735 {
00736     bool returnValue = false;
00737 
00738 #ifdef OSG_DEBUG_VRML
00739     indentLog(getIndent(), PINFO);
00740     PINFO << "VRMLShapeDesc::prototypeAddField | add request : "
00741           << szFieldname
00742           << std::endl;
00743 #endif
00744 
00745     _pCurrField = NULL;
00746 
00747     if(szFieldname == NULL)
00748         return false;
00749 
00750     incIndent();
00751 
00752     if(stringcasecmp("geometry", szFieldname) == 0)
00753     {
00754         _pCurrField = _pNodeProto->getField("children");
00755         returnValue = true;
00756 
00757 #ifdef OSG_DEBUG_VRML
00758         indentLog(getIndent(), PINFO);
00759         PINFO << "VRMLShapeDesc::prototypeAddField | request internal : "
00760               << szFieldname
00761               << " "
00762               << _pCurrField
00763               << std::endl;
00764 #endif
00765     }
00766 
00767     if(stringcasecmp("appearance", szFieldname) == 0)
00768     {
00769         _pCurrField = _pNodeCoreProto->getField("material");
00770         returnValue = true;
00771 
00772 #ifdef OSG_DEBUG_VRML
00773         indentLog(getIndent(), PINFO);
00774 
00775         PINFO << "VRMLShapeDesc::prototypeAddField | request internal : "
00776               << szFieldname
00777               << " "
00778               << _pCurrField
00779               << std::endl;
00780 #endif
00781     }
00782 
00783     if(_pCurrField == NULL)
00784     {
00785         returnValue =  Inherited::prototypeAddField(szFieldType,
00786                                                     uiFieldTypeId,
00787                                                     szFieldname);
00788     }
00789 
00790 #ifdef OSG_DEBUG_VRML
00791     decIndent();
00792 #endif
00793 
00794     return returnValue;
00795 }

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

Reimplemented from osg::VRMLNodeDesc.

Definition at line 797 of file OSGVRMLNodeDescs.cpp.

References osg::NodePtr::dcast(), osg::VRMLNodeDesc::decIndent(), osg::FieldContainerType::findFieldDescription(), osg::NodePtr::getCore(), osg::FieldContainer::getField(), osg::VRMLNodeDesc::getFieldAndDesc(), osg::VRMLNodeDesc::getIndent(), osg::NodeCore::getType(), osg::VRMLNodeDesc::incIndent(), osg::indentLog(), osg::NullFC, PINFO, and osg::stringcasecmp().

00802 {
00803     if(szFieldname == NULL)
00804         return;
00805 
00806     if(pFC == NullFC)
00807         return;
00808 
00809 #ifdef OSG_DEBUG_VRML
00810     indentLog(getIndent(), PINFO);
00811     PINFO << "VRMLShapeDesc::getFieldAndDesc : looking for "
00812           << szFieldname
00813           << std::endl;
00814 
00815     incIndent();
00816 #endif
00817 
00818     if(stringcasecmp("geometry", szFieldname) == 0)
00819     {
00820 #ifdef OSG_DEBUG_VRML
00821         indentLog(getIndent(), PINFO);
00822         PINFO << "VRMLShapeDesc::getFieldAndDesc : request internal "
00823               << szFieldname
00824               << std::endl;
00825 #endif
00826 
00827         pField = pFC->getField("children");
00828 
00829         if(pField != NULL)
00830             pDesc = pFC->getType().findFieldDescription("children");
00831     }
00832     else if(stringcasecmp("appearance", szFieldname) == 0)
00833     {
00834 #ifdef OSG_DEBUG_VRML
00835         indentLog(getIndent(), PINFO);
00836         PINFO << "VRMLShapeDesc::getFieldAndDesc : request internal "
00837               << szFieldname
00838               << std::endl;
00839 #endif
00840 
00841         NodePtr pNode = NodePtr::dcast(pFC);
00842 
00843         if(pNode != NullFC)
00844         {
00845             if(pNode->getCore() != NullFC)
00846             {
00847                 pField = pNode->getCore()->getField("material");
00848 
00849                 if(pField != NULL)
00850                 {
00851                     pDesc =
00852                         pNode->getCore()->getType().findFieldDescription(
00853                             "material");
00854                 }
00855             }
00856         }
00857         else
00858         {
00859             VRMLNodeDesc::getFieldAndDesc(pFC,
00860                                           szFieldname,
00861                                           pField,
00862                                           pDesc);
00863         }
00864     }
00865     else
00866     {
00867         VRMLNodeDesc::getFieldAndDesc(pFC,
00868                                       szFieldname,
00869                                       pField,
00870                                       pDesc);
00871     }
00872 
00873 #ifdef OSG_DEBUG_VRML
00874     decIndent();
00875 #endif
00876 }

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

Reimplemented from osg::VRMLNodeDesc.

Definition at line 881 of file OSGVRMLNodeDescs.cpp.

References osg::VRMLNodeDesc::_pNodeCoreProto, osg::VRMLNodeDesc::_pNodeProto, osg::beginEditCP(), osg::Node::CoreFieldMask, osg::AttachmentContainerPtr::dcast(), osg::NodePtr::dcast(), osg::endEditCP(), osg::VRMLNodeDesc::getIndent(), osg::VRMLNodeDesc::incIndent(), osg::indentLog(), osg::NullFC, and PINFO.

00884 {
00885     NodePtr           pNode     = NullFC;
00886     NodeCorePtr       pNodeCore = NullFC;
00887 
00888     if(_pNodeProto != NullFC)
00889     {
00890         pNode = NodePtr::dcast(_pNodeProto->shallowCopy());
00891 
00892         if(_pNodeCoreProto != NullFC)
00893         {
00894             pNodeCore = NodeCorePtr::dcast(_pNodeCoreProto->shallowCopy());
00895 
00896             beginEditCP(pNode, Node::CoreFieldMask);
00897             {
00898                 pNode->setCore(pNodeCore);
00899             }
00900             endEditCP  (pNode, Node::CoreFieldMask);
00901         }
00902     }
00903 
00904 #ifdef OSG_DEBUG_VRML
00905     indentLog(getIndent(), PINFO);
00906     PINFO << "Begin Shape " << &(*pNode) << std::endl;
00907 
00908     incIndent();
00909 #endif
00910 
00911     return pNode;
00912 }

void VRMLShapeDesc::endNode FieldContainerPtr  pFC  )  [virtual]
 

Reimplemented from osg::VRMLNodeDesc.

Definition at line 914 of file OSGVRMLNodeDescs.cpp.

References _pMaterialDesc, osg::beginEditCP(), osg::Node::CoreFieldMask, osg::MaterialGroupBase::create(), osg::AttachmentContainerPtr::dcast(), osg::NodePtr::dcast(), osg::VRMLNodeDesc::decIndent(), osg::endEditCP(), osg::NodePtr::getCore(), osg::VRMLMaterialDesc::getDefaultMaterial(), osg::VRMLNodeDesc::getIndent(), osg::indentLog(), osg::NullFC, PINFO, and PWARNING.

00915 {
00916     if(pFC != NullFC)
00917     {
00918         NodePtr pNode = NodePtr::dcast(pFC);
00919 
00920         if(pNode != NullFC && pNode->getCore() == NullFC)
00921         {
00922             PWARNING << "warning empty material, using default\n" << std::endl;
00923 
00924             MaterialGroupPtr pMatGroup = MaterialGroup::create();
00925 
00926             beginEditCP(pMatGroup);
00927             {
00928                 pMatGroup->setMaterial(_pMaterialDesc->getDefaultMaterial());
00929             }
00930             endEditCP(pMatGroup);
00931 
00932             beginEditCP(pNode, Node::CoreFieldMask);
00933             {
00934                 pNode->setCore(pMatGroup);
00935             }
00936             endEditCP  (pNode, Node::CoreFieldMask);
00937         }
00938         else
00939         {
00940             MaterialGroupPtr pMatGroup;
00941 
00942             pMatGroup = MaterialGroupPtr::dcast(pNode->getCore());
00943 
00944             if(pMatGroup != NullFC)
00945             {
00946                 if(pMatGroup->getMaterial() == NullFC)
00947                 {
00948                     pMatGroup->setMaterial(
00949                         _pMaterialDesc->getDefaultMaterial());
00950                 }
00951             }
00952         }
00953     }
00954 
00955 #ifdef OSG_DEBUG_VRML
00956     decIndent();
00957 
00958     indentLog(getIndent(), PINFO);
00959     PINFO << "End Shape " << &(*pFC) << std::endl;
00960 #endif
00961 }

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

Reimplemented from osg::VRMLNodeDesc.

Definition at line 966 of file OSGVRMLNodeDescs.cpp.

00967 {
00968 }

void osg::VRMLShapeDesc::operator= const VRMLShapeDesc 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(), 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(), 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(), 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(), osg::VRMLAppearanceDesc::init(), osg::VRMLGeometryObjectDesc::init(), osg::VRMLGeometryPartDesc::init(), osg::VRMLGeometryPointSetDesc::init(), osg::VRMLGeometryDesc::init(), init(), osg::VRMLPixelTextureDesc::prototypeAddField(), osg::VRMLImageTextureDesc::prototypeAddField(), osg::VRMLTextureTransformDesc::prototypeAddField(), osg::VRMLMaterialDesc::prototypeAddField(), osg::VRMLGeometryPartDesc::prototypeAddField(), osg::VRMLGeometryPointSetDesc::prototypeAddField(), osg::VRMLGeometryDesc::prototypeAddField(), 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(), 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(), getFieldAndDesc(), osg::VRMLNodeDesc::getFieldAndDesc(), 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(), 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(), getFieldAndDesc(), osg::VRMLNodeDesc::getFieldAndDesc(), 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 }

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::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 }

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

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

Definition at line 412 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(), osg::VRMLAppearanceDesc::getFieldAndDesc(), osg::VRMLViewpointDesc::init(), osg::VRMLInlineDesc::init(), osg::VRMLExtrusionDesc::init(), osg::VRMLGroupDesc::init(), osg::VRMLSwitchDesc::init(), osg::VRMLLODDesc::init(), osg::VRMLAppearanceDesc::init(), osg::VRMLGeometryObjectDesc::init(), osg::VRMLGeometryPartDesc::init(), osg::VRMLGeometryPointSetDesc::init(), osg::VRMLGeometryDesc::init(), 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(), osg::VRMLAppearanceDesc::beginNode(), osg::VRMLGeometryObjectDesc::beginNode(), osg::VRMLGeometryPartDesc::beginNode(), osg::VRMLGeometryPointSetDesc::beginNode(), osg::VRMLGeometryDesc::beginNode(), 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(), osg::VRMLAppearanceDesc::init(), osg::VRMLGeometryObjectDesc::init(), osg::VRMLGeometryPartDesc::init(), osg::VRMLGeometryPointSetDesc::init(), osg::VRMLGeometryDesc::init(), init(), osg::VRMLNodeDesc::init(), 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(), 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(), init(), osg::VRMLNodeDesc::init(), osg::VRMLViewpointDesc::prototypeAddField(), 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(),