Ray3.h
Go to the documentation of this file.
1 /*************************************************************************
2 > File Name: Ray3.h
3 > Project Name: CubbyFlow
4 > Author: Chan-Ho Chris Ohk
5 > Purpose: Class for 3-D ray.
6 > Created Time: 2017/03/21
7 > Copyright (c) 2018, Chan-Ho Chris Ohk
8 *************************************************************************/
9 #ifndef CUBBYFLOW_RAY3_H
10 #define CUBBYFLOW_RAY3_H
11 
12 #include <Core/Ray/Ray.h>
13 #include <Core/Vector/Vector3.h>
14 
15 namespace CubbyFlow
16 {
22  template <typename T>
23  class Ray<T, 3> final
24  {
25  public:
26  static_assert(std::is_floating_point<T>::value, "Ray only can be instantiated with floating point types");
27 
30 
33 
35  Ray();
36 
38  Ray(const Vector3<T>& newOrigin, const Vector3<T>& newDirection);
39 
41  Ray(const Ray& other);
42 
44  Vector3<T> PointAt(T t) const;
45  };
46 
48  template <typename T> using Ray3 = Ray<T, 3>;
49 
51  using Ray3F = Ray3<float>;
52 
55 }
56 
57 #include <Core/Ray/Ray3-Impl.h>
58 
59 #endif
3-D vector class.
Definition: Vector3.h:26
Class for ray.
Definition: Ray.h:23
Vector3< T > direction
The direction of the ray.
Definition: Ray3.h:32
Vector3< T > origin
The origin of the ray.
Definition: Ray3.h:26
Definition: pybind11Utils.h:24
Class for 3-D ray.
Definition: Ray3.h:23