Examples of glRotatef()


Examples of javax.media.opengl.GL2.glRotatef()

    // Rotate the entire assembly of gears based on how the user
    // dragged the mouse around
    gl.glPushMatrix();
    gl.glRotatef(view_rotx, 1.0f, 0.0f, 0.0f);
    gl.glRotatef(view_roty, 0.0f, 1.0f, 0.0f);
    gl.glRotatef(view_rotz, 0.0f, 0.0f, 1.0f);
           
    // Place the first gear and call its display list
    gl.glPushMatrix();
    gl.glTranslatef(-3.0f, -2.0f, 0.0f);
    gl.glRotatef(angle, 0.0f, 0.0f, 1.0f);
View Full Code Here

Examples of javax.media.opengl.GL2.glRotatef()

    gl.glRotatef(view_rotz, 0.0f, 0.0f, 1.0f);
           
    // Place the first gear and call its display list
    gl.glPushMatrix();
    gl.glTranslatef(-3.0f, -2.0f, 0.0f);
    gl.glRotatef(angle, 0.0f, 0.0f, 1.0f);
    gl.glCallList(gear1);
    gl.glPopMatrix();
           
    // Place the second gear and call its display list
    gl.glPushMatrix();
View Full Code Here

Examples of javax.media.opengl.GL2.glRotatef()

    gl.glPopMatrix();
           
    // Place the second gear and call its display list
    gl.glPushMatrix();
    gl.glTranslatef(3.1f, -2.0f, 0.0f);
    gl.glRotatef(-2.0f * angle - 9.0f, 0.0f, 0.0f, 1.0f);
    gl.glCallList(gear2);
    gl.glPopMatrix();
           
    // Place the third gear and call its display list
    gl.glPushMatrix();
View Full Code Here

Examples of javax.microedition.khronos.opengles.GL11.glRotatef()

        // Transform the cube
        gl.glMatrixMode(GL10.GL_MODELVIEW);
        gl.glLoadIdentity();
        gl.glTranslatef(0, 0, -3.5f);
        gl.glRotatef(_rotation.getFloat(), 1.0f, 1.0f, 0.0f);

        // Enable position, normal and texture coordinates
        _cube.enableVertexAttrib();
        _cube.enableTexcoordAttrib();
        _cube.enableNormalAttrib();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.