Examples of glRotated()


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

            // Apply the heading and pitch if specified.
            if (heading != null || pitch != null)
            {
                gl.glTranslated(xscale / 2, yscale / 2, 0);
                if (pitch != null)
                    gl.glRotated(pitch, 1, 0, 0);
                if (heading != null)
                    gl.glRotated(heading, 0, 0, 1);
                gl.glTranslated(-xscale / 2, -yscale / 2, 0);
            }
View Full Code Here

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

            {
                gl.glTranslated(xscale / 2, yscale / 2, 0);
                if (pitch != null)
                    gl.glRotated(pitch, 1, 0, 0);
                if (heading != null)
                    gl.glRotated(heading, 0, 0, 1);
                gl.glTranslated(-xscale / 2, -yscale / 2, 0);
            }

            // Scale the unit quad
            gl.glScaled(xscale, yscale, 1);
View Full Code Here

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

            // Rotate around an axis originating from the center of the image and coming out of the screen.
            double hw = (double) texture.getWidth(dc) / 2d;
            double hh = (double) texture.getHeight(dc) / 2d;
            gl.glTranslated(hw, hh, 0);
            gl.glRotated(-this.getAngle().degrees, 0, 0, 1);
            gl.glTranslated(-hw, -hh, 0);

            super.transformBackgroundImageCoordsToAnnotationCoords(dc, width, height, texture);
        }
View Full Code Here

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

        final GL2 gl = gLDrawable.getGL().getGL2();
        gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT);
        gl.glLoadIdentity();
        gl.glTranslatef(-1.5f, 0.0f, -10.0f);
        gl.glColor3f(0f, 255f, 255f);
        gl.glRotated(20,20,0,20);
        gl.glBegin(GL2.GL_TRIANGLES);
        gl.glVertex3f(0.0f, 1.0f, 0.0f);
        gl.glVertex3f(-1.0f, -1.0f, 0.0f);
        gl.glVertex3f(1.0f, -1.0f, 0.0f);
        gl.glEnd();
View Full Code Here

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

        gl.glVertex3f(1.0f, -1.0f, 0.0f);
        gl.glEnd();

        gl.glTranslatef(3.0f, 0.0f, 0.0f);
        gl.glColor3f(0f,255f,0f);
        gl.glRotated(-20,-20,0,-20);
        gl.glBegin(GL2.GL_QUADS);
        gl.glVertex3f(-1.0f, 1.0f, 0.0f);
        gl.glVertex3f(1.0f, 1.0f, 0.0f);
        gl.glVertex3f(1.0f, -1.0f, 0.0f);
        gl.glVertex3f(-1.0f, -1.0f, 0.0f);
View Full Code Here

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

        gl.glVertex3f(-1.0f, -1.0f, 0.0f);
        gl.glEnd();

        gl.glTranslatef(3.0f, 0.0f, 0.0f);
        gl.glColor3f(255f,200f,0f);
        gl.glRotated(45,45,0,45);
        gl.glBegin(GL2.GL_QUADS);
        gl.glVertex3f(-0.5f, 0.5f, 0.0f);
        gl.glVertex3f(0.5f, 0.5f, 0.0f);
        gl.glVertex3f(0.5f, -0.5f, 0.0f);
        gl.glVertex3f(-0.5f, -0.5f, 0.0f);
View Full Code Here

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

       
        // Rotate prior to translating so that rotation happens from middle of
        // object.
        if (ortho) {
            // Manual rotation
            gl.glRotated(this.rotation.x, 0.0, 1.0, 0.0);
            gl.glRotated(this.rotation.y, 1.0, 0.0, 0.0);
            gl.glTranslated(-this.eye.x - this.center.x, -this.eye.y - this.center.y, -this.eye.z - this.center.z);
        } else {
            // Shift model to center of window.
            gl.glTranslated(-this.center.x, -this.center.y, 0);
View Full Code Here

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

        // Rotate prior to translating so that rotation happens from middle of
        // object.
        if (ortho) {
            // Manual rotation
            gl.glRotated(this.rotation.x, 0.0, 1.0, 0.0);
            gl.glRotated(this.rotation.y, 1.0, 0.0, 0.0);
            gl.glTranslated(-this.eye.x - this.center.x, -this.eye.y - this.center.y, -this.eye.z - this.center.z);
        } else {
            // Shift model to center of window.
            gl.glTranslated(-this.center.x, -this.center.y, 0);
        }
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.