MobileRT
1.0
A multi platform C++ CPU progressive Ray Tracer.
Ray.hpp
Go to the documentation of this file.
1
#ifndef MOBILERT_RAY_HPP
2
#define MOBILERT_RAY_HPP
3
4
#include "
MobileRT/Utils/Utils.hpp
"
5
#include <glm/glm.hpp>
6
7
namespace
MobileRT
{
13
class
Ray
final {
14
public
:
15
19
::glm::vec3
origin_
{0};
20
24
::glm::vec3
direction_
{0};
25
29
::std::int32_t
depth_
{-1};
30
34
::std::uint64_t
id_
{0L};
35
40
const
void
*
primitive_
{
nullptr
};
41
45
bool
shadowTrace_
{
false
};
46
47
private
:
48
void
checkArguments
()
const
;
49
50
public
:
51
explicit
Ray
() =
delete
;
52
53
explicit
Ray
(const ::glm::vec3 &dir,
54
const ::glm::vec3 &origin,
55
::std::int32_t depth,
56
bool
shadowTrace,
57
const
void
*primitive =
nullptr
);
58
59
Ray
(
const
Ray
&ray) =
default
;
60
61
Ray
(
Ray
&&ray) noexcept =
default
;
62
63
~Ray
() =
default
;
64
65
Ray
&
operator=
(
const
Ray
&ray) =
delete
;
66
67
Ray
&
operator=
(
Ray
&&ray) noexcept;
68
69
static ::std::uint64_t
getNumberOfCastedRays
() noexcept;
70
71
static
void
resetIdGenerator
() noexcept;
72
};
73
}
//namespace MobileRT
74
75
#endif //MOBILERT_RAY_HPP
MobileRT::Ray::Ray
Ray()=delete
MobileRT::Ray::id_
::std::uint64_t id_
Definition:
Ray.hpp:34
MobileRT::Ray::operator=
Ray & operator=(const Ray &ray)=delete
MobileRT::Ray::primitive_
const void * primitive_
Definition:
Ray.hpp:40
MobileRT::Ray::origin_
::glm::vec3 origin_
Definition:
Ray.hpp:19
MobileRT::Ray::direction_
::glm::vec3 direction_
Definition:
Ray.hpp:24
MobileRT::Ray::depth_
::std::int32_t depth_
Definition:
Ray.hpp:29
Utils.hpp
MobileRT::Ray::checkArguments
void checkArguments() const
Definition:
Ray.cpp:66
MobileRT::Ray::~Ray
~Ray()=default
MobileRT::Ray::getNumberOfCastedRays
::std::uint64_t getNumberOfCastedRays() noexcept
Definition:
Ray.cpp:78
MobileRT::Ray
Definition:
Ray.hpp:13
MobileRT::Ray::resetIdGenerator
static void resetIdGenerator() noexcept
Definition:
Ray.cpp:85
MobileRT::Ray::shadowTrace_
bool shadowTrace_
Definition:
Ray.hpp:45
MobileRT
Definition:
AABB.cpp:105
MobileRT
Ray.hpp
Generated by
1.8.13