- Timestamp:
- Feb 1, 2011, 8:14:45 PM (14 years ago)
- Location:
- osgVisual/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/trunk/bin/osgVisualConfig.xml
r212 r215 53 53 - Geometryoffset [optional]: Rotational offset (in degree) for the loaded 3D model to the visual_object (if the 3D model has a wrong coordinate frame) 54 54 - Geometryscale [optional]: Scale factors for the loaded 3D model in all three dimensions. 55 56 <model objectname="TestObject" trackingid="1" label="TestText!" dynamic=" yes">57 <position lat="47. 12345" lon="11.234567" alt="1500.0"></position>55 --> 56 <model objectname="TestObject" trackingid="1" label="TestText!" dynamic="no"> 57 <position lat="47.8123" lon="12.94088" alt="700.0"></position> 58 58 <attitude rot_x="0.0" rot_y="0.0" rot_z="0.0"></attitude> 59 59 <updater> … … 71 71 </geometry> 72 72 </model> 73 <trackmodel id="1"></trackmodel> 73 <trackmodel id="1"></trackmodel> 74 74 </models> 75 75 <datetime day="0" month="0" year="0" hour="12" minute="30"></datetime> -
osgVisual/trunk/src/core/visual_core.cpp
r214 r215 481 481 // 482 482 483 osg::ref_ptr<visual_object> testObj4 = new visual_object( rootNode, "SAENGER2 " ); // todo memleak483 osg::ref_ptr<visual_object> testObj4 = new visual_object( rootNode, "SAENGER23" ); // todo memleak 484 484 testObj4->setNewPosition( osg::DegreesToRadians(47.8123), osg::DegreesToRadians(12.94088), 650 ); 485 485 testObj4->loadGeometry( "../models/saenger2.flt" ); 486 486 testObj4->addUpdater( new object_updater(testObj4) ); // todo memleak 487 testObj4->addLabel("testLabel", " LabelTest!!\nnächste Zeile:)",osg::Vec4(1.0f,0.25f,1.0f,1.0f));487 testObj4->addLabel("testLabel", "Object4 :)",osg::Vec4(1.0f,0.25f,1.0f,1.0f)); 488 488 489 489 //osg::ref_ptr<visual_object> testObj5 = new visual_object( rootNode, "SAENGER" ); // todo memleak … … 545 545 if(trackedObject) 546 546 { 547 if(trackedObject->getGeometry()) 548 node = trackedObject->getGeometry(); 549 else 550 node = trackedObject; 547 node = trackedObject->getGeometry(); 551 548 552 549 // Object mounted manipulator ( Only working with visual_object, not with osg::Node ) -
osgVisual/trunk/src/extLink/dataIO_extLinkVCL.cpp
r186 r215 236 236 osgVisual::dataIO_slot* tmpSlot = osgVisual::visual_dataIO::getInstance()->setSlotData( entryName, direction_, 0 ); 237 237 extLinkSlots.push_back( tmpSlot ); 238 238 239 } // FOR each ENTRY END 239 240 } -
osgVisual/trunk/src/object/object_updater.cpp
r210 r215 34 34 // try to search according variable in dataIO with direction TO_OBJ and copy value to visual_object. 35 35 36 37 object_->lat = osg::DegreesToRadians(osgVisual::visual_dataIO::getInstance()->getSlotDataAsDouble(updater_lat, osgVisual::dataIO_slot::TO_OBJ )); 38 object_->lon = osg::DegreesToRadians(osgVisual::visual_dataIO::getInstance()->getSlotDataAsDouble(updater_lon, osgVisual::dataIO_slot::TO_OBJ )); 39 object_->alt = osgVisual::visual_dataIO::getInstance()->getSlotDataAsDouble(updater_alt, osgVisual::dataIO_slot::TO_OBJ ); 40 object_->azimuthAngle_psi = osg::DegreesToRadians(osgVisual::visual_dataIO::getInstance()->getSlotDataAsDouble(updater_rot_z, osgVisual::dataIO_slot::TO_OBJ )); 41 object_->pitchAngle_theta = osg::DegreesToRadians(osgVisual::visual_dataIO::getInstance()->getSlotDataAsDouble(updater_rot_y, osgVisual::dataIO_slot::TO_OBJ )); 42 object_->bankAngle_phi = osg::DegreesToRadians(osgVisual::visual_dataIO::getInstance()->getSlotDataAsDouble(updater_rot_x, osgVisual::dataIO_slot::TO_OBJ )); 43 object_->updateLabelText("autoupdated", osgVisual::visual_dataIO::getInstance()->getSlotDataAsString(updater_label, osgVisual::dataIO_slot::TO_OBJ )); 36 if(!updater_lat.empty()) 37 object_->lat = osg::DegreesToRadians(osgVisual::visual_dataIO::getInstance()->getSlotDataAsDouble(updater_lat, osgVisual::dataIO_slot::TO_OBJ )); 38 if(!updater_lon.empty()) 39 object_->lon = osg::DegreesToRadians(osgVisual::visual_dataIO::getInstance()->getSlotDataAsDouble(updater_lon, osgVisual::dataIO_slot::TO_OBJ )); 40 if(!updater_alt.empty()) 41 object_->alt = osgVisual::visual_dataIO::getInstance()->getSlotDataAsDouble(updater_alt, osgVisual::dataIO_slot::TO_OBJ ); 42 if(!updater_rot_z.empty()) 43 object_->azimuthAngle_psi = osg::DegreesToRadians(osgVisual::visual_dataIO::getInstance()->getSlotDataAsDouble(updater_rot_z, osgVisual::dataIO_slot::TO_OBJ )); 44 if(!updater_rot_y.empty()) 45 object_->pitchAngle_theta = osg::DegreesToRadians(osgVisual::visual_dataIO::getInstance()->getSlotDataAsDouble(updater_rot_y, osgVisual::dataIO_slot::TO_OBJ )); 46 if(!updater_rot_x.empty()) 47 object_->bankAngle_phi = osg::DegreesToRadians(osgVisual::visual_dataIO::getInstance()->getSlotDataAsDouble(updater_rot_x, osgVisual::dataIO_slot::TO_OBJ )); 48 if(!updater_label.empty()) 49 object_->updateLabelText("autoupdated", osgVisual::visual_dataIO::getInstance()->getSlotDataAsString(updater_label, osgVisual::dataIO_slot::TO_OBJ )); 44 50 45 51 // Finally execute nested PreUpdater -
osgVisual/trunk/src/object/visual_object.cpp
r210 r215 59 59 geometry = new osg::Group(); 60 60 this->addChild( geometry ); 61 unsetGeometry(); // adds an osg::Node as geometry to make the visual_object trackable for node trackers. 61 62 62 63 // Labelnode hinzufügen … … 75 76 return NULL; 76 77 77 OSG_NOTIFY( osg::ALWAYS ) << __FUNCTION__ << " Try to creating a new Model.." << std::endl;78 OSG_NOTIFY( osg::ALWAYS ) << __FUNCTION__ << " - Try to creating a new Model.." << std::endl; 78 79 79 80 // Prepare Variables … … 342 343 343 344 344 345 346 345 osgVisual::visual_object* object = new osgVisual::visual_object( sceneRoot_, objectname ); 347 346 object->lat = lat; … … 462 461 // remove old geometry 463 462 geometry->removeChildren(0, geometry->getNumChildren()); 463 464 // Set std OSG Node to allow tracking of an osgVisual without 465 geometry->addChild( new osg::Node() ); 464 466 } 465 467
Note: See TracChangeset
for help on using the changeset viewer.