Ponca  4d2a58fa5c6375adef5c4b208f4d47e016cecd6d
Point Cloud Analysis library
Loading...
Searching...
No Matches
concepts.h
1/*
2This Source Code Form is subject to the terms of the Mozilla Public
3 License, v. 2.0. If a copy of the MPL was not distributed with this
4 file, You can obtain one at http://mozilla.org/MPL/2.0/.
5*/
6
7#pragma once
8#include <concepts>
9
10namespace Ponca
11{
12 template <typename T>
13 concept ProvidesCommonTypes = requires(T t) {
14 typename T::Scalar;
15 typename T::VectorType;
16 };
17
18 template <typename T>
19 concept IsPoint = ProvidesCommonTypes<T> && requires(const T ct) { ct.pos(); };
20
21 template <typename T>
22 concept IsPointNormal = IsPoint<T> && requires(const T ct) { ct.normal(); };
23
24 template <typename T>
25 concept Is3D = (T::Dim == 3);
26}; // namespace Ponca
This Source Code Form is subject to the terms of the Mozilla Public License, v.
Definition concepts.h:11