samples/main-grid-topology.cc
changeset 2249 3a1da26d61dc
parent 2231 a5b898c1ee2c
child 2251 04963d8cca51
equal deleted inserted replaced
2248:ef41f6549f45 2249:3a1da26d61dc
    25   // the x interval between each object is 5 meters
    25   // the x interval between each object is 5 meters
    26   // and the y interval between each object is 20 meters
    26   // and the y interval between each object is 20 meters
    27   GridTopology grid (-100, -100, 20, 5, 20);
    27   GridTopology grid (-100, -100, 20, 5, 20);
    28 
    28 
    29   // each object will be attached a static position.
    29   // each object will be attached a static position.
    30   grid.SetMobilityModel (StaticMobilityModel::cid);
    30   grid.SetMobilityModel (StaticMobilityModel::iid ());
    31 
    31 
    32   // finalize the setup by attaching to each object
    32   // finalize the setup by attaching to each object
    33   // in the input array a position and initializing
    33   // in the input array a position and initializing
    34   // this position with the calculated coordinates.
    34   // this position with the calculated coordinates.
    35   grid.LayoutRowFirst (nodes.begin (), nodes.end ());
    35   grid.LayoutRowFirst (nodes.begin (), nodes.end ());