Changeset 223 for osgVisual/trunk/src/object
- Timestamp:
- Feb 9, 2011, 9:35:35 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/trunk/src/object/object_updater.cpp
r221 r223 34 34 // try to search according variable in dataIO with direction TO_OBJ and copy value to visual_object. 35 35 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 ));36 if(!updater_lat_deg.empty()) 37 object_->lat = osg::DegreesToRadians(osgVisual::visual_dataIO::getInstance()->getSlotDataAsDouble(updater_lat_deg, osgVisual::dataIO_slot::TO_OBJ )); 38 if(!updater_lon_deg.empty()) 39 object_->lon = osg::DegreesToRadians(osgVisual::visual_dataIO::getInstance()->getSlotDataAsDouble(updater_lon_deg, osgVisual::dataIO_slot::TO_OBJ )); 40 40 if(!updater_alt.empty()) 41 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 ));42 if(!updater_rot_z_deg.empty()) 43 object_->azimuthAngle_psi = osg::DegreesToRadians(osgVisual::visual_dataIO::getInstance()->getSlotDataAsDouble(updater_rot_z_deg, osgVisual::dataIO_slot::TO_OBJ )); 44 if(!updater_rot_y_deg.empty()) 45 object_->pitchAngle_theta = osg::DegreesToRadians(osgVisual::visual_dataIO::getInstance()->getSlotDataAsDouble(updater_rot_y_deg, osgVisual::dataIO_slot::TO_OBJ )); 46 if(!updater_rot_x_deg.empty()) 47 object_->bankAngle_phi = osg::DegreesToRadians(osgVisual::visual_dataIO::getInstance()->getSlotDataAsDouble(updater_rot_x_deg, osgVisual::dataIO_slot::TO_OBJ )); 48 48 if(!updater_label.empty()) 49 49 object_->updateLabelText("default", osgVisual::visual_dataIO::getInstance()->getSlotDataAsString(updater_label, osgVisual::dataIO_slot::TO_OBJ )); … … 71 71 } 72 72 73 void object_updater::setUpdaterSlotNames( osgVisual::visual_object* object_, std::string lat_ , std::string lon_, std::string alt_, std::string rot_x_, std::string rot_y_, std::string rot_z_, std::string label_)73 void object_updater::setUpdaterSlotNames( osgVisual::visual_object* object_, std::string lat_deg_, std::string lon_deg_, std::string alt_, std::string rot_x_deg_, std::string rot_y_deg_, std::string rot_z_deg_, std::string label_) 74 74 { 75 if(lat_ !="")76 updater_lat = lat_;75 if(lat_deg_!="") 76 updater_lat_deg = lat_deg_; 77 77 else 78 updater_lat = object_->getName()+"_POS_LAT";78 updater_lat_deg = object_->getName()+"_POS_LAT"; 79 79 80 if(lon_ !="")81 updater_lon = lon_;80 if(lon_deg_!="") 81 updater_lon_deg = lon_deg_; 82 82 else 83 updater_lon = object_->getName()+"_POS_LON";83 updater_lon_deg = object_->getName()+"_POS_LON"; 84 84 85 85 if(alt_!="") … … 88 88 updater_alt = object_->getName()+"_POS_ALT"; 89 89 90 if(rot_x_ !="")91 updater_rot_x = rot_x_;90 if(rot_x_deg_!="") 91 updater_rot_x_deg = rot_x_deg_; 92 92 else 93 updater_rot_x = object_->getName()+"_ROT_X";93 updater_rot_x_deg = object_->getName()+"_ROT_X"; 94 94 95 if(rot_y_ !="")96 updater_rot_y = rot_y_;95 if(rot_y_deg_!="") 96 updater_rot_y_deg = rot_y_deg_; 97 97 else 98 updater_rot_y = object_->getName()+"_ROT_Y";98 updater_rot_y_deg = object_->getName()+"_ROT_Y"; 99 99 100 if(rot_z_ !="")101 updater_rot_z = rot_z_;100 if(rot_z_deg_!="") 101 updater_rot_z_deg = rot_z_deg_; 102 102 else 103 updater_rot_z = object_->getName()+"_ROT_Z";103 updater_rot_z_deg = object_->getName()+"_ROT_Z"; 104 104 105 105 if(label_!="")
Note: See TracChangeset
for help on using the changeset viewer.