diff --git a/src/netanim/examples/wireless-animation.cc b/src/netanim/examples/wireless-animation.cc index 7136f144f..c720edff3 100644 --- a/src/netanim/examples/wireless-animation.cc +++ b/src/netanim/examples/wireless-animation.cc @@ -170,7 +170,6 @@ main (int argc, char *argv[]) AnimationInterface::SetNodeColor (wifiApNode, 0, 255, 0); // Optional AnimationInterface::SetNodeColor (wifiStaNodes, 255, 0, 0); // Optional AnimationInterface::SetNodeColor (csmaNodes, 0, 0, 255); // Optional - AnimationInterface::SetBoundary (0, 0, 35, 35); // Optional AnimationInterface anim ("wireless-animation.xml"); // Mandatory diff --git a/src/netanim/model/animation-interface.cc b/src/netanim/model/animation-interface.cc index 2a417c617..9311a6ad4 100644 --- a/src/netanim/model/animation-interface.cc +++ b/src/netanim/model/animation-interface.cc @@ -61,7 +61,6 @@ static bool initialized = false; std::map AnimationInterface::nodeDescriptions; std::map AnimationInterface::nodeColors; std::map AnimationInterface::linkProperties; -Rectangle * AnimationInterface::userBoundary = 0; AnimationInterface::AnimationInterface (const std::string fn, bool enable3105, uint64_t maxPktsPerFile) @@ -82,10 +81,6 @@ AnimationInterface::AnimationInterface (const std::string fn, bool enable3105, u AnimationInterface::~AnimationInterface () { - if (userBoundary) - { - delete userBoundary; - } StopAnimation (); } @@ -664,8 +659,6 @@ void AnimationInterface::StartAnimation (bool restart) std::ostringstream oss; oss << GetXMLOpen_anim (0); - oss << GetPreamble (); - oss << GetXMLOpen_topology (m_topoMinX, m_topoMinY, m_topoMaxX, m_topoMaxY); WriteN (oss.str (), m_f); NS_LOG_INFO ("Setting topology for "< mo std::ostringstream oss; if (!m_enable3105) { - oss << GetXMLOpen_topology (m_topoMinX, m_topoMinY, m_topoMaxX, m_topoMaxY); oss << GetXMLOpenClose_node (0, n->GetId (), v.x, v.y, nodeColors[n->GetId ()]); - oss << GetXMLClose ("topology"); } else { @@ -1629,10 +1619,6 @@ void AnimationInterface::MobilityAutoCheck () return; std::vector > MovedNodes = RecalcTopoBounds (); std::ostringstream oss; - if (!m_enable3105) - { - oss << GetXMLOpen_topology (m_topoMinX, m_topoMinY, m_topoMaxX, m_topoMaxY); - } for (uint32_t i = 0; i < MovedNodes.size (); i++) { Ptr n = MovedNodes [i]; @@ -1649,8 +1635,6 @@ void AnimationInterface::MobilityAutoCheck () } if (!m_enable3105) { - oss << GetXMLClose ("topology"); - WriteN (oss.str (), m_f); WriteDummyPacket (); } else @@ -1834,22 +1818,6 @@ void AnimationInterface::SetConstantPosition (Ptr n, double x, double y, } -void AnimationInterface::SetBoundary (double minX, double minY, double maxX, double maxY) -{ - if (initialized) - NS_FATAL_ERROR ("SetBoundary must be used prior to creating the AnimationInterface object"); - NS_ASSERT (minX < maxX); - NS_ASSERT (minY < maxY); - if (!userBoundary) - { - userBoundary = new Rectangle; - } - userBoundary->xMax = maxX; - userBoundary->yMax = maxY; - userBoundary->xMin = minX; - userBoundary->yMin = minY; -} - void AnimationInterface::UpdateNodeCounter (uint32_t nodeCounterId, uint32_t nodeId, double counter) { if (nodeCounterId > (m_nodeCounters.size ()-1)) @@ -2053,22 +2021,6 @@ std::string AnimationInterface::GetXMLOpen_anim (uint32_t lp) oss <<"\n"; return oss.str (); } -std::string AnimationInterface::GetXMLOpen_topology (double minX, double minY, double maxX, double maxY) -{ - if (userBoundary) - { - minX = userBoundary->xMin; - minY = userBoundary->yMin; - maxX = userBoundary->xMax; - maxY = userBoundary->yMax; - } - std::ostringstream oss; - oss << "" << std::endl; - return oss.str (); - -} std::string AnimationInterface::GetXMLOpenClose_nodeupdate (uint32_t id, bool visible) { diff --git a/src/netanim/model/animation-interface.h b/src/netanim/model/animation-interface.h index 7497e9787..23e18b174 100644 --- a/src/netanim/model/animation-interface.h +++ b/src/netanim/model/animation-interface.h @@ -240,16 +240,6 @@ public: */ static void SetConstantPosition (Ptr n, double x, double y, double z=0); - /** - * \brief Helper function to set the topology boundary rectangle - * \param minX X value of the lower left corner - * \param minY Y value of the lower left corner - * \param maxX X value of the upper right corner - * \param maxY Y value of the upper right corner - * - */ - static void SetBoundary (double minX, double minY, double maxX, double maxY); - /** * \brief Helper function to set a brief description for a given node * \param n Ptr to the node @@ -724,7 +714,6 @@ private: double m_topoMinY; double m_topoMaxX; double m_topoMaxY; - static Rectangle * userBoundary; bool m_enable3105; bool m_trackPackets;