Wayverb
Main Page
Related Pages
Classes
Files
File List
image_source.h
1
#pragma once
2
3
#include "raytracer/image_source/reflection_path_builder.h"
4
5
#include "core/cl/common.h"
6
#include "core/environment.h"
7
#include "core/spatial_division/scene_buffers.h"
8
9
namespace
wayverb
{
10
namespace
raytracer
{
11
namespace
reflection_processor {
12
13
class
image_source_group_processor
final {
14
public
:
15
image_source_group_processor
(
size_t
max_order,
size_t
items);
16
17
template
<
typename
It>
18
void
process(It b,
19
It e,
20
const
core::scene_buffers
&
/*buffers*/
,
21
size_t
step,
22
size_t
/*total*/
) {
23
if
(step < max_image_source_order_) {
24
builder_.push(b, e);
25
}
26
}
27
28
auto
get_results()
const
{
return
builder_.get_data(); }
29
30
private
:
31
size_t
max_image_source_order_;
32
33
raytracer::image_source::reflection_path_builder
builder_;
34
};
35
37
38
class
image_source_processor
final {
39
public
:
40
image_source_processor
(
41
const
glm::vec3& source,
42
const
glm::vec3& receiver,
43
const
core::environment
& environment,
44
const
core::voxelised_scene_data
<
45
cl_float3,
46
core::surface<core::simulation_bands>
>& voxelised,
47
size_t
max_order);
48
49
image_source_group_processor
get_group_processor(
50
size_t
num_directions)
const
;
51
void
accumulate(
const
image_source_group_processor
& processor);
52
53
util::aligned::vector<impulse<8>> get_results()
const
;
54
55
private
:
56
glm::vec3 source_;
57
glm::vec3 receiver_;
58
core::environment
environment_;
59
const
core::voxelised_scene_data
<cl_float3,
60
core::surface<core::simulation_bands>
>&
61
voxelised_;
62
size_t
num_directions_;
63
64
size_t
max_order_;
65
66
raytracer::image_source::tree
tree_;
67
};
68
70
71
class
make_image_source
final {
72
public
:
73
make_image_source
(
size_t
max_order);
74
75
image_source_processor
get_processor(
76
const
core::compute_context
& cc,
77
const
glm::vec3& source,
78
const
glm::vec3& receiver,
79
const
core::environment
& environment,
80
const
core::voxelised_scene_data
<
81
cl_float3,
82
core::surface<core::simulation_bands>
>& voxelised)
const
;
83
84
private
:
85
size_t
max_order_;
86
};
87
88
}
// namespace reflection_processor
89
}
// namespace raytracer
90
}
// namespace wayverb
wayverb::raytracer::image_source::tree
Definition:
tree.h:42
wayverb::raytracer::reflection_processor::image_source_processor
Definition:
image_source.h:38
wayverb::core::generic_scene_buffers
Definition:
scene_buffers.h:12
wayverb::core::surface< core::simulation_bands >
wayverb::raytracer::image_source::reflection_path_builder
Definition:
reflection_path_builder.h:10
raytracer
Definition:
pressure.h:22
wayverb::raytracer::reflection_processor::make_image_source
Definition:
image_source.h:71
wayverb::core::environment
Definition:
environment.h:6
wayverb
Definition:
capsule_base.h:9
wayverb::core::compute_context
invariant: device is a valid device for the context
Definition:
common.h:13
wayverb::core::voxelised_scene_data
Definition:
voxelised_scene_data.h:14
wayverb::raytracer::reflection_processor::image_source_group_processor
Definition:
image_source.h:13
src
raytracer
include
raytracer
reflection_processor
image_source.h
Generated by
1.8.11