Example #1
0
 public void render(GLAutoDrawable drawable) {
   GL2 gl = drawable.getGL().getGL2();
   gl.glPushMatrix();
   gl.glTranslated(
       body.getPosition().get0(), body.getPosition().get1(), body.getPosition().get2());
   GLUquadric bulletGeom = glu.gluNewQuadric();
   glu.gluQuadricDrawStyle(bulletGeom, GLU.GLU_FILL);
   glu.gluQuadricNormals(bulletGeom, GLU.GLU_SMOOTH);
   glu.gluDisk(bulletGeom, 0.3, 0.4, 5, 5);
   gl.glPopMatrix();
 }
Example #2
0
  /** Draws a canonical circular particle. */
  private static void drawParticle(GL gl, Point3d p, double r) {
    double radius = r;

    double vectorY1 = p.y;
    double vectorX1 = p.x;
    double vectorZ1 = p.z;

    GLU glu = new GLU();
    GLUquadric quadratic = glu.gluNewQuadric();
    glu.gluQuadricNormals(quadratic, GLU.GLU_SMOOTH);
    glu.gluQuadricTexture(quadratic, true);

    gl.glPushMatrix();
    gl.glTranslated(p.x, p.y, p.z);
    glu.gluSphere(quadratic, radius, 12, 12);
    gl.glPopMatrix();
  }
Example #3
0
 public BaconTable(GLU glu) {
   quadric = glu.gluNewQuadric();
   glu.gluQuadricDrawStyle(quadric, GLU.GLU_FILL); // GLU_POINT, GLU_LINE, GLU_FILL, GLU_SILHOUETTE
   glu.gluQuadricNormals(quadric, GLU.GLU_NONE); // GLU_NONE, GLU_FLAT, or GLU_SMOOTH
   glu.gluQuadricTexture(quadric, true); // false, or true to generate texture coordinates
 }