CortidQCT  1.2.2.52
Ray.h
Go to the documentation of this file.
1 
12 #pragma once
13 
14 #include <array>
15 #include <type_traits>
16 
17 namespace CortidQCT {
18 
22 template <class T> struct alignas(8) Ray {
23 
24  static_assert(std::is_floating_point<T>::value,
25  "Scalar must be a floating point type");
26 
28  std::array<T, 3> origin;
30  std::array<T, 3> direction;
31 };
32 
34 using Rayd = Ray<double>;
35 
37 using Rayf = Ray<float>;
38 
39 } // namespace CortidQCT
40 
Name namespace for CortidQCT library.
Definition: CortidQCT.h:23
std::array< T, 3 > direction
The (normalized) direction of the ray (dx, dy,d z)
Definition: Ray.h:30
std::array< T, 3 > origin
The origin of the ray in cartesian coordinates (x, y, z)
Definition: Ray.h:25
A basic ray datatype.
Definition: Ray.h:22