#include <OSGVRMLNodeDescs.h>

Member | |
| FieldNameTypeHash | _mFieldTypes |
| GenericAttPtr | _pGenAtt |
| FieldContainerPtr | _pNodeProto |
| FieldContainerPtr | _pNodeCoreProto |
| Field * | _pCurrField |
| std::string | _szCurrentName |
| bool | _bSaveOnEnd |
| static UInt32 | _uiIndent = 0 |
| Field * | getField (FieldContainerPtr pFC1, FieldContainerPtr pFC2, GenericAttPtr pGenAtt, const Char8 *szFieldname) |
Public Member Functions | |
Constructors | |
| VRMLGeometryDesc (bool bIsFaceSet) | |
Destructor | |
| virtual | ~VRMLGeometryDesc (void) |
Helper | |
| virtual void | init (const Char8 *szName) |
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) |
Field Value | |
| virtual void | addFieldValue (Field *pField, const Char8 *szFieldVal) |
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 Char8 * | getSavename (void) |
| virtual FieldContainerPtr | getSaveFieldContainer (void) |
Field | |
| virtual Field * | getField (const Char8 *szFieldname) |
Prototypes | |
| virtual void | prototypeAddFieldValue (const Char8 *szFieldVal) |
| virtual void | endProtoInterface (void) |
FieldValue | |
| virtual bool | use (FieldContainerPtr) |
Static Public Member Functions | |
Class Get | |
| static UInt32 | getIndent (void) |
| static void | incIndent (void) |
| static void | decIndent (void) |
| static void | resetIndent (void) |
Protected Types | |
| typedef std::map< const Char8 *, UInt32, LTString > | FieldNameTypeHash |
Protected Attributes | |
Member | |
| bool | _bIsFaceSet |
| bool | _bInIndex |
| UInt32 | _uiNumVertices |
| GeoPTypesPtr | _pTypeField |
| GeoPLengthsPtr | _pLengthField |
Private Types | |
| typedef VRMLNodeDesc | Inherited |
Private Member Functions | |
| VRMLGeometryDesc (const VRMLGeometryDesc &source) | |
| prohibit default function (move to 'public' if needed) | |
| void | operator= (const VRMLGeometryDesc &source) |
| prohibit default function (move to 'public' if needed) | |
Definition at line 434 of file OSGVRMLNodeDescs.h.
typedef VRMLNodeDesc osg::VRMLGeometryDesc::Inherited [private] |
Definition at line 519 of file OSGVRMLNodeDescs.h.
typedef std::map< const Char8 *, UInt32, LTString> osg::VRMLNodeDesc::FieldNameTypeHash [protected, inherited] |
Definition at line 298 of file OSGVRMLNodeDescs.h.
| VRMLGeometryDesc::VRMLGeometryDesc | ( | bool | bIsFaceSet | ) |
Definition at line 988 of file OSGVRMLNodeDescs.cpp.
00988 : 00989 Inherited (), 00990 00991 _bIsFaceSet (bIsFaceSet), 00992 00993 _bInIndex (false), 00994 _uiNumVertices(0), 00995 00996 _pTypeField (NullFC ), 00997 _pLengthField (NullFC ) 00998 { 00999 }
| VRMLGeometryDesc::~VRMLGeometryDesc | ( | void | ) | [virtual] |
| osg::VRMLGeometryDesc::VRMLGeometryDesc | ( | const VRMLGeometryDesc & | source | ) | [private] |
| void VRMLGeometryDesc::init | ( | const Char8 * | szName | ) | [virtual] |
Reimplemented from osg::VRMLNodeDesc.
Definition at line 1011 of file OSGVRMLNodeDescs.cpp.
References osg::VRMLNodeDesc::_pGenAtt, osg::VRMLNodeDesc::_pNodeCoreProto, osg::VRMLNodeDesc::_pNodeProto, osg::DynFieldAttachment< AttachmentDescT >::create(), osg::GeometryBase::create(), osg::Node::create(), osg::VRMLNodeDesc::getIndent(), osg::indentLog(), and PINFO.
01012 { 01013 #ifdef OSG_DEBUG_VRML 01014 indentLog(getIndent(), PINFO); 01015 PINFO << "GeoDesc::init : " << szName << std::endl; 01016 #endif 01017 01018 _pNodeProto = Node::create(); 01019 _pNodeCoreProto = Geometry::create(); 01020 01021 _pGenAtt = GenericAtt::create(); 01022 _pGenAtt->setInternal(true); 01023 }
| bool VRMLGeometryDesc::prototypeAddField | ( | const Char8 * | szFieldType, | |
| const UInt32 | uiFieldTypeId, | |||
| const Char8 * | szFieldName | |||
| ) | [virtual] |
Reimplemented from osg::VRMLNodeDesc.
Definition at line 1028 of file OSGVRMLNodeDescs.cpp.
References osg::VRMLNodeDesc::_pCurrField, osg::VRMLNodeDesc::getIndent(), osg::indentLog(), PINFO, osg::VRMLNodeDesc::prototypeAddField(), and osg::stringcasecmp().
01031 { 01032 bool bFound = false; 01033 01034 _pCurrField = NULL; 01035 01036 if(szFieldname == NULL) 01037 return false; 01038 01039 if(stringcasecmp("coord", szFieldname) == 0) 01040 { 01041 bFound = true; 01042 } 01043 else if(stringcasecmp("normal", szFieldname) == 0) 01044 { 01045 bFound = true; 01046 } 01047 else if(stringcasecmp("color", szFieldname) == 0) 01048 { 01049 bFound = true; 01050 } 01051 else if(stringcasecmp("texCoord", szFieldname) == 0) 01052 { 01053 bFound = true; 01054 } 01055 01056 if(bFound == true) 01057 { 01058 #ifdef OSG_DEBUG_VRML 01059 indentLog(getIndent(), PINFO); 01060 PINFO << "GeoDesc::prototypeAddField : internal " 01061 << szFieldname << std::endl; 01062 #endif 01063 01064 return true; 01065 } 01066 else 01067 { 01068 return Inherited::prototypeAddField(szFieldType, 01069 uiFieldTypeId, 01070 szFieldname); 01071 } 01072 }
| void VRMLGeometryDesc::getFieldAndDesc | ( | FieldContainerPtr | pFC, | |
| const Char8 * | szFieldname, | |||
| Field *& | pField, | |||
| const FieldDescription *& | pDesc | |||
| ) | [virtual] |
Reimplemented from osg::VRMLNodeDesc.
Definition at line 1075 of file OSGVRMLNodeDescs.cpp.
References _bInIndex, osg::AttachmentContainerPtr::dcast(), osg::NodePtr::dcast(), osg::NodePtr::getCore(), osg::VRMLNodeDesc::getFieldAndDesc(), osg::VRMLNodeDesc::getIndent(), osg::indentLog(), osg::NullFC, PINFO, PWARNING, and osg::stringcasecmp().
01080 { 01081 #ifdef OSG_DEBUG_VRML 01082 indentLog(getIndent(), PINFO); 01083 PINFO << "GeoDesc::getFieldAndDesc : request " 01084 << szFieldname 01085 << std::endl; 01086 #endif 01087 01088 if(szFieldname == NULL) 01089 return; 01090 01091 if(pFC == NullFC) 01092 return; 01093 01094 NodePtr pNode = NodePtr::dcast(pFC); 01095 01096 if(pNode == NullFC) 01097 { 01098 PWARNING << "GeoDesc::getFieldAndDesc : No Node" << std::endl; 01099 return; 01100 } 01101 01102 NodeCorePtr pNodeCore = pNode->getCore(); 01103 01104 GeometryPtr pGeo = GeometryPtr::dcast(pNodeCore); 01105 01106 if(pGeo == NullFC) 01107 { 01108 PWARNING << "GeoDesc::getFieldAndDesc : No Geo" << std::endl; 01109 return; 01110 } 01111 01112 _bInIndex = false; 01113 01114 if(stringcasecmp("coord", szFieldname) == 0) 01115 { 01116 #ifdef OSG_DEBUG_VRML 01117 indentLog(getIndent(), PINFO); 01118 PINFO << "GeoDesc::getFieldAndDesc : internal " 01119 << szFieldname << std::endl; 01120 #endif 01121 pField = pGeo->getField("positions"); 01122 01123 if(pField != NULL) 01124 pDesc = pGeo->getType().findFieldDescription("positions"); 01125 } 01126 else if(stringcasecmp("normal", szFieldname) == 0) 01127 { 01128 #ifdef OSG_DEBUG_VRML 01129 indentLog(getIndent(), PINFO); 01130 PINFO << "GeoDesc::getFieldAndDesc : internal " 01131 << szFieldname << std::endl; 01132 #endif 01133 01134 pField = pGeo->getField("normals"); 01135 01136 if(pField != NULL) 01137 pDesc = pGeo->getType().findFieldDescription("normals"); 01138 } 01139 else if(stringcasecmp("color", szFieldname) == 0) 01140 { 01141 #ifdef OSG_DEBUG_VRML 01142 indentLog(getIndent(), PINFO); 01143 PINFO << "GeoDesc::getFieldAndDesc : internal " 01144 << szFieldname << std::endl; 01145 #endif 01146 01147 pField = pGeo->getField("colors"); 01148 01149 if(pField != NULL) 01150 pDesc = pGeo->getType().findFieldDescription("colors"); 01151 } 01152 else if(stringcasecmp("texCoord", szFieldname) == 0) 01153 { 01154 #ifdef OSG_DEBUG_VRML 01155 indentLog(getIndent(), PINFO); 01156 PINFO << "GeoDesc::getFieldAndDesc : internal " 01157 << szFieldname << std::endl; 01158 #endif 01159 01160 pField = pGeo->getField("texCoords"); 01161 01162 if(pField != NULL) 01163 pDesc = pGeo->getType().findFieldDescription("texCoords"); 01164 } 01165 else 01166 { 01167 VRMLNodeDesc::getFieldAndDesc(pGeo, 01168 szFieldname, 01169 pField, 01170 pDesc); 01171 } 01172 }
| FieldContainerPtr VRMLGeometryDesc::beginNode | ( | const Char8 * | szTypename, | |
| const Char8 * | szName, | |||
| FieldContainerPtr | pCurrentFC | |||
| ) | [virtual] |
Reimplemented from osg::VRMLNodeDesc.
Definition at line 1177 of file OSGVRMLNodeDescs.cpp.
References osg::VRMLNodeDesc::_pGenAtt, osg::VRMLNodeDesc::_pNodeCoreProto, osg::VRMLNodeDesc::_pNodeProto, osg::beginEditCP(), osg::AttachmentContainerPtr::dcast(), osg::NodePtr::dcast(), osg::FCPtr< BasePtrTypeT, FieldContainerTypeT >::dcast(), osg::endEditCP(), osg::VRMLNodeDesc::getIndent(), osg::VRMLNodeDesc::incIndent(), osg::indentLog(), osg::NullFC, and PINFO.
01181 { 01182 FieldContainerPtr pFC = NullFC; 01183 NodePtr pNode = NullFC; 01184 NodeCorePtr pNodeCore = NullFC; 01185 GenericAttPtr pAtt = NullFC; 01186 01187 if(_pNodeProto != NullFC) 01188 { 01189 FieldContainerPtr pAttClone = _pGenAtt->clone(); 01190 01191 pAtt = GenericAttPtr::dcast(pAttClone); 01192 01193 if(pAtt != NullFC) 01194 { 01195 pAtt->setInternal(true); 01196 } 01197 01198 pFC = _pNodeProto->shallowCopy(); 01199 01200 pNode = NodePtr::dcast(pFC); 01201 01202 pFC = _pNodeCoreProto->shallowCopy(); 01203 01204 pNodeCore = NodeCorePtr::dcast(pFC); 01205 01206 beginEditCP(pNode); 01207 { 01208 pNode ->setCore (pNodeCore); 01209 pNodeCore->addAttachment(pAtt); 01210 } 01211 endEditCP (pNode); 01212 } 01213 01214 #ifdef OSG_DEBUG_VRML 01215 indentLog(getIndent(), PINFO); 01216 PINFO << "Begin Geo " << &(*pNode) << std::endl; 01217 01218 incIndent(); 01219 #endif 01220 01221 return pNode; 01222 }
| void VRMLGeometryDesc::endNode | ( | FieldContainerPtr | pFC | ) | [virtual] |
Reimplemented from osg::VRMLNodeDesc.
Definition at line 1224 of file OSGVRMLNodeDescs.cpp.
References _bIsFaceSet, osg::MField< FieldTypeT, fieldNameSpace >::begin(), osg::beginEditCP(), osg::calcVertexNormals(), osg::Node::CoreFieldMask, osg::GroupBase::create(), osg::createConvexPrimitives(), osg::createSharedIndex(), osg::AttachmentContainerPtr::dcast(), osg::NodePtr::dcast(), osg::VRMLNodeDesc::decIndent(), osg::MField< FieldTypeT, fieldNameSpace >::end(), osg::endEditCP(), osg::NodePtr::getCore(), osg::VRMLNodeDesc::getFieldAndDesc(), osg::VRMLNodeDesc::getIndent(), osg::SField< FieldTypeT, fieldNameSpace >::getValue(), osg::indentLog(), osg::NullFC, PINFO, PWARNING, osg::setIndexFromVRMLData(), and osg::MField< FieldTypeT, fieldNameSpace >::size().
01225 { 01226 NodePtr pNode = NullFC; 01227 GeometryPtr pGeo = NullFC; 01228 01229 if(pFC == NullFC) 01230 { 01231 return; 01232 } 01233 01234 pNode = NodePtr::dcast(pFC); 01235 01236 if(pNode == NullFC) 01237 { 01238 return; 01239 } 01240 01241 pGeo = GeometryPtr::dcast(pNode->getCore()); 01242 01243 if(pGeo == NullFC) 01244 { 01245 return; 01246 } 01247 01248 Field *pField = NULL; 01249 const FieldDescription *pDesc = NULL; 01250 01251 MFInt32 *pCoordIndex = NULL; 01252 MFInt32 *pNormalIndex = NULL; 01253 MFInt32 *pColorIndex = NULL; 01254 MFInt32 *pTexCoordIndex = NULL; 01255 SFBool *pConvex = NULL; 01256 SFBool *pCcw = NULL; 01257 SFBool *pNormalPerVertex = NULL; 01258 SFBool *pColorPerVertex = NULL; 01259 SFReal32 *pCreaseAngle = NULL; 01260 01261 Inherited::getFieldAndDesc(pFC, 01262 "coordIndex", 01263 pField, 01264 pDesc); 01265 01266 if(pField != NULL) 01267 { 01268 pCoordIndex = static_cast<MFInt32 *>(pField); 01269 } 01270 01271 Inherited::getFieldAndDesc(pFC, 01272 "normalIndex", 01273 pField, 01274 pDesc); 01275 01276 if(pField != NULL) 01277 { 01278 pNormalIndex = static_cast<MFInt32 *>(pField); 01279 } 01280 01281 Inherited::getFieldAndDesc(pFC, 01282 "colorIndex", 01283 pField, 01284 pDesc); 01285 01286 if(pField != NULL) 01287 { 01288 pColorIndex = static_cast<MFInt32 *>(pField); 01289 } 01290 01291 Inherited::getFieldAndDesc(pFC, 01292 "texCoordIndex", 01293 pField, 01294 pDesc); 01295 01296 if(pField != NULL) 01297 { 01298 pTexCoordIndex = static_cast<MFInt32 *>(pField); 01299 } 01300 01301 01302 01303 Inherited::getFieldAndDesc(pFC, 01304 "convex", 01305 pField, 01306 pDesc); 01307 01308 if(pField != NULL) 01309 { 01310 pConvex = static_cast<SFBool *>(pField); 01311 } 01312 01313 Inherited::getFieldAndDesc(pFC, 01314 "ccw", 01315 pField, 01316 pDesc); 01317 01318 if(pField != NULL) 01319 { 01320 pCcw = static_cast<SFBool *>(pField); 01321 } 01322 01323 Inherited::getFieldAndDesc(pFC, 01324 "normalPerVertex", 01325 pField, 01326 pDesc); 01327 01328 if(pField != NULL) 01329 { 01330 pNormalPerVertex = static_cast<SFBool *>(pField); 01331 } 01332 01333 Inherited::getFieldAndDesc(pFC, 01334 "colorPerVertex", 01335 pField, 01336 pDesc); 01337 01338 if(pField != NULL) 01339 { 01340 pColorPerVertex = static_cast<SFBool *>(pField); 01341 } 01342 01343 Inherited::getFieldAndDesc(pFC, 01344 "creaseAngle", 01345 pField, 01346 pDesc); 01347 01348 if(pField != NULL) 01349 { 01350 pCreaseAngle = static_cast<SFReal32 *>(pField); 01351 } 01352 01353 if(_bIsFaceSet == true) 01354 { 01355 if(pCoordIndex != NULL && 01356 pCoordIndex->size() > 2 && 01357 pNormalIndex != NULL && 01358 pColorIndex != NULL && 01359 pTexCoordIndex != NULL && 01360 pConvex != NULL && 01361 pCcw != NULL && 01362 pNormalPerVertex != NULL && 01363 pColorPerVertex != NULL && 01364 pCreaseAngle != NULL) 01365 { 01366 beginEditCP(pGeo); 01367 #ifdef OSG_DEBUG_VRML 01368 indentLog(getIndent(), PINFO); 01369 PINFO << "Geo create faceset " << &(*pNode) << std::endl; 01370 #endif 01371 01372 setIndexFromVRMLData(pGeo, 01373 pCoordIndex ->getValues(), 01374 pNormalIndex ->getValues(), 01375 pColorIndex ->getValues(), 01376 pTexCoordIndex ->getValues(), 01377 pConvex ->getValue() , 01378 pCcw ->getValue() , 01379 pNormalPerVertex->getValue() , 01380 pColorPerVertex ->getValue() , 01381 false, // create normal; not yet :) 01382 true); 01383 01384 if (pConvex->getValue() == false) 01385 createConvexPrimitives( pGeo ); 01386 01387 // TODO: Need some option _uiOptions param 01388 createSharedIndex( pGeo); 01389 01390 //if((0 != (_uiOptions & VRMLFile::CreateNormals) ) && 01391 // (pGeo->getNormals() == NullFC)) 01392 01393 if(pGeo->getNormals() == NullFC) 01394 { 01395 #ifdef OSG_DEBUG_VRML 01396 indentLog(getIndent(), PINFO); 01397 PINFO << "Geo create normals " << &(*pNode) << std::endl; 01398 #endif 01399 01400 OSG::calcVertexNormals(pGeo, pCreaseAngle->getValue()); 01401 } 01402 } 01403 else 01404 { 01405 #if 0 // What's the point of doing that? 01406 PWARNING << "Invalid geometry replaced by a group" << std::endl; 01407 01408 GroupPtr pGr = Group::create(); 01409 01410 MFNodePtr pGeoParents = pGeo->getParents (); 01411 MFNodePtr::iterator parentsIt = pGeoParents.begin(); 01412 MFNodePtr::iterator endParents = pGeoParents.end (); 01413 01414 // this makes pGeo invalid! 01415 while(parentsIt != endParents) 01416 { 01417 beginEditCP(*parentsIt, Node::CoreFieldMask); 01418 (*parentsIt)->setCore(pGr); 01419 endEditCP(*parentsIt, Node::CoreFieldMask); 01420 01421 ++parentsIt; 01422 } 01423 pGeo = NullFC; 01424 #endif 01425 } 01426 } 01427 else 01428 { 01429 std::vector<Int32> dummyVec; 01430 bool dummybool = false; 01431 01432 if(pCoordIndex != NULL && 01433 pCoordIndex->size() > 1 && 01434 pColorIndex != NULL && 01435 pColorPerVertex != NULL) 01436 { 01437 beginEditCP(pGeo); 01438 #ifdef OSG_DEBUG_VRML 01439 indentLog(getIndent(), PINFO); 01440 PINFO << "Geo create lineset " << &(*pNode) << std::endl; 01441 #endif 01442 01443 setIndexFromVRMLData(pGeo, 01444 pCoordIndex ->getValues(), 01445 dummyVec , 01446 pColorIndex ->getValues(), 01447 dummyVec , 01448 dummybool, 01449 dummybool, 01450 dummybool, 01451 pColorPerVertex->getValue() , 01452 false, // create normal; not yet :) 01453 false); 01454 } 01455 else 01456 { 01457 #if 0 // What's the point of doing that? 01458 PWARNING << "Invalid geometry replaced by a group" << std::endl; 01459 01460 GroupPtr pGr = Group::create(); 01461 01462 MFNodePtr pGeoParents = pGeo->getParents (); 01463 MFNodePtr::iterator parentsIt = pGeoParents.begin(); 01464 MFNodePtr::iterator endParents = pGeoParents.end (); 01465 01466 // this makes pGeo invalid! 01467 while(parentsIt != endParents) 01468 { 01469 beginEditCP(*parentsIt, Node::CoreFieldMask); 01470 (*parentsIt)->setCore(pGr); 01471 endEditCP(*parentsIt, Node::CoreFieldMask); 01472 01473 ++parentsIt; 01474 } 01475 pGeo = NullFC; 01476 #endif 01477 } 01478 } 01479 01480 // on invalid geometries pGeo is set to NullFC! 01481 if(pGeo != NullFC) 01482 endEditCP(pGeo); 01483 01484 #ifdef OSG_DEBUG_VRML 01485 decIndent(); 01486 01487 indentLog(getIndent(), PINFO); 01488 PINFO << "End Geo " << &(*pNode) << std::endl; 01489 #endif 01490 }
Reimplemented from osg::VRMLNodeDesc.
Definition at line 1492 of file OSGVRMLNodeDescs.cpp.
References osg::Field::pushValueByStr().
01494 { 01495 if(pField != NULL) 01496 { 01497 pField->pushValueByStr(szFieldVal); 01498 } 01499 }
| void VRMLGeometryDesc::dump | ( | const Char8 * | szNodeName | ) | [virtual] |
| void osg::VRMLGeometryDesc::operator= | ( | const VRMLGeometryDesc & | source | ) | [private] |
| UInt32 VRMLNodeDesc::getIndent | ( | void | ) | [static, inherited] |
Definition at line 128 of file OSGVRMLNodeDescs.cpp.
References osg::VRMLNodeDesc::_uiIndent.
Referenced by osg::VRMLNodeFactory< BaseT >::addFieldValue(), osg::VRMLNodeFactory< BaseT >::beginEventInDecl(), osg::VRMLNodeFactory< BaseT >::beginEventOutDecl(), 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(), beginNode(), osg::VRMLShapeDesc::beginNode(), osg::VRMLFile::beginNode(), osg::VRMLNodeFactory< BaseT >::beginProto(), 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(), endNode(), osg::VRMLShapeDesc::endNode(), osg::VRMLFile::endNode(), osg::VRMLNodeFactory< BaseT >::findNodeDesc(), 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(), 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(), osg::VRMLAppearanceDesc::init(), osg::VRMLGeometryObjectDesc::init(), osg::VRMLGeometryPartDesc::init(), osg::VRMLGeometryPointSetDesc::init(), init(), osg::VRMLShapeDesc::init(), osg::VRMLPixelTextureDesc::prototypeAddField(), osg::VRMLImageTextureDesc::prototypeAddField(), osg::VRMLTextureTransformDesc::prototypeAddField(), osg::VRMLMaterialDesc::prototypeAddField(), osg::VRMLGeometryPartDesc::prototypeAddField(), osg::VRMLGeometryPointSetDesc::prototypeAddField(), 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(), beginNode(), osg::VRMLShapeDesc::beginNode(), osg::VRMLFile::beginNode(), osg::VRMLNodeFactory< BaseT >::beginProto(), 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(), endNode(), osg::VRMLShapeDesc::endNode(), osg::VRMLFile::endNode(), osg::VRMLNodeFactory< BaseT >::endProto(), 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::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().
| 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 }
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 607 of file OSGVRMLNodeDescs.cpp.
References osg::VRMLNodeDesc::decIndent(), osg::VRMLNodeDesc::getIndent(), osg::VRMLNodeDesc::incIndent(), osg::indentLog(), osg::NullFC, and PINFO.
00611 { 00612 Field *returnValue = NULL; 00613 00614 if(szFieldname == NULL) 00615 { 00616 return returnValue; 00617 } 00618 00619 #ifdef OSG_DEBUG_VRML 00620 indentLog(getIndent(), PINFO); 00621 PINFO << "VRMLNodeDesc::getField " << std::endl; 00622 00623 incIndent(); 00624 00625 indentLog(getIndent(), PINFO); 00626 PINFO << "Trying to find field : " << szFieldname << std::endl; 00627 #endif 00628 00629 if(pFC1 != NullFC) 00630 { 00631 returnValue = pFC1->getField(szFieldname); 00632 } 00633 00634 #ifdef OSG_DEBUG_VRML 00635 incIndent(); 00636 00637 indentLog(getIndent(), PINFO); 00638 PINFO << "Got this from node : " << returnValue << std::endl; 00639 #endif 00640 00641 if(returnValue != NULL) 00642 return returnValue; 00643 00644 if(pFC2 != NullFC) 00645 { 00646 returnValue = pFC2->getField(szFieldname); 00647 00648 #ifdef OSG_DEBUG_VRML 00649 indentLog(getIndent(), PINFO); 00650 PINFO << "Got this from nodecore : " << returnValue << std::endl; 00651 #endif 00652 } 00653 else 00654 { 00655 #ifdef OSG_DEBUG_VRML 00656 indentLog(getIndent(), PINFO); 00657 PINFO << "No core to check" << std::endl; 00658 #endif 00659 } 00660 00661 00662 if(returnValue != NULL) 00663 return returnValue; 00664 00665 if(pGenAtt != NullFC) 00666 { 00667 returnValue = pGenAtt->getField(szFieldname); 00668 } 00669 00670 #ifdef OSG_DEBUG_VRML 00671 indentLog(getIndent(), PINFO); 00672 PINFO << "Got this from attachment : " << returnValue << std::endl; 00673 00674 decIndent(); 00675 decIndent(); 00676 #endif 00677 00678 return returnValue; 00679 }
| void VRMLNodeDesc::prototypeAddFieldValue | ( | const Char8 * | szFieldVal | ) | [virtual, inherited] |
Definition at line 477 of file OSGVRMLNodeDescs.cpp.
References osg::VRMLNodeDesc::_pCurrField, and osg::Field::pushValueByStr().
Referenced by osg::VRMLNodeFactory< BaseT >::addFieldValue().
00478 { 00479 if(_pCurrField != NULL) 00480 { 00481 _pCurrField->pushValueByStr(szFieldVal); 00482 } 00483 }
| 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 485 of file OSGVRMLNodeDescs.cpp.
Referenced by osg::VRMLNodeFactory< BaseT >::endProto().
| bool VRMLNodeDesc::use | ( | FieldContainerPtr | ) | [virtual, inherited] |
Reimplemented in osg::VRMLAppearanceDesc.
Definition at line 560 of file OSGVRMLNodeDescs.cpp.
Referenced by osg::VRMLFile::use().
bool osg::VRMLGeometryDesc::_bIsFaceSet [protected] |
bool osg::VRMLGeometryDesc::_bInIndex [protected] |
UInt32 osg::VRMLGeometryDesc::_uiNumVertices [protected] |
Definition at line 510 of file OSGVRMLNodeDescs.h.
GeoPTypesPtr osg::VRMLGeometryDesc::_pTypeField [protected] |
Definition at line 512 of file OSGVRMLNodeDescs.h.
GeoPLengthsPtr osg::VRMLGeometryDesc::_pLengthField [protected] |
Definition at line 513 of file OSGVRMLNodeDescs.h.
UInt32 VRMLNodeDesc::_uiIndent = 0 [static, protected, inherited] |
Definition at line 305 of file OSGVRMLNodeDescs.h.
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(), 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(), 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(), osg::VRMLAppearanceDesc::beginNode(), osg::VRMLGeometryObjectDesc::beginNode(), osg::VRMLGeometryPartDesc::beginNode(), osg::VRMLGeometryPointSetDesc::beginNode(), 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(), osg::VRMLAppearanceDesc::init(), osg::VRMLGeometryObjectDesc::init(), osg::VRMLGeometryPartDesc::init(), osg::VRMLGeometryPointSetDesc::init(), 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(), 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(), 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(), osg::VRMLAppearanceDesc::prototypeAddField(), osg::VRMLGeometryObjectDesc::prototypeAddField(), osg::VRMLGeometryPartDesc::prototypeAddField(), osg::VRMLGeometryPointSetDesc::prototypeAddField(), prototypeAddField(), osg::VRMLShapeDesc::prototypeAddField(), osg::VRMLNodeDesc::prototypeAddField(), and osg::VRMLNodeDesc::prototypeAddFieldValue().
std::string osg::VRMLNodeDesc::_szCurrentName [protected, inherited] |
Definition at line 316 of file OSGVRMLNodeDescs.h.
Referenced by osg::VRMLNodeDesc::getSavename(), and osg::VRMLNodeDesc::setOnEndSave().
bool osg::VRMLNodeDesc::_bSaveOnEnd [protected, inherited] |
Definition at line 317 of file OSGVRMLNodeDescs.h.
Referenced by osg::VRMLNodeDesc::clearOnEndSave(), osg::VRMLNodeDesc::getOnEndSave(), and osg::VRMLNodeDesc::setOnEndSave().
1.5.5