olp-cpp-sdk  1.22.0
QuadTreeSubdivisionScheme.h
1 /*
2  * Copyright (C) 2019-2020 HERE Europe B.V.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  * SPDX-License-Identifier: Apache-2.0
17  * License-Filename: LICENSE
18  */
19 
20 #pragma once
21 
22 #include <string>
23 
24 #include <olp/core/geo/tiling/ISubdivisionScheme.h>
25 
26 namespace olp {
27 namespace geo {
28 
34 class CORE_API QuadTreeSubdivisionScheme final : public ISubdivisionScheme {
35  public:
36  QuadTreeSubdivisionScheme() = default;
37  ~QuadTreeSubdivisionScheme() override = default;
38 
39  bool IsEqualTo(const ISubdivisionScheme& other) const override;
40 
41  const std::string& GetName() const override;
42 
43  math::Size2u GetSubdivisionAt(unsigned level) const override;
44 
45  math::Size2u GetLevelSize(unsigned level) const override;
46 };
47 
48 } // namespace geo
49 } // namespace olp
An abstract tiling subdivision scheme.
Definition: ISubdivisionScheme.h:33
A quadtree subdivision scheme.
Definition: QuadTreeSubdivisionScheme.h:34
const std::string & GetName() const override
Gets the unique scheme name.
math::Size2u GetLevelSize(unsigned level) const override
Gets the size of a given level.
math::Size2u GetSubdivisionAt(unsigned level) const override
Gets the number of child tiles into which a tile splits at a given level.
bool IsEqualTo(const ISubdivisionScheme &other) const override
Checks whether two schemes are equal.
Represents the 2D size.
Definition: Size.h:28
Rules all the other namespaces.
Definition: AppleSignInProperties.h:24