equal
deleted
inserted
replaced
37 // iterate our nodes and print their position. |
37 // iterate our nodes and print their position. |
38 for (std::vector<Ptr<Object> >::const_iterator j = nodes.begin (); |
38 for (std::vector<Ptr<Object> >::const_iterator j = nodes.begin (); |
39 j != nodes.end (); j++) |
39 j != nodes.end (); j++) |
40 { |
40 { |
41 Ptr<Object> object = *j; |
41 Ptr<Object> object = *j; |
42 Ptr<MobilityModel> position = object->QueryInterface<MobilityModel> (MobilityModel::iid); |
42 Ptr<MobilityModel> position = object->QueryInterface<MobilityModel> (); |
43 NS_ASSERT (position != 0); |
43 NS_ASSERT (position != 0); |
44 Vector pos = position->GetPosition (); |
44 Vector pos = position->GetPosition (); |
45 std::cout << "x=" << pos.x << ", y=" << pos.y << ", z=" << pos.z << std::endl; |
45 std::cout << "x=" << pos.x << ", y=" << pos.y << ", z=" << pos.z << std::endl; |
46 } |
46 } |
47 |
47 |