Cheetah Software  1.0
Checkerboard.h
Go to the documentation of this file.
1 
7 #ifndef PROJECT_CHECKERBOARD_H
8 #define PROJECT_CHECKERBOARD_H
9 
10 #include "Colors.h"
11 #include "cTypes.h"
12 
13 #include <vector>
14 
15 class Checkerboard {
16  public:
17  Checkerboard(float xSize, float ySize, size_t xSquares, size_t ySquares);
18 
23  void setDarkColor(const float* dark) { _darkColor = dark; }
24 
29  void setLightColor(const float* light) { _lightColor = light; }
30 
34  const float* getSize() { return _size; }
35 
36  void computeVertices(std::vector<float>& vertices,
37  std::vector<float>& normals, std::vector<float>& colors);
38 
39  private:
40  const float* _darkColor = checkerboardDark;
42  float _size[2];
43  size_t _squares[2];
44 };
45 
46 #endif // PROJECT_CHECKERBOARD_H
Common types that are only valid in C++.
static constexpr float checkerboardLight[]
Definition: Colors.h:14
Checkerboard(float xSize, float ySize, size_t xSquares, size_t ySquares)
static constexpr float checkerboardDark[]
Definition: Colors.h:13
void computeVertices(std::vector< float > &vertices, std::vector< float > &normals, std::vector< float > &colors)
const float * getSize()
Definition: Checkerboard.h:34
const float * _lightColor
Definition: Checkerboard.h:41
void setLightColor(const float *light)
Definition: Checkerboard.h:29
size_t _squares[2]
Definition: Checkerboard.h:43
float _size[2]
Definition: Checkerboard.h:42
const float * _darkColor
Definition: Checkerboard.h:40
void setDarkColor(const float *dark)
Definition: Checkerboard.h:23
Some colors commonly used in the simulator.