///////////////////////////////////////////////////////////////////////////////
//                                                                           //
// Copyright (C) 2006 by Intel Coproration and Carnegie Mellon University    //
// Contacts: raam @ cmu.edu                                                  //
//                                                                           //
///////////////////////////////////////////////////////////////////////////////

#include <iostream>

#include "TestDPRLine.hxx"

CODE_MODULE_DECLARATION( TestDPRLine, TestDPRLine );


#include "Catom.hxx"
#include "CatomWorld.hxx"
#include "Network.hxx"
#include "CatomSim.hxx"

using namespace std;

void TestDPRLine::simulationStart()
{
  HOSTCATOM.setColor(200,0,0,200);
}

void TestDPRLine::endTick()
{
  if(hostCatom == 10000 && worldPtr->current_time == 40)
  {
    worldPtr->addLine( hostCatom,Point3D(10,4,4),0,100,0);
    worldPtr->addLine( hostCatom,10006,0,100,0);
  }
  
  if(hostCatom == 10005 && worldPtr->current_time == 70)
    worldPtr->addLine( hostCatom,10000,0,0,100);
  
  if(hostCatom == 10005 && worldPtr->current_time == 100)
    worldPtr->clearLine(hostCatom,10000);
  
  if(hostCatom == 10000 && worldPtr->current_time == 200)
    worldPtr->clearLines(hostCatom);
}
