Cogs.Core
ClipmapLevel.h
1#pragma once
2
3#include "CogsTerrainBase.h"
4
5#include "Extent.h"
6#include "RenderTexture.h"
7
8namespace Cogs
9{
10 class RasterLevel;
11
12 struct COGSTERRAIN_API TextureOrigin
13 {
14 TextureOrigin(int x, int y) : x(x), y(y) {}
15 TextureOrigin() : x(0), y(0) {}
16
17 int x;
18 int y;
19
20 int operator[](size_t index) const {
21 return index == 0 ? x : y;
22 }
23 };
24
25 class COGSTERRAIN_API ClipmapLevel
26 {
27 public:
29
30 size_t index;
31 bool background;
32
33 RasterLevel * rasterLevel;
34
35 ClipmapLevel * coarserLevel;
36 ClipmapLevel * finerLevel;
37
38 RenderTexture renderTexture;
39
40 TextureOrigin origin;
41
42 bool offsetStripOnNorth;
43 bool offsetStripOnEast;
44
45 Extent currentExtent;
46 Extent nextExtent;
47
48 ClipmapLevel * normalLevel;
49
50 bool isHeight;
51
52 float minZ = 0;
53 float maxZ = 0;
54 };
55}
Contains all Cogs related functionality.
Definition: FieldSetter.h:23
Raster index extent.
Definition: Extent.h:7