fart/util/Ray.cc
Josh Holtrop 835a0c968f moved a bunch of functionality from Ray.cc and Color.cc into Ray.h and Color.h
git-svn-id: svn://anubis/fart/trunk@308 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-09-28 17:16:39 +00:00

18 lines
324 B
C++

#include <stdlib.h> /* rand() */
#include <iostream>
#include "Ray.h"
Ray Ray::randomRay()
{
return Ray(Vector(0, 0, 0), Vector::randomVector());
}
std::ostream & operator<<(std::ostream & out, const Ray & r)
{
out << "(" << r.getOrigin() << " -> " << r.getDirection() << ")";
return out;
}