Visual Computing Library  devel
Loading...
Searching...
No Matches
view_projection.h
1/*****************************************************************************
2 * VCLib *
3 * Visual Computing Library *
4 * *
5 * Copyright(C) 2021-2025 *
6 * Visual Computing Lab *
7 * ISTI - Italian National Research Council *
8 * *
9 * All rights reserved. *
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the Mozilla Public License Version 2.0 as published *
13 * by the Mozilla Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 * This program is distributed in the hope that it will be useful, *
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
19 * Mozilla Public License Version 2.0 *
20 * (https://www.mozilla.org/en-US/MPL/2.0/) for more details. *
21 ****************************************************************************/
22
23#ifndef VCL_RENDER_CONCEPTS_VIEW_PROJECTION_H
24#define VCL_RENDER_CONCEPTS_VIEW_PROJECTION_H
25
26#include "directional_light.h"
27
28namespace vcl {
29
30template<typename T>
31concept ViewProjectionConcept = requires (
32 T&& obj,
33 typename RemoveRef<T>::ScalarType s,
34 typename RemoveRef<T>::PointType p) {
35 typename RemoveRef<T>::ScalarType;
36 typename RemoveRef<T>::PointType;
37 typename RemoveRef<T>::MatrixType;
38
39 { obj.viewMatrix() } -> Matrix44Concept;
40 { obj.projectionMatrix() } -> Matrix44Concept;
41
42 { obj.light() } -> DirectionalLightConcept;
43
44 // non const requirements
45 requires IsConst<T> || requires {
46 { obj.reset() } -> std::same_as<void>;
47
48 { obj.focus(p) } -> std::same_as<void>;
49 { obj.fitScene(p, s) } -> std::same_as<void>;
50 };
51};
52
53} // namespace vcl
54
55#endif // VCL_RENDER_CONCEPTS_VIEW_PROJECTION_H
Definition directional_light.h:31
The IsConst concept is satisfied if T satisfies one of the following conditions:
Definition const_correctness.h:43
Concept for 4x4 matrices.
Definition matrix.h:62
Definition view_projection.h:31