| 151 | |
| 152 | /* called by the C++ code for initialization */ |
| 153 | extern "C" void device_init (char* cfg) |
| 154 | { |
| 155 | /* create scene */ |
| 156 | TutorialData_Constructor(&data); |
| 157 | |
| 158 | data.query_point = g_query_point; |
| 159 | data.num_points = g_num_points; |
| 160 | data.num_knn = g_num_knn; |
| 161 | data.show_voronoi = g_show_voronoi; |
| 162 | data.point_repulsion = g_point_repulsion; |
| 163 | data.tmax = g_tmax; |
| 164 | |
| 165 | g_scene = data.scene = rtcNewScene(g_device); |
| 166 | createPoints(data); |
| 167 | rtcCommitScene(data.scene); |
| 168 | |
| 169 | data.colors = (Vec3fa*) alignedMalloc(NUM_COLORS*sizeof(Point), 16); |
| 170 | for (int r = 0; r < 3; ++r) for (int g = 0; g < 3; ++g) for (int b = 0; b < 3; ++b) |
| 171 | data.colors[r * 9 + g * 3 + b] = Vec3fa(0.2f + 0.3f * r, 0.2f + 0.3f * g, 0.2f + 0.3f * b); |
| 172 | } |
| 173 | |
| 174 | /* renders a single screen tile */ |
| 175 | void renderTileStandard(int taskIndex, |
nothing calls this directly
no test coverage detected