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

Member | |
| Field * | getField (FieldContainerPtr pFC1, FieldContainerPtr pFC2, GenericAttPtr pGenAtt, const Char8 *szFieldname) |
| FieldNameTypeHash | _mFieldTypes |
| GenericAttPtr | _pGenAtt |
| FieldContainerPtr | _pNodeProto |
| FieldContainerPtr | _pNodeCoreProto |
| Field * | _pCurrField |
| std::string | _szCurrentName |
| bool | _bSaveOnEnd |
| *static UInt32 | _uiIndent = 0 |
Public Member Functions | |
Constructors | |
| * | VRMLViewpointDesc (void) |
Destructor | |
| *virtual | ~VRMLViewpointDesc (void) |
Helper | |
| *virtual void | init (const Char8 *szName) |
| virtual void | reset (void) |
| virtual ComponentTransformPtr | getDefaultBeacon (void) |
Field | |
| *virtual bool | prototypeAddField (const Char8 *szFieldType, const UInt32 uiFieldTypeId, const Char8 *szFieldName) |
| virtual void | endProtoInterface (void) |
| virtual void | getFieldAndDesc (FieldContainerPtr pFC, const Char8 *szFieldname, Field *&pField, const FieldDescription *&pDesc) |
Node | |
| *virtual FieldContainerPtr | beginNode (const Char8 *szTypename, const Char8 *szName, FieldContainerPtr pCurrentFC) |
| virtual void | endNode (FieldContainerPtr) |
Dump | |
| *virtual void | dump (const Char8 *szNodeName) |
Helper | |
| virtual void | setOnEndSave (const Char8 *szName) |
| virtual void | clearOnEndSave (void) |
| virtual bool | getOnEndSave (void) |
| virtual const Char8 * | getSavename (void) |
| virtual FieldContainerPtr | getSaveFieldContainer (void) |
Field | |
| *virtual Field * | getField (const Char8 *szFieldname) |
Prototypes | |
| virtual void | prototypeAddFieldValue (const Char8 *szFieldVal) |
FieldValue | |
| *virtual void | addFieldValue (Field *pField, const Char8 *szFieldVal) |
| virtual bool | use (FieldContainerPtr) |
Static Public Member Functions | |
Class Get | |
| *static UInt32 | getIndent (void) |
| static void | incIndent (void) |
| static void | decIndent (void) |
| static void | resetIndent (void) |
Protected Types | |
| typedef std::map< const Char8 *, UInt32, LTString > | FieldNameTypeHash |
Private Types | |
| typedef VRMLNodeDesc | Inherited |
Private Member Functions | |
| VRMLViewpointDesc (const VRMLViewpointDesc &source) | |
| prohibit default function (move to 'public' if needed) | |
| void | operator= (const VRMLViewpointDesc &source) |
| prohibit default function (move to 'public' if needed) | |
Definition at line 1751 of file OSGVRMLNodeDescs.h.
|
|
Definition at line 1821 of file OSGVRMLNodeDescs.h. |
|
|
Definition at line 298 of file OSGVRMLNodeDescs.h. |
|
|
Definition at line 5193 of file OSGVRMLNodeDescs.cpp. 05193 : 05194 Inherited() 05195 { 05196 }
|
|
|
Definition at line 5201 of file OSGVRMLNodeDescs.cpp.
|
|
|
|
|
|
Reimplemented from osg::VRMLNodeDesc. Definition at line 5208 of file OSGVRMLNodeDescs.cpp. References osg::VRMLNodeDesc::_pGenAtt, osg::VRMLNodeDesc::_pNodeCoreProto, osg::VRMLNodeDesc::_pNodeProto, osg::DynFieldAttachment< AttachmentDescT >::create(), osg::ComponentTransformBase::create(), osg::Node::create(), osg::SField< FieldTypeT, fieldNameSpace >::getClassType(), osg::DynFieldAttachment< AttachmentDescT >::getDynamicField(), and PINFO. 05209 { 05210 #ifdef OSG_DEBUG_VRML 05211 PINFO << "Viewpoint init : " << szName << std::endl; 05212 #endif 05213 05214 _pNodeProto = Node::create(); 05215 _pNodeCoreProto = ComponentTransform::create(); 05216 _pGenAtt = GenericAtt::create(); 05217 _pGenAtt->setInternal(true); 05218 05219 FieldDescription *pDesc = 05220 new FieldDescription(SFBool::getClassType(), 05221 "isViewpoint", 05222 0, 0, 05223 false, 05224 (FieldIndexAccessMethod) 05225 &GenericAtt::getDynamicField); 05226 05227 05228 _pGenAtt->addField(*pDesc); 05229 }
|
|
|
_beaconCore = ComponentTransformPtr::NullPtr; Reimplemented from osg::VRMLNodeDesc. Definition at line 5231 of file OSGVRMLNodeDescs.cpp. 05232 { 05233 // _pCamera = PerspectiveCamera::NullFC; 05234 05235 // _beaconNode = NullNode; 05237 // _viewpointAttachment = ViewpointAttachmentPtr::NullPtr; 05238 // 05239 // _defaultOrientation.setValue(_orientation); 05240 // _defaultPosition .setValue(_position); 05241 }
|
|
|
Definition at line 5243 of file OSGVRMLNodeDescs.cpp. References osg::NullFC. 05244 { 05245 return NullFC; 05246 }
|
|
||||||||||||||||
|
Reimplemented from osg::VRMLNodeDesc. Definition at line 5258 of file OSGVRMLNodeDescs.cpp. References osg::VRMLNodeDesc::_pCurrField, osg::VRMLNodeDesc::_pNodeCoreProto, osg::VRMLNodeDesc::prototypeAddField(), and osg::stringcasecmp(). 05261 { 05262 bool bFound = false; 05263 05264 _pCurrField = NULL; 05265 05266 if(stringcasecmp("orientation", szFieldname) == 0) 05267 { 05268 _pCurrField = _pNodeCoreProto->getField("rotation"); 05269 05270 bFound = true; 05271 } 05272 else if(stringcasecmp("position", szFieldname) == 0) 05273 { 05274 _pCurrField = _pNodeCoreProto->getField("translation"); 05275 05276 bFound = true; 05277 } 05278 05279 if(bFound == true) 05280 { 05281 return true; 05282 } 05283 else 05284 { 05285 return Inherited::prototypeAddField(szFieldType, 05286 uiFieldTypeId, 05287 szFieldname); 05288 } 05289 }
|
|
|
Reimplemented from osg::VRMLNodeDesc. Definition at line 5291 of file OSGVRMLNodeDescs.cpp.
|
|
||||||||||||||||||||
|
Reimplemented from osg::VRMLNodeDesc. Definition at line 5295 of file OSGVRMLNodeDescs.cpp. References osg::AttachmentContainerPtr::dcast(), osg::NodePtr::dcast(), osg::NodePtr::getCore(), osg::VRMLNodeDesc::getFieldAndDesc(), osg::VRMLNodeDesc::getIndent(), osg::indentLog(), osg::NullFC, PINFO, PWARNING, and osg::stringcasecmp(). 05300 { 05301 #ifdef OSG_DEBUG_VRML 05302 indentLog(getIndent(), PINFO); 05303 PINFO << "ViewpointDesc::getFieldAndDesc : request " 05304 << szFieldname 05305 << std::endl; 05306 #endif 05307 05308 if(szFieldname == NULL) 05309 return; 05310 05311 if(pFC == NullFC) 05312 return; 05313 05314 NodePtr pNode = NodePtr::dcast(pFC); 05315 05316 if(pNode == NullFC) 05317 { 05318 PWARNING << "ViewpointDesc::getFieldAndDesc : No Node" << std::endl; 05319 return; 05320 } 05321 05322 NodeCorePtr pNodeCore = pNode->getCore(); 05323 05324 ComponentTransformPtr pTransform = ComponentTransformPtr::dcast(pNodeCore); 05325 05326 if(pTransform == NullFC) 05327 { 05328 PWARNING << "ViewpointDesc::getFieldAndDesc : No Geo" << std::endl; 05329 return; 05330 } 05331 05332 if(stringcasecmp("orientation", szFieldname) == 0) 05333 { 05334 #ifdef OSG_DEBUG_VRML 05335 indentLog(getIndent(), PINFO); 05336 PINFO << "ViewpointDesc::getFieldAndDesc : internal " 05337 << szFieldname << std::endl; 05338 #endif 05339 05340 pField = pTransform->getField("rotation"); 05341 05342 if(pField != NULL) 05343 pDesc = pTransform->getType().findFieldDescription("rotation"); 05344 } 05345 else if(stringcasecmp("position", szFieldname) == 0) 05346 { 05347 #ifdef OSG_DEBUG_VRML 05348 indentLog(getIndent(), PINFO); 05349 PINFO << "ViewpointDesc::getFieldAndDesc : internal " 05350 << szFieldname << std::endl; 05351 #endif 05352 05353 pField = pTransform->getField("translation"); 05354 05355 if(pField != NULL) 05356 pDesc = pTransform->getType().findFieldDescription("translation"); 05357 } 05358 else 05359 { 05360 VRMLNodeDesc::getFieldAndDesc(pTransform, 05361 szFieldname, 05362 pField, 05363 pDesc); 05364 } 05365 }
|
|
||||||||||||||||
|
Reimplemented from osg::VRMLNodeDesc. Definition at line 5370 of file OSGVRMLNodeDescs.cpp. References osg::VRMLNodeDesc::_pGenAtt, osg::VRMLNodeDesc::_pNodeCoreProto, osg::VRMLNodeDesc::_pNodeProto, osg::beginEditCP(), osg::AttachmentContainerPtr::dcast(), osg::NodePtr::dcast(), osg::endEditCP(), osg::VRMLNodeDesc::getIndent(), osg::VRMLNodeDesc::incIndent(), osg::indentLog(), osg::NullFC, and PINFO. 05374 { 05375 FieldContainerPtr pFC = NullFC; 05376 NodePtr pNode = NullFC; 05377 NodeCorePtr pNodeCore = NullFC; 05378 GenericAttPtr pAtt = NullFC; 05379 05380 if(_pNodeProto != NullFC) 05381 { 05382 FieldContainerPtr pAttClone = _pGenAtt->clone(); 05383 05384 pAtt = GenericAttPtr::dcast(pAttClone); 05385 05386 if(pAtt != NullFC) 05387 { 05388 pAtt->setInternal(true); 05389 } 05390 05391 pFC = _pNodeProto->shallowCopy(); 05392 05393 pNode = NodePtr::dcast(pFC); 05394 05395 pFC = _pNodeCoreProto->shallowCopy(); 05396 05397 pNodeCore = NodeCorePtr::dcast(pFC); 05398 05399 beginEditCP(pNode); 05400 { 05401 pNode ->setCore (pNodeCore); 05402 pNodeCore->addAttachment(pAtt); 05403 } 05404 endEditCP (pNode); 05405 } 05406 05407 #ifdef OSG_DEBUG_VRML 05408 indentLog(getIndent(), PINFO); 05409 PINFO << "Begin Viewpoint " << &(*pNode) << std::endl; 05410 05411 incIndent(); 05412 #endif 05413 05414 return pNode; 05415 }
|
|
|
Reimplemented from osg::VRMLNodeDesc. Definition at line 5417 of file OSGVRMLNodeDescs.cpp. References osg::VRMLNodeDesc::decIndent(), osg::VRMLNodeDesc::getIndent(), osg::indentLog(), and PINFO. 05418 { 05419 #ifdef OSG_DEBUG_VRML 05420 decIndent(); 05421 05422 indentLog(getIndent(), PINFO); 05423 PINFO << "End Viewpoint " << &(*pFC) << std::endl; 05424 #endif 05425 }
|
|
|
Reimplemented from osg::VRMLNodeDesc. Definition at line 5430 of file OSGVRMLNodeDescs.cpp.
|
|
|
|
|
|
|
|
|
Definition at line 150 of file OSGVRMLNodeDescs.cpp. References osg::VRMLNodeDesc::_uiIndent. Referenced by osg::VRMLFile::createStandardPrototypes(), osg::VRMLFile::scanFile(), osg::VRMLFile::scanStandardPrototypes(), and osg::VRMLFile::scanStream(). 00151 { 00152 _uiIndent = 0; 00153 }
|
|
|
Definition at line 209 of file OSGVRMLNodeDescs.cpp. References osg::VRMLNodeDesc::_bSaveOnEnd, and osg::VRMLNodeDesc::_szCurrentName. Referenced by osg::VRMLFile::beginNode(). 00210 { 00211 _szCurrentName = szName; // does that make a copy? I expect it to... 00212 _bSaveOnEnd = true; 00213 }
|
|
|
Definition at line 215 of file OSGVRMLNodeDescs.cpp. References osg::VRMLNodeDesc::_bSaveOnEnd. Referenced by osg::VRMLFile::endNode(). 00216 { 00217 _bSaveOnEnd = false; 00218 }
|
|
|
Definition at line 220 of file OSGVRMLNodeDescs.cpp. References osg::VRMLNodeDesc::_bSaveOnEnd. Referenced by osg::VRMLFile::endNode(). 00221 { 00222 return _bSaveOnEnd; 00223 }
|
|
|
Definition at line 225 of file OSGVRMLNodeDescs.cpp. References osg::VRMLNodeDesc::_szCurrentName. Referenced by osg::VRMLFile::endNode(). 00226 { 00227 return _szCurrentName.c_str(); 00228 }
|
|
|
Reimplemented in osg::VRMLAppearanceDesc. Definition at line 230 of file OSGVRMLNodeDescs.cpp. References osg::NullFC. Referenced by osg::VRMLFile::endNode(). 00231 { 00232 return NullFC; 00233 }
|
|
|
Definition at line 238 of file OSGVRMLNodeDescs.cpp. References osg::VRMLNodeDesc::_pGenAtt, osg::VRMLNodeDesc::_pNodeCoreProto, and osg::VRMLNodeDesc::_pNodeProto. Referenced by osg::VRMLNodeDesc::prototypeAddField(). 00239 { 00240 return getField(_pNodeProto, _pNodeCoreProto, _pGenAtt, szFieldname); 00241 }
|
|
||||||||||||||||||||
|
Definition at line 604 of file OSGVRMLNodeDescs.cpp. References osg::VRMLNodeDesc::decIndent(), osg::VRMLNodeDesc::getIndent(), osg::VRMLNodeDesc::incIndent(), osg::indentLog(), osg::NullFC, and PINFO. 00608 { 00609 Field *returnValue = NULL; 00610 00611 if(szFieldname == NULL) 00612 { 00613 return returnValue; 00614 } 00615 00616 #ifdef OSG_DEBUG_VRML 00617 indentLog(getIndent(), PINFO); 00618 PINFO << "VRMLNodeDesc::getField " << std::endl; 00619 00620 incIndent(); 00621 00622 indentLog(getIndent(), PINFO); 00623 PINFO << "Trying to find field : " << szFieldname << std::endl; 00624 #endif 00625 00626 if(pFC1 != NullFC) 00627 { 00628 returnValue = pFC1->getField(szFieldname); 00629 } 00630 00631 #ifdef OSG_DEBUG_VRML 00632 incIndent(); 00633 00634 indentLog(getIndent(), PINFO); 00635 PINFO << "Got this from node : " << returnValue << std::endl; 00636 #endif 00637 00638 if(returnValue != NULL) 00639 return returnValue; 00640 00641 if(pFC2 != NullFC) 00642 { 00643 returnValue = pFC2->getField(szFieldname); 00644 00645 #ifdef OSG_DEBUG_VRML 00646 indentLog(getIndent(), PINFO); 00647 PINFO << "Got this from nodecore : " << returnValue << std::endl; 00648 #endif 00649 } 00650 else 00651 { 00652 #ifdef OSG_DEBUG_VRML 00653 indentLog(getIndent(), PINFO); 00654 PINFO << "No core to check" << std::endl; 00655 #endif 00656 } 00657 00658 00659 if(returnValue != NULL) 00660 return returnValue; 00661 00662 if(pGenAtt != NullFC) 00663 { 00664 returnValue = pGenAtt->getField(szFieldname); 00665 } 00666 00667 #ifdef OSG_DEBUG_VRML 00668 indentLog(getIndent(), PINFO); 00669 PINFO << "Got this from attachment : " << returnValue << std::endl; 00670 00671 decIndent(); 00672 decIndent(); 00673 #endif 00674 00675 return returnValue; 00676 }
|
|
|
Definition at line 474 of file OSGVRMLNodeDescs.cpp. References osg::VRMLNodeDesc::_pCurrField, and osg::Field::pushValueByStr(). 00475 { 00476 if(_pCurrField != NULL) 00477 { 00478 _pCurrField->pushValueByStr(szFieldVal); 00479 } 00480 }
|
|
||||||||||||
|
Reimplemented in osg::VRMLGeometryDesc, osg::VRMLGeometryPointSetDesc, and osg::VRMLPixelTextureDesc. Definition at line 548 of file OSGVRMLNodeDescs.cpp. References osg::Field::pushValueByStr(). Referenced by osg::VRMLFile::addFieldValue(). 00550 { 00551 if(pField != NULL) 00552 { 00553 pField->pushValueByStr(szFieldVal); 00554 } 00555 }
|
|
|
Reimplemented in osg::VRMLAppearanceDesc. Definition at line 557 of file OSGVRMLNodeDescs.cpp. Referenced by osg::VRMLFile::use().
|
|
|
Definition at line 123 of file OSGVRMLNodeDescs.cpp. Referenced by osg::VRMLNodeDesc::decIndent(), osg::VRMLNodeDesc::getIndent(), osg::VRMLNodeDesc::incIndent(), and osg::VRMLNodeDesc::resetIndent(). |
|
|
Definition at line 307 of file OSGVRMLNodeDescs.h. |
|
|
|
|
|
|
Definition at line 316 of file OSGVRMLNodeDescs.h. Referenced by osg::VRMLNodeDesc::getSavename(), and osg::VRMLNodeDesc::setOnEndSave(). |
|
|
Definition at line 317 of file OSGVRMLNodeDescs.h. Referenced by osg::VRMLNodeDesc::clearOnEndSave(), osg::VRMLNodeDesc::getOnEndSave(), and osg::VRMLNodeDesc::setOnEndSave(). |
1.4.3