Wayverb
Main Page
Related Pages
Classes
Files
File List
reflection.h
1
#pragma once
2
3
#include "core/cl/traits.h"
4
5
#include <tuple>
6
7
namespace
wayverb
{
8
namespace
raytracer
{
9
10
struct
alignas
(1 << 4)
reflection
final {
11
cl_float3 position;
// position of the secondary source
12
cl_uint triangle;
// triangle which contains source
13
cl_char keep_going;
// whether or not this is the teriminator for this
14
// path (like a \0 in a char*)
15
cl_char receiver_visible;
// whether or not the receiver is visible from
16
// this point
17
};
18
19
constexpr
auto
to_tuple(
const
reflection
& x) {
20
return
std::tie(x.position,
21
x.triangle,
22
x.keep_going,
23
x.receiver_visible);
24
}
25
26
constexpr
bool
operator==(
const
reflection
& a,
const
reflection
& b) {
27
return
to_tuple(a) == to_tuple(b);
28
}
29
30
constexpr
bool
operator!=(
const
reflection
& a,
const
reflection
& b) {
31
return
!(a == b);
32
}
33
34
}
// namespace raytracer
35
}
// namespace wayverb
raytracer
Definition:
pressure.h:22
wayverb
Definition:
capsule_base.h:9
wayverb::raytracer::reflection
Definition:
reflection.h:10
src
raytracer
include
raytracer
cl
reflection.h
Generated by
1.8.11