示例#1
0
//Construct a ray from a point of origin and a direction vector. The latter doesn't have to be normalized.
Ray::Ray(const Point & origin, const rt::vector & direction): origin(origin), direction(direction.unit()) {
}
示例#2
0
Plane::Plane(const Point& origin, const rt::vector& normal_vector, const Texture& texture) :
  normal_vector(normal_vector.unit()), origin(origin) {
  this->texture = texture;
}