| 26 | using namespace std; |
| 27 | |
| 28 | void generateColors(std::vector<float>& colors) |
| 29 | { |
| 30 | static const float AF_BLUE[] = {0.0588f , 0.1137f , 0.2745f , 1.0f}; |
| 31 | static const float AF_ORANGE[] = {0.8588f , 0.6137f , 0.0745f , 1.0f}; |
| 32 | |
| 33 | int numElems = NELEMS*NELEMS*NELEMS; |
| 34 | colors.clear(); |
| 35 | for (int i=0; i<numElems; ++i) { |
| 36 | if ((i%2) == 0) { |
| 37 | colors.push_back(AF_ORANGE[0]); |
| 38 | colors.push_back(AF_ORANGE[1]); |
| 39 | colors.push_back(AF_ORANGE[2]); |
| 40 | } else { |
| 41 | colors.push_back(AF_BLUE[0]); |
| 42 | colors.push_back(AF_BLUE[1]); |
| 43 | colors.push_back(AF_BLUE[2]); |
| 44 | } |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | void generatePoints(std::vector<float> &points, std::vector<float> &dirs) |
| 49 | { |