MeshLib C++ Docs
Loading...
Searching...
No Matches
MRHexPalette.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4#include "MRColor.h"
5
6#include <array>
7
8namespace MR
9{
12
13
17{
18 static constexpr int CORNER_COLORS = 6;
19 static constexpr int SIDE_COLORS = 5;
20 static constexpr int N = CORNER_COLORS * SIDE_COLORS;
21
23 static constexpr int STEP = 17;
24
26 MRMESH_API static const std::array<Color, N> colors;
27
29 static Color colorAtStep( int i ) { return colors[( i * STEP ) % N]; }
30};
31
32}
#define MRMESH_API
Definition MRMeshFwd.h:82
static Color colorAtStep(int i)
returns the i-th color in stride order, so successive i values give visually distinct colors
Definition MRHexPalette.h:29
static const std::array< Color, N > colors
the palette colors, populated at compile time
Definition MRHexPalette.h:26
static constexpr int SIDE_COLORS
Definition MRHexPalette.h:19
static constexpr int STEP
recommended step from previous color to next color, to have big visual difference,...
Definition MRHexPalette.h:23
static constexpr int CORNER_COLORS
Definition MRHexPalette.h:18
static constexpr int N
num colors between two corner colors + 1
Definition MRHexPalette.h:20
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRColor.h:12
Definition MRHexPalette.h:17