History

Marker lines all the way out to 128Meters

Philip Rosedale committed 13 years ago

Commit 8aa8b5d1 parent b9a8d602 files · +25 −10Browse files

Showing the changes to interface/src/Util.cpp (1 of 2 files). Show all

Unified · Split

interface/src/Util.cpp+24−9
@@ -224,38 +224,53 @@ void noiseTest(int w, int h) { · 223 unmodified lines
224224 }
225225
226226 void renderWorldBox() {
227− // Show edge of world
227+ // Show edge of world
228+ float red[] = {1, 0, 0};
229+ float green[] = {0, 1, 0};
230+ float blue[] = {0, 0, 1};
231+ float gray[] = {0.5, 0.5, 0.5};
232+
228233 glDisable(GL_LIGHTING);
229− glColor4f(1.0, 1.0, 1.0, 1.0);
230234 glLineWidth(1.0);
231235 glBegin(GL_LINES);
232− glColor3f(1, 0, 0);
236+ glColor3fv(red);
233237 glVertex3f(0, 0, 0);
234238 glVertex3f(TREE_SCALE, 0, 0);
235− glColor3f(0, 1, 0);
239+ glColor3fv(green);
236240 glVertex3f(0, 0, 0);
237241 glVertex3f(0, TREE_SCALE, 0);
238− glColor3f(0, 0, 1);
242+ glColor3fv(blue);
239243 glVertex3f(0, 0, 0);
240244 glVertex3f(0, 0, TREE_SCALE);
245+ glColor3fv(gray);
246+ glVertex3f(0, 0, TREE_SCALE);
247+ glVertex3f(TREE_SCALE, 0, TREE_SCALE);
248+ glVertex3f(TREE_SCALE, 0, TREE_SCALE);
249+ glVertex3f(TREE_SCALE, 0, 0);
241250 glEnd();
242− // Draw little marker dots along the axis
251+ // Draw marker dots at very end
243252 glEnable(GL_LIGHTING);
244253 glPushMatrix();
245254 glTranslatef(TREE_SCALE, 0, 0);
246− glColor3f(1, 0, 0);
255+ glColor3fv(red);
247256 glutSolidSphere(0.125, 10, 10);
248257 glPopMatrix();
249258 glPushMatrix();
250259 glTranslatef(0, TREE_SCALE, 0);
251− glColor3f(0, 1, 0);
260+ glColor3fv(green);
252261 glutSolidSphere(0.125, 10, 10);
253262 glPopMatrix();
254263 glPushMatrix();
255264 glTranslatef(0, 0, TREE_SCALE);
256− glColor3f(0, 0, 1);
265+ glColor3fv(blue);
257266 glutSolidSphere(0.125, 10, 10);
258267 glPopMatrix();
268+ glPushMatrix();
269+ glColor3fv(gray);
270+ glTranslatef(TREE_SCALE, 0, TREE_SCALE);
271+ glutSolidSphere(0.125, 10, 10);
272+ glPopMatrix();
273+
259274 }
260275
261276 double diffclock(timeval *clock1,timeval *clock2)