Ray3-Impl.h
Go to the documentation of this file.
1 /*************************************************************************
2 > File Name: Ray3-Impl.h
3 > Project Name: CubbyFlow
4 > Author: Dongmin Kim
5 > Purpose: Class for 3-D ray.
6 > Created Time: 2017/03/25
7 > Copyright (c) 2018, Dongmin Kim
8 *************************************************************************/
9 #ifndef CUBBYFLOW_RAY3_IMPL_H
10 #define CUBBYFLOW_RAY3_IMPL_H
11 
12 namespace CubbyFlow
13 {
14  template <typename T>
16  Ray(Vector3<T>(), Vector3<T>(1, 0, 0))
17  {
18  // Do nothing
19  }
20 
21  template <typename T>
22  Ray<T, 3>::Ray(const Vector3<T>& newOrigin, const Vector3<T>& newDirection) :
23  origin(newOrigin), direction(newDirection.Normalized())
24  {
25  // Do nothing
26  }
27 
28  template <typename T>
29  Ray<T, 3>::Ray(const Ray& other) :
30  origin(other.origin), direction(other.direction)
31  {
32  // Do nothing
33  }
34 
35  template <typename T>
37  {
38  return origin + t * direction;
39  }
40 }
41 
42 #endif
3-D vector class.
Definition: Vector3.h:26
Class for ray.
Definition: Ray.h:23
Definition: pybind11Utils.h:24