Package javax.media.opengl

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


                GraphicsContext3D gc = GraphicsContext3D.getGC();
    GL2 gl = gc.getGL();
    gl.glTranslatef(-1.5f, 0.0f, -6.0f);
    gl.glBegin(GL2.GL_TRIANGLES);
    gl.glVertex3f( 0.0f1.0f, 0.0f);
    gl.glVertex3f(-1.0f, -1.0f, 0.0f);
    gl.glVertex3f( 1.0f, -1.0f, 0.0f);
    gl.glEnd();
    gl.glTranslatef(3.0f, 0.0f, 0.0f);
    gl.glBegin(GL2.GL_QUADS);
    gl.glVertex3f(-1.0f1.0f, 0.0f);
View Full Code Here


    GL2 gl = gc.getGL();
    gl.glTranslatef(-1.5f, 0.0f, -6.0f);
    gl.glBegin(GL2.GL_TRIANGLES);
    gl.glVertex3f( 0.0f1.0f, 0.0f);
    gl.glVertex3f(-1.0f, -1.0f, 0.0f);
    gl.glVertex3f( 1.0f, -1.0f, 0.0f);
    gl.glEnd();
    gl.glTranslatef(3.0f, 0.0f, 0.0f);
    gl.glBegin(GL2.GL_QUADS);
    gl.glVertex3f(-1.0f1.0f, 0.0f);
    gl.glVertex3f( 1.0f1.0f, 0.0f);
View Full Code Here

    gl.glVertex3f(-1.0f, -1.0f, 0.0f);
    gl.glVertex3f( 1.0f, -1.0f, 0.0f);
    gl.glEnd();
    gl.glTranslatef(3.0f, 0.0f, 0.0f);
    gl.glBegin(GL2.GL_QUADS);
    gl.glVertex3f(-1.0f1.0f, 0.0f);
    gl.glVertex3f( 1.0f1.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

    gl.glVertex3f( 1.0f, -1.0f, 0.0f);
    gl.glEnd();
    gl.glTranslatef(3.0f, 0.0f, 0.0f);
    gl.glBegin(GL2.GL_QUADS);
    gl.glVertex3f(-1.0f1.0f, 0.0f);
    gl.glVertex3f( 1.0f1.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

    gl.glEnd();
    gl.glTranslatef(3.0f, 0.0f, 0.0f);
    gl.glBegin(GL2.GL_QUADS);
    gl.glVertex3f(-1.0f1.0f, 0.0f);
    gl.glVertex3f( 1.0f1.0f, 0.0f);
    gl.glVertex3f( 1.0f, -1.0f, 0.0f);
    gl.glVertex3f(-1.0f, -1.0f, 0.0f);
    gl.glEnd();
            }
           
            @Override
View Full Code Here

    gl.glTranslatef(3.0f, 0.0f, 0.0f);
    gl.glBegin(GL2.GL_QUADS);
    gl.glVertex3f(-1.0f1.0f, 0.0f);
    gl.glVertex3f( 1.0f1.0f, 0.0f);
    gl.glVertex3f( 1.0f, -1.0f, 0.0f);
    gl.glVertex3f(-1.0f, -1.0f, 0.0f);
    gl.glEnd();
            }
           
            @Override
            public void postRender() {
View Full Code Here

    float cx = center.x;
    float cy = center.y;
    gl.glBegin(GL2.GL_LINE_LOOP);
    gl.glColor4f(color.x, color.y, color.z, 1);
    for (int i = 0; i < NUM_CIRCLE_POINTS; i++) {
      gl.glVertex3f(x + cx, y + cy, 0);
      // apply the rotation matrix
      float temp = x;
      x = c * x - s * y;
      y = s * temp + c * y;
    }
View Full Code Here

    float cx = center.x;
    float cy = center.y;
    gl.glBegin(GL2.GL_LINE_LOOP);
    gl.glColor4f(color.x, color.y, color.z, 1);
    for (int i = 0; i < NUM_CIRCLE_POINTS; i++) {
      gl.glVertex3f(x + cx, y + cy, 0);
      // apply the rotation matrix
      float temp = x;
      x = c * x - s * y;
      y = s * temp + c * y;
    }
View Full Code Here

      x = c * x - s * y;
      y = s * temp + c * y;
    }
    gl.glEnd();
    gl.glBegin(GL2.GL_LINES);
    gl.glVertex3f(cx, cy, 0);
    gl.glVertex3f(cx + axis.x * radius, cy + axis.y * radius, 0);
    gl.glEnd();
    gl.glPopMatrix();
  }

View Full Code Here

      y = s * temp + c * y;
    }
    gl.glEnd();
    gl.glBegin(GL2.GL_LINES);
    gl.glVertex3f(cx, cy, 0);
    gl.glVertex3f(cx + axis.x * radius, cy + axis.y * radius, 0);
    gl.glEnd();
    gl.glPopMatrix();
  }

  @Override
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.