--- a/examples/matrix-topology/matrix-topology.cc Tue Apr 19 14:39:15 2011 +0200 +++ a/examples/matrix-topology/matrix-topology.cc Thu Apr 21 08:57:52 2011 -0700 @@ -196,10 +196,10 @@ { positionAlloc_n->Add (Vector (coord_array[m][0], coord_array[m][1], 0)); Ptr n0 = nodes.Get (m); - Ptr nLoc = n0->GetObject (); + Ptr nLoc = n0->GetObject (); if (nLoc == 0) { - nLoc = CreateObject (); + nLoc = CreateObject (); n0->AggregateObject (nLoc); } // y-coordinates are negated for correct display in NetAnim @@ -207,7 +207,7 @@ // by negating the y coordinates, we declare the reference (0,0) coordinate // to the bottom left corner Vector nVec (coord_array[m][0], -coord_array[m][1], 0); - nLoc->SetLocation (nVec); + nLoc->SetPosition (nVec); } mobility_n.SetPositionAllocator (positionAlloc_n); --- a/src/netanim/examples/dumbbell-animation.cc Tue Apr 19 14:39:15 2011 +0200 +++ a/src/netanim/examples/dumbbell-animation.cc Thu Apr 21 08:57:52 2011 -0700 @@ -94,7 +94,7 @@ clientApps.Stop (Seconds (10.0)); // Set the bounding box for animation - d.BoundingBox (1, 1, 10, 10); + d.BoundingBox (1, 1, 100, 100); // Create the animation object and configure for specified output AnimationInterface anim; --- a/src/netanim/examples/grid-animation.cc Tue Apr 19 14:39:15 2011 +0200 +++ a/src/netanim/examples/grid-animation.cc Thu Apr 21 08:57:52 2011 -0700 @@ -82,7 +82,7 @@ clientApps.Stop (Seconds (1.5)); // Set the bounding box for animation - grid.BoundingBox (1, 1, 10, 10); + grid.BoundingBox (1, 1, 100, 100); // Create the animation object and configure for specified output AnimationInterface anim; --- a/src/netanim/examples/star-animation.cc Tue Apr 19 14:39:15 2011 +0200 +++ a/src/netanim/examples/star-animation.cc Thu Apr 21 08:57:52 2011 -0700 @@ -114,7 +114,7 @@ Ipv4GlobalRoutingHelper::PopulateRoutingTables (); // Set the bounding box for animation - star.BoundingBox (1, 1, 10, 10); + star.BoundingBox (1, 1, 100, 100); // Create the animation object and configure for specified output AnimationInterface anim; --- a/src/netanim/helper/point-to-point-dumbbell-helper.cc Tue Apr 19 14:39:15 2011 +0200 +++ a/src/netanim/helper/point-to-point-dumbbell-helper.cc Thu Apr 21 08:57:52 2011 -0700 @@ -24,7 +24,7 @@ // ns3 includes #include "ns3/animation-interface.h" #include "ns3/point-to-point-dumbbell-helper.h" -#include "ns3/canvas-location.h" +#include "ns3/constant-position-mobility-model.h" #include "ns3/node-list.h" #include "ns3/point-to-point-net-device.h" @@ -175,25 +175,25 @@ // Place the left router Ptr lr = GetLeft (); - Ptr loc = lr->GetObject (); + Ptr loc = lr->GetObject (); if (loc == 0) { - loc = CreateObject (); + loc = CreateObject (); lr->AggregateObject (loc); } Vector lrl (ulx + xAdder, uly + yDist/2.0, 0); - loc->SetLocation (lrl); + loc->SetPosition (lrl); // Place the right router Ptr rr = GetRight (); - loc = rr->GetObject (); + loc = rr->GetObject (); if (loc == 0) { - loc = CreateObject (); + loc = CreateObject (); rr->AggregateObject (loc); } Vector rrl (ulx + xAdder * 2, uly + yDist/2.0, 0); // Right router location - loc->SetLocation (rrl); + loc->SetPosition (rrl); // Place the left leaf nodes double theta = -M_PI_2 + thetaL; @@ -209,10 +209,10 @@ } } Ptr ln = GetLeft (l); - loc = ln->GetObject (); + loc = ln->GetObject (); if (loc == 0) { - loc = CreateObject (); + loc = CreateObject (); ln->AggregateObject (loc); } Vector lnl (lrl.x - cos (theta) * xAdder, @@ -226,7 +226,7 @@ { lnl.y = lry; // Set to lower right y } - loc->SetLocation (lnl); + loc->SetPosition (lnl); theta += thetaL; } // Place the right nodes @@ -242,10 +242,10 @@ } } Ptr rn = GetRight (r); - loc = rn->GetObject (); + loc = rn->GetObject (); if (loc == 0) { - loc = CreateObject (); + loc = CreateObject (); rn->AggregateObject (loc); } Vector rnl (rrl.x + cos (theta) * xAdder, // Right node location @@ -259,7 +259,7 @@ { rnl.y = lry; // Set to lower right y } - loc->SetLocation (rnl); + loc->SetPosition (rnl); theta += thetaR; } } --- a/src/netanim/helper/point-to-point-grid-helper.cc Tue Apr 19 14:39:15 2011 +0200 +++ a/src/netanim/helper/point-to-point-grid-helper.cc Thu Apr 21 08:57:52 2011 -0700 @@ -20,7 +20,7 @@ #include "ns3/animation-interface.h" #include "ns3/internet-stack-helper.h" #include "ns3/point-to-point-helper.h" -#include "ns3/canvas-location.h" +#include "ns3/constant-position-mobility-model.h" #include "ns3/string.h" #include "ns3/vector.h" #include "ns3/log.h" @@ -160,14 +160,14 @@ for (uint32_t j = 0; j < m_xSize; ++j) { Ptr node = GetNode (i, j); - Ptr loc = node->GetObject (); + Ptr loc = node->GetObject (); if (loc ==0) { - loc = CreateObject (); + loc = CreateObject (); node->AggregateObject (loc); } Vector locVec (xLoc, yLoc, 0); - loc->SetLocation (locVec); + loc->SetPosition (locVec); xLoc += xAdder; } --- a/src/netanim/helper/point-to-point-star-helper.cc Tue Apr 19 14:39:15 2011 +0200 +++ a/src/netanim/helper/point-to-point-star-helper.cc Thu Apr 21 08:57:52 2011 -0700 @@ -20,7 +20,7 @@ // ns3 includes #include "ns3/animation-interface.h" #include "ns3/point-to-point-star-helper.h" -#include "ns3/canvas-location.h" +#include "ns3/constant-position-mobility-model.h" #include "ns3/node-list.h" #include "ns3/point-to-point-net-device.h" @@ -120,14 +120,14 @@ // Place the hub Ptr hub = m_hub.Get (0); - Ptr hubLoc = hub->GetObject (); + Ptr hubLoc = hub->GetObject (); if (hubLoc == 0) { - hubLoc = CreateObject (); + hubLoc = CreateObject (); hub->AggregateObject (hubLoc); } Vector hubVec (ulx + xDist/2.0, uly + yDist/2.0, 0); - hubLoc->SetLocation (hubVec); + hubLoc->SetPosition (hubVec); double spokeDist; if (xDist > yDist) @@ -143,16 +143,16 @@ for (uint32_t i = 0; i < m_spokes.GetN (); ++i) { Ptr spokeNode = m_spokes.Get (i); - Ptr spokeLoc = spokeNode->GetObject (); + Ptr spokeLoc = spokeNode->GetObject (); if (spokeLoc == 0) { - spokeLoc = CreateObject (); + spokeLoc = CreateObject (); spokeNode->AggregateObject (spokeLoc); } Vector spokeVec (hubVec.x + cos (theta*i) * spokeDist, hubVec.y + sin (theta*i) * spokeDist, 0); - spokeLoc->SetLocation (spokeVec); + spokeLoc->SetPosition (spokeVec); } } --- a/src/netanim/model/animation-interface.cc Tue Apr 19 14:39:15 2011 +0200 +++ a/src/netanim/model/animation-interface.cc Thu Apr 21 08:57:52 2011 -0700 @@ -36,7 +36,7 @@ #include "ns3/channel.h" #include "ns3/config.h" #include "ns3/node.h" -#include "ns3/canvas-location.h" +#include "ns3/mobility-model.h" #include "ns3/packet.h" #include "ns3/simulator.h" @@ -99,11 +99,11 @@ for (NodeList::Iterator i = NodeList::Begin (); i != NodeList::End (); ++i) { Ptr n = *i; - Ptr loc = n->GetObject (); + Ptr loc = n->GetObject (); if (loc) { // Location exists, dump it - Vector v = loc->GetLocation (); + Vector v = loc->GetPosition (); ostringstream oss; oss << "0.0 N " << n->GetId () << " " << v.x << " " << v.y << endl; --- a/src/netanim/wscript Tue Apr 19 14:39:15 2011 +0200 +++ a/src/netanim/wscript Thu Apr 21 08:57:52 2011 -0700 @@ -1,11 +1,10 @@ ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- def build(bld): - module = bld.create_ns3_module('netanim', ['internet', 'point-to-point']) + module = bld.create_ns3_module('netanim', ['internet', 'point-to-point', 'mobility']) module.includes = '.' module.source = [ 'model/animation-interface.cc', - 'model/canvas-location.cc', 'helper/point-to-point-dumbbell-helper.cc', 'helper/point-to-point-grid-helper.cc', 'helper/point-to-point-star-helper.cc', @@ -15,7 +14,6 @@ headers.module = 'netanim' headers.source = [ 'model/animation-interface.h', - 'model/canvas-location.h', 'helper/point-to-point-dumbbell-helper.h', 'helper/point-to-point-grid-helper.h', 'helper/point-to-point-star-helper.h',