animates the sphere */
| 148 | |
| 149 | /* animates the sphere */ |
| 150 | void animateSphere (int taskIndex, int threadIndex, Vertex* vertices, |
| 151 | const float rcpNumTheta, |
| 152 | const float rcpNumPhi, |
| 153 | const Vec3fa& pos, |
| 154 | const float r, |
| 155 | const float f) |
| 156 | { |
| 157 | int phi = taskIndex; |
| 158 | for (int theta=0; theta<data.numTheta; theta++) |
| 159 | { |
| 160 | Vertex* v = &vertices[phi*data.numTheta+theta]; |
| 161 | const float phif = phi*float(pi)*rcpNumPhi; |
| 162 | const float thetaf = theta*2.0f*float(pi)*rcpNumTheta; |
| 163 | v->x = pos.x + r*sin(f*phif)*sin(thetaf); |
| 164 | v->y = pos.y + r*cos(phif); |
| 165 | v->z = pos.z + r*sin(f*phif)*cos(thetaf); |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | /* task that renders a single screen tile */ |
| 170 | void renderPixelStandard(const TutorialData& data, |
no test coverage detected