private void init_object() { // different drawing styles and surface normal specification display_list = gl.gen_lists(4); gnu.x11.extension.glx.Quadric quadric = new gnu.x11.extension.glx.Quadric(gl); // smooth shaded quadric.draw_style = gnu.x11.extension.glx.Quadric.FILL; quadric.normals = gnu.x11.extension.glx.Quadric.SMOOTH; gl.new_list(display_list, GL.COMPILE); quadric.sphere(0.75, 15, 10); gl.end_list(); // flat shaded quadric.draw_style = gnu.x11.extension.glx.Quadric.FILL; quadric.normals = gnu.x11.extension.glx.Quadric.FLAT; gl.new_list(display_list + 1, GL.COMPILE); quadric.cylinder(0.5, 0.3, 1.0, 15, 5); gl.end_list(); // all polygon wireframe quadric.draw_style = gnu.x11.extension.glx.Quadric.LINE; quadric.normals = gnu.x11.extension.glx.Quadric.NONE; gl.new_list(display_list + 2, GL.COMPILE); quadric.disk(0.25, 1.0, 20, 4); gl.end_list(); // boundary only quadric.draw_style = gnu.x11.extension.glx.Quadric.SILHOUETTE; quadric.normals = gnu.x11.extension.glx.Quadric.NONE; gl.new_list(display_list + 3, GL.COMPILE); quadric.partial_disk(0.0, 1.0, 20, 4, 0.0, 225.0); gl.end_list(); }
/** * @see <a href="glutWireCone.html">glutWireCone</a> */ public void wire_cone(double base_radius, double height, int slices, int stacks) { Quadric quadric = new Quadric(gl); quadric.draw_style = Quadric.LINE; quadric.normals = GLU.SMOOTH; quadric.cylinder(base_radius, 0.0f, height, slices, stacks); }
/** * @see <a href="glutWireCone.html">glutWireCone</a> */ public void wire_cone(double base_radius, double height, int slices, int stacks) { Quadric quadric = new Quadric (gl); quadric.draw_style = Quadric.LINE; quadric.normals = GLU.SMOOTH; quadric.cylinder (base_radius, 0.0f, height, slices, stacks); }
private void init_object() { // different drawing styles and surface normal specification display_list = gl.gen_lists (4); gnu.x11.extension.glx.Quadric quadric = new gnu.x11.extension.glx.Quadric (gl); // smooth shaded quadric.draw_style = gnu.x11.extension.glx.Quadric.FILL; quadric.normals = gnu.x11.extension.glx.Quadric.SMOOTH; gl.new_list (display_list, GL.COMPILE); quadric.sphere (0.75, 15, 10); gl.end_list (); // flat shaded quadric.draw_style = gnu.x11.extension.glx.Quadric.FILL; quadric.normals = gnu.x11.extension.glx.Quadric.FLAT; gl.new_list (display_list+1, GL.COMPILE); quadric.cylinder (0.5, 0.3, 1.0, 15, 5); gl.end_list (); // all polygon wireframe quadric.draw_style = gnu.x11.extension.glx.Quadric.LINE; quadric.normals = gnu.x11.extension.glx.Quadric.NONE; gl.new_list (display_list+2, GL.COMPILE); quadric.disk (0.25, 1.0, 20, 4); gl.end_list (); // boundary only quadric.draw_style = gnu.x11.extension.glx.Quadric.SILHOUETTE; quadric.normals = gnu.x11.extension.glx.Quadric.NONE; gl.new_list (display_list+3, GL.COMPILE); quadric.partial_disk (0.0, 1.0, 20, 4, 0.0, 225.0); gl.end_list (); }