Cheetah Software
1.0
|
#include <Checkerboard.h>
Public Member Functions | |
Checkerboard (float xSize, float ySize, size_t xSquares, size_t ySquares) | |
void | setDarkColor (const float *dark) |
void | setLightColor (const float *light) |
const float * | getSize () |
void | computeVertices (std::vector< float > &vertices, std::vector< float > &normals, std::vector< float > &colors) |
Private Attributes | |
const float * | _darkColor = checkerboardDark |
const float * | _lightColor = checkerboardLight |
float | _size [2] |
size_t | _squares [2] |
Definition at line 15 of file Checkerboard.h.
Checkerboard::Checkerboard | ( | float | xSize, |
float | ySize, | ||
size_t | xSquares, | ||
size_t | ySquares | ||
) |
Construct a new checkerboard at the origin
xSize | : width, meters |
ySize | : height, meters |
xSquares | : number of squares along x (must be at least 1) |
ySquares | : number of squares along y (must be at least 2) |
Definition at line 17 of file Checkerboard.cpp.
References _size, and _squares.
void Checkerboard::computeVertices | ( | std::vector< float > & | vertices, |
std::vector< float > & | normals, | ||
std::vector< float > & | colors | ||
) |
Update the checkerboard vertices for the current sizees
Definition at line 29 of file Checkerboard.cpp.
References _darkColor, _lightColor, _size, and _squares.
|
inline |
Get an array of x,y size (in the plane's coordinates, meters)
Definition at line 34 of file Checkerboard.h.
References _size, and computeVertices().
|
inline |
Set the color of the dark squares Do this before computeVertices
Definition at line 23 of file Checkerboard.h.
References _darkColor.
|
inline |
Set the color of the light squares Do this before computeVertices
Definition at line 29 of file Checkerboard.h.
References _lightColor.
|
private |
Definition at line 40 of file Checkerboard.h.
|
private |
Definition at line 41 of file Checkerboard.h.
|
private |
Definition at line 42 of file Checkerboard.h.
|
private |
Definition at line 43 of file Checkerboard.h.