/* Path.cpp
 *
 * Definition of the Path class.
 */

#include <iostream>
#include "Path.h"

using namespace std;

Path::Path(const Tuple& begPos, const Tuple& endPos)
: begPos_(begPos),
  endPos_(endPos)
{
	// Nothing (more) to do
}

Path::~Path()
{
	// Nothing to do
}

/* translate
 *
 * Returns a new path with all vertices shifted by a Tuple.
 */
const Path Path::translate(const Tuple& translation) const
{
	return Path(begPos() + translation, endPos() + translation);
}

/* rotate
 *
 * Returns a new path with all vertices rotated about the origin by a Tuplex.
 */
const Path Path::rotate(const Tuplex& rotation) const
{
	return Path(rotation * begPos(), rotation * endPos());
}

void Path::print()
{
	cout << "Begin: " << begPos_ << "; End: " << endPos_ << endl;
}
