コード例 #1
0
ファイル: ray.cpp プロジェクト: laarmen/ray_tracer
//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.cpp プロジェクト: xavierm02/PROG1-projet-3
Plane::Plane(const Point& origin, const rt::vector& normal_vector, const Texture& texture) :
  normal_vector(normal_vector.unit()), origin(origin) {
  this->texture = texture;
}