Examples of glVertex2d()


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

      gl.glVertex2d(centerX - halfWidth, centerY - halfWidth);
      gl.glVertex2d(centerX - halfHeight, centerY - halfWidth);
      // right part.
      gl.glVertex2d(centerX + halfWidth, centerY + halfWidth);
      gl.glVertex2d(centerX + halfHeight, centerY + halfWidth);
      gl.glVertex2d(centerX + halfHeight, centerY - halfWidth);
      gl.glVertex2d(centerX + halfWidth, centerY - halfWidth);
      gl.glVertex3d(0, 0, 0);
      gl.glEnd();
    }
View Full Code Here

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

      gl.glVertex2d(centerX - halfHeight, centerY - halfWidth);
      // right part.
      gl.glVertex2d(centerX + halfWidth, centerY + halfWidth);
      gl.glVertex2d(centerX + halfHeight, centerY + halfWidth);
      gl.glVertex2d(centerX + halfHeight, centerY - halfWidth);
      gl.glVertex2d(centerX + halfWidth, centerY - halfWidth);
      gl.glVertex3d(0, 0, 0);
      gl.glEnd();
    }

    gl.glPopMatrix();
View Full Code Here

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

            //Starting loop for drawing triangles

            gl.glBegin(GL2.GL_POLYGON);
            for (double angle = 0; angle < 2 * Math.PI; angle += increment)
            {
                gl.glVertex2d(cx + Math.cos(angle) * radius, cy + Math.sin(angle) * radius);
                gl.glVertex2d(cx + Math.cos(angle + increment) * radius, cy + Math.sin(angle + increment) * radius);
            }
            gl.glEnd();
        }

View Full Code Here

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

            gl.glBegin(GL2.GL_POLYGON);
            for (double angle = 0; angle < 2 * Math.PI; angle += increment)
            {
                gl.glVertex2d(cx + Math.cos(angle) * radius, cy + Math.sin(angle) * radius);
                gl.glVertex2d(cx + Math.cos(angle + increment) * radius, cy + Math.sin(angle + increment) * radius);
            }
            gl.glEnd();
        }

        /* Re-enable color */
 
View Full Code Here

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

            //Starting loop for drawing triangles

            gl.glBegin(GL2.GL_POLYGON);
            for (double angle = 0; angle < 2 * Math.PI; angle += increment)
            {
                gl.glVertex2d(cx + Math.cos(angle) * radius, cy + Math.sin(angle) * radius);
                gl.glVertex2d(cx + Math.cos(angle + increment) * radius, cy + Math.sin(angle + increment) * radius);
            }
            gl.glEnd();
        }

View Full Code Here

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

            gl.glBegin(GL2.GL_POLYGON);
            for (double angle = 0; angle < 2 * Math.PI; angle += increment)
            {
                gl.glVertex2d(cx + Math.cos(angle) * radius, cy + Math.sin(angle) * radius);
                gl.glVertex2d(cx + Math.cos(angle + increment) * radius, cy + Math.sin(angle + increment) * radius);
            }
            gl.glEnd();
        }

        // pop current color
View Full Code Here

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

        for (double angle = 0; angle < 2 * Math.PI; angle += increment)
        {
            //One vertex of each triangle is at center of circle
            //gl.glVertex2d(cx, cy);
            //Other two vertices form the periphery of the circle
            gl.glVertex2d(cx + Math.cos(angle) * radius, cy + Math.sin(angle) * radius);
            gl.glVertex2d(cx + Math.cos(angle + increment) * radius, cy + Math.sin(angle + increment) * radius);
        }
        gl.glEnd();
    }

View Full Code Here

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

        {
            //One vertex of each triangle is at center of circle
            //gl.glVertex2d(cx, cy);
            //Other two vertices form the periphery of the circle
            gl.glVertex2d(cx + Math.cos(angle) * radius, cy + Math.sin(angle) * radius);
            gl.glVertex2d(cx + Math.cos(angle + increment) * radius, cy + Math.sin(angle + increment) * radius);
        }
        gl.glEnd();
    }


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.