Changeset 215 for osgVisual/trunk/src/object
- Timestamp:
- Feb 1, 2011, 8:14:45 PM (14 years ago)
- Location:
- osgVisual/trunk/src/object
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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.