Changeset 227
- Timestamp:
- Feb 10, 2011, 12:51:47 PM (14 years ago)
- Location:
- osgVisual/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/trunk/bin/osgVisualConfig.xml
r220 r227 71 71 </geometry> 72 72 </model> 73 <trackmodel id=" 1" updater_slot=""></trackmodel>73 <trackmodel id="2" updater_slot=""></trackmodel> 74 74 </models> 75 75 <datetime day="0" month="0" year="0" hour="12" minute="30"></datetime> -
osgVisual/trunk/include/object/visual_object.h
r226 r227 77 77 #include <leakDetection.h> 78 78 public: 79 //META_Object(osgVisual,visual_object); 79 META_Node(osgVisual,visual_object); 80 visual_object() {}; 81 visual_object(const osgVisual::visual_object& object_, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): 82 MatrixTransform(object_,copyop), 83 upVector(object_.upVector), 84 lat(object_.lat), 85 lon(object_.lon), 86 alt(object_.alt), 87 azimuthAngle_psi(object_.azimuthAngle_psi), 88 pitchAngle_theta(object_.pitchAngle_theta), 89 bankAngle_phi(object_.bankAngle_phi), 90 scaleX(object_.scaleX), 91 scaleY(object_.scaleY), 92 scaleZ(object_.scaleZ), 93 cameraMatrix(object_.cameraMatrix), 94 cameraTranslationOffset(object_.cameraTranslationOffset), 95 cameraRotationOffset(object_.cameraRotationOffset), 96 geometry_offset_rotation(object_.geometry_offset_rotation), 97 geometry(object_.geometry), 98 updater(object_.updater), 99 trackingId(object_.trackingId), 100 labels(object_.labels) 101 {} 80 102 81 103 /** -
osgVisual/trunk/src/core/visual_core.cpp
r226 r227 282 282 { 283 283 std::string name=reinterpret_cast<const char*>(modelNode->name); 284 if( cur_node->type == XML_ELEMENT_NODE && name == "model")284 if(modelNode->type == XML_ELEMENT_NODE && name == "model") 285 285 { 286 286 visual_object::createNodeFromXMLConfig(rootNode, modelNode); 287 287 } 288 if( cur_node->type == XML_ELEMENT_NODE && name == "trackmodel")288 if(modelNode->type == XML_ELEMENT_NODE && name == "trackmodel") 289 289 { 290 290 // Extract track-ID and track the model 291 xmlAttr *attr = cur_node->properties;291 xmlAttr *attr = modelNode->properties; 292 292 while ( attr ) 293 293 { 294 294 std::string attr_name=reinterpret_cast<const char*>(attr->name); 295 295 std::string attr_value=reinterpret_cast<const char*>(attr->children->content); 296 if( attr_name == "id" ) trackNode( util::strToInt(attr_value) ); 296 if( attr_name == "id" ) 297 trackNode( util::strToInt(attr_value) ); 297 298 attr = attr->next; 298 299 } … … 464 465 //testObj5->addUpdater( new object_updater(testObj5) ); 465 466 466 trackNode( testObj4 );467 //trackNode( testObj4 ); 467 468 468 469 // Load EDDF -
osgVisual/trunk/src/object/visual_object.cpp
r226 r227 284 284 object->pitchAngle_theta = rot_y; 285 285 object->bankAngle_phi = rot_z; 286 object->trackingId = trackingID; 286 287 if(label!="") 287 288 object->addLabel("default", label); … … 322 323 // We have a valid node, check to see if this is the node we 323 324 // are looking for. If so, return the current node. 324 if (currNode_->className() == "visual_object") 325 { 326 //Check if it is the right tracking Id 327 osgVisual::visual_object* tmp = dynamic_cast<osgVisual::visual_object*>(currNode_); 328 if(tmp && tmp->getTrackingId()==trackingID) 329 return currNode_; 330 } 325 osgVisual::visual_object* tmp = dynamic_cast<osgVisual::visual_object*>(currNode_); 326 if(tmp && tmp->getTrackingId()==trackingID) 327 return currNode_; 328 331 329 332 330 // We have a valid node, but not the one we are looking for.
Note: See TracChangeset
for help on using the changeset viewer.