void AntiAliasWidget::drawBasketBaloon()
{
glPushMatrix(); //Save the current transformation state
glTranslatef(_height*1.7f-7.0f, 5.0f, -2.0f); //Move to the center of the baloon
glColor3f(0.5f, 0.5f, 1.0f);
glutSolidSphere(0.4f, 200, 200);
glPopMatrix(); //Undo the move to the center of the baloon
glPushMatrix(); //Save the current transformation state
glTranslatef(_height*1.7f-7.0f, 4.0f, -2.0f); //Move to the center of the light
glColor3f(1.0f, 0.7f, 0.0f);
glutSolidCube(0.2f);
glBegin(GL_LINES);
glColor3f(0.0f, 0.0f, 0.0f); //Set color of the bar to black
glVertex3f(0.0f, 0.7f, 0.0f);
glVertex3f(0.1f, 0.0f, 0.1f);
glVertex3f(0.0f, 0.7f, 0.0f);
glVertex3f(0.1f, 0.0f, -0.1f);
glVertex3f(0.0f, 0.7f, 0.0f);
glVertex3f(-0.1f, 0.0f, 0.1f);
glVertex3f(0.0f, 0.7f, 0.0f);
glVertex3f(-0.1f, 0.0f, -0.1f);
glEnd();
glPopMatrix(); //Undo the move to the center of the baloon
glFlush();
}
void AntiAliasWidget::drawBasketBaloon()
{
glPushMatrix(); //Save the current transformation state
glTranslatef(_height*1.7f-7.0f, 5.0f, -2.0f); //Move to the center of the baloon
glColor3f(0.5f, 0.5f, 1.0f);
glutSolidSphere(0.4f, 200, 200);
glPopMatrix(); //Undo the move to the center of the baloon
glPushMatrix(); //Save the current transformation state
glTranslatef(_height*1.7f-7.0f, 4.0f, -2.0f); //Move to the center of the light
glColor3f(1.0f, 0.7f, 0.0f);
glutSolidCube(0.2f);
glBegin(GL_LINES);
glColor3f(0.0f, 0.0f, 0.0f); //Set color of the bar to black
glVertex3f(0.0f, 0.7f, 0.0f);
glVertex3f(0.1f, 0.0f, 0.1f);
glVertex3f(0.0f, 0.7f, 0.0f);
glVertex3f(0.1f, 0.0f, -0.1f);
glVertex3f(0.0f, 0.7f, 0.0f);
glVertex3f(-0.1f, 0.0f, 0.1f);
glVertex3f(0.0f, 0.7f, 0.0f);
glVertex3f(-0.1f, 0.0f, -0.1f);
glEnd();
glPopMatrix(); //Undo the move to the center of the baloon
glFlush();
}
To copy to clipboard, switch view to plain text mode
Bookmarks