Exemple #1
0
void snowman() //отрисовка снеговика
{
	glPushMatrix();
	double c = 0.9;
	glColor4d(0.75, 0.75, 0.75, c);

	glTranslated(0, -3, 0);
	auxSolidSphere(2.0);

	glTranslated(0, 3, 0);
	auxSolidSphere(1.5);

	glColor4d(0.75, 0.75, 0.75, c);
	glTranslated(0, 2, 0);
	auxSolidSphere(1);

	glColor4d(0, 0, 0, c);
	glTranslated(-0.3, 0.3, 1);
	auxSolidSphere(0.1);
	
	glTranslated(0.6, 0, 0);
	auxSolidSphere(0.1);
	
	glTranslated(-0.3, -0.3, 0);
	glColor4d(1, 0, 0, c);
	auxSolidCone(0.3, 0.5);
	
	glTranslated(0, 0.75, -1);
	glColor4d(0, 0, 1, c);
	auxSolidCylinder(0.75, 2.);

	glPopMatrix();
}
void display(void)
{
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

    glPushMatrix ();
    glRotatef (20.0, 1.0, 0.0, 0.0);

    glPushMatrix ();
    glTranslatef (-0.75, 0.5, 0.0); 
    glRotatef (90.0, 1.0, 0.0, 0.0);
    auxSolidTorus (0.275, 0.85);
    glPopMatrix ();

    glPushMatrix ();
    glTranslatef (-0.75, -0.5, 0.0); 
    glRotatef (270.0, 1.0, 0.0, 0.0);
    auxSolidCone (1.0, 2.0);
    glPopMatrix ();

    glPushMatrix ();
    glTranslatef (0.75, 0.0, -1.0); 
    auxSolidSphere (1.0);
    glPopMatrix ();

    glPopMatrix ();
    glFlush();
}
Exemple #3
0
CEE3DINPROC_API void _stdcall CeE3DSolidCone(GLdouble a, GLdouble b) {
	auxSolidCone(a, b); 
}