25concept CViewpoint = std::is_trivially_copyable_v<T> &&
requires
27 typename T::PMViewpointTag;
30template<
typename Derived>
36 template<EViewpo
intData TYPE>
37 static constexpr bool has();
39 template<EViewpo
intData TYPE>
40 decltype(
auto)
get()
const;
42 template<EViewpo
intData TYPE,
typename T>
43 void set(
const T& value);
53template<
typename Derived>
54template<EViewpo
intData TYPE>
57 static_assert(
requires
59 { Derived::template impl_has<TYPE>() } ->
CSame<bool>;
61 "A photon mapping viewpoint type must implement a static method callable as "
62 "`impl_has<EViewpointData{}>() -> bool`.");
64 return Derived::template impl_has<TYPE>();
67template<
typename Derived>
68template<EViewpo
intData TYPE>
71 static_assert(
requires (
const Derived derived)
75 "A photon mapping viewpoint type must implement a method callable as "
76 "`impl_get<EViewpointData{}>() const -> (any type)`.");
78 return static_cast<const Derived&
>(*this).template impl_get<TYPE>();
81template<
typename Derived>
82template<EViewpo
intData TYPE,
typename T>
85 static_assert(
requires (Derived derived, T value)
87 { derived.template impl_set<TYPE>(value) } ->
CSame<void>;
89 "A photon mapping viewpoint type must implement a method callable as "
90 "`impl_set<EViewpointData{}, T{}>(T{}) -> void`.");
92 static_cast<Derived&
>(*this).template impl_set<TYPE>(value);
Definition TViewpoint.h:32
void set(const T &value)
Definition TViewpoint.h:83
decltype(auto) get() const
Definition TViewpoint.h:69
void PMViewpointTag
Definition TViewpoint.h:34
static constexpr bool has()
Definition TViewpoint.h:55
PH_DEFINE_INLINE_RULE_OF_5_MEMBERS(TViewpoint)
Definition TViewpoint.h:25
The root for all renderer implementations.
Definition EEngineProject.h:6
EViewpointData
Definition TViewpoint.h:13