Wayverb
triangle.h
1 #pragma once
2 
3 #include "core/cl/include.h"
4 #include "core/cl/representation.h"
5 
6 namespace wayverb {
7 namespace core {
8 struct alignas(1 << 3) triangle final {
9  cl_uint surface;
10  cl_uint v0;
11  cl_uint v1;
12  cl_uint v2;
13 };
14 
15 template <>
16 struct cl_representation<triangle> final {
17  static constexpr auto value = R"(
18 typedef struct {
19  uint surface;
20  uint v0;
21  uint v1;
22  uint v2;
23 } triangle;
24 )";
25 };
26 
27 constexpr bool operator==(const triangle& a, const triangle& b) {
28  return a.surface == b.surface && a.v0 == b.v0 && a.v1 == b.v1 &&
29  a.v2 == b.v2;
30 }
31 
32 constexpr bool operator!=(const triangle& a, const triangle& b) {
33  return !(a == b);
34 }
35 
36 } // namespace core
37 } // namespace wayverb
Definition: representation.h:7
Definition: traits.cpp:2
Definition: scene_structs.h:28
Definition: capsule_base.h:9
Definition: triangle.h:8