Photon Engine
2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
acceleration_structure_basics.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Math/Geometry/TLineSegment.h
"
4
5
#include <Common/primitive_type.h>
6
#include <Common/config.h>
7
8
#include <concepts>
9
#include <optional>
10
#include <cstddef>
11
12
#define PH_PROFILE_ACCELERATION_STRUCTURES (1 && PH_PROFILING)
13
14
#if PH_PROFILE_ACCELERATION_STRUCTURES
15
#include <Common/profiling.h>
16
#endif
17
18
namespace
ph::math
19
{
20
21
template
<
typename
TesterFunc,
typename
Item>
22
concept
CItemSegmentIntersectionTesterVanilla
=
requires
(TesterFunc func, Item item)
23
{
24
{ func(item, TLineSegment<real>{}) } -> std::same_as<std::optional<real>>;
25
};
26
27
template
<
typename
TesterFunc,
typename
Item>
28
concept
CItemSegmentIntersectionTesterWithIndex
=
requires
(
29
TesterFunc func,
30
Item item,
31
TLineSegment<real> segment,
32
std::size_t itemIndex)
33
{
34
{ func(item, segment, itemIndex) } -> std::same_as<std::optional<real>>;
35
};
36
37
template
<
typename
TesterFunc,
typename
Item>
38
concept
CItemSegmentIntersectionTester
=
39
CItemSegmentIntersectionTesterVanilla<TesterFunc, Item>
||
40
CItemSegmentIntersectionTesterWithIndex<TesterFunc, Item>
;
41
42
}
// end namespace ph::math
TLineSegment.h
ph::math::CItemSegmentIntersectionTester
Definition
acceleration_structure_basics.h:38
ph::math::CItemSegmentIntersectionTesterVanilla
Definition
acceleration_structure_basics.h:22
ph::math::CItemSegmentIntersectionTesterWithIndex
Definition
acceleration_structure_basics.h:28
ph::math
Math functions and utilities.
Definition
TransformInfo.h:10
Source
Math
Algorithm
acceleration_structure_basics.h
Generated by
1.11.0