com.sun.opengl.util

Class GLUT


public class GLUT
extends Object

Subset of the routines provided by the GLUT interface. Note the signatures of many of the methods are necessarily different than the corresponding C version. A GLUT object must only be used from one particular thread at a time.

Copyright (c) Mark J. Kilgard, 1994, 1997.

(c) Copyright 1993, Silicon Graphics, Inc.

ALL RIGHTS RESERVED

Permission to use, copy, modify, and distribute this software for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both the copyright notice and this permission notice appear in supporting documentation, and that the name of Silicon Graphics, Inc. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.

THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.

US Government Users Restricted Rights

Use, duplication, or disclosure by the Government is subject to restrictions set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or in similar or successor clauses in the FAR or the DOD or NASA FAR Supplement. Unpublished-- rights reserved under the copyright laws of the United States. Contractor/manufacturer is Silicon Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.

OpenGL(TM) is a trademark of Silicon Graphics, Inc.

Field Summary

static int
BITMAP_8_BY_13
static int
BITMAP_9_BY_15
static int
BITMAP_HELVETICA_10
static int
BITMAP_HELVETICA_12
static int
BITMAP_HELVETICA_18
static int
BITMAP_TIMES_ROMAN_10
static int
BITMAP_TIMES_ROMAN_24
static int
STROKE_MONO_ROMAN
static int
STROKE_ROMAN

Method Summary

void
glutBitmapCharacter(int font, char character)
int
glutBitmapLength(int font, String string)
void
glutBitmapString(int font, String string)
int
glutBitmapWidth(int font, char character)
void
glutSolidCone(double base, double height, int slices, int stacks)
void
glutSolidCube(float size)
void
glutSolidDodecahedron()
void
glutSolidIcosahedron()
void
glutSolidOctahedron()
void
glutSolidSphere(double radius, int slices, int stacks)
void
glutSolidTeapot(double scale)
Renders the teapot as a solid shape of the specified size.
void
glutSolidTeapot(double scale, boolean cStyle)
Renders the teapot as a solid shape of the specified size.
void
glutSolidTetrahedron()
void
glutSolidTorus(double innerRadius, double outerRadius, int nsides, int rings)
void
glutStrokeCharacter(int font, char character)
int
glutStrokeLength(int font, String string)
float
glutStrokeLengthf(int font, String string)
void
glutStrokeString(int font, String string)
int
glutStrokeWidth(int font, char character)
float
glutStrokeWidthf(int font, char character)
void
glutWireCone(double base, double height, int slices, int stacks)
void
glutWireCube(float size)
void
glutWireDodecahedron()
void
glutWireIcosahedron()
void
glutWireOctahedron()
void
glutWireSphere(double radius, int slices, int stacks)
void
glutWireTeapot(double scale)
Renders the teapot as a wireframe shape of the specified size.
void
glutWireTeapot(double scale, boolean cStyle)
Renders the teapot as a wireframe shape of the specified size.
void
glutWireTetrahedron()
void
glutWireTorus(double innerRadius, double outerRadius, int nsides, int rings)

Field Details

BITMAP_8_BY_13

public static final int BITMAP_8_BY_13
Field Value:
3

BITMAP_9_BY_15

public static final int BITMAP_9_BY_15
Field Value:
2

BITMAP_HELVETICA_10

public static final int BITMAP_HELVETICA_10
Field Value:
6

BITMAP_HELVETICA_12

public static final int BITMAP_HELVETICA_12
Field Value:
7

BITMAP_HELVETICA_18

public static final int BITMAP_HELVETICA_18
Field Value:
8

BITMAP_TIMES_ROMAN_10

public static final int BITMAP_TIMES_ROMAN_10
Field Value:
4

BITMAP_TIMES_ROMAN_24

public static final int BITMAP_TIMES_ROMAN_24
Field Value:
5

STROKE_MONO_ROMAN

public static final int STROKE_MONO_ROMAN
Field Value:
1

STROKE_ROMAN

public static final int STROKE_ROMAN
Field Value:
0

Method Details

glutBitmapCharacter

public void glutBitmapCharacter(int font,
                                char character)

glutBitmapLength

public int glutBitmapLength(int font,
                            String string)

glutBitmapString

public void glutBitmapString(int font,
                             String string)

glutBitmapWidth

public int glutBitmapWidth(int font,
                           char character)

glutSolidCone

public void glutSolidCone(double base,
                          double height,
                          int slices,
                          int stacks)

glutSolidCube

public void glutSolidCube(float size)

glutSolidDodecahedron

public void glutSolidDodecahedron()

glutSolidIcosahedron

public void glutSolidIcosahedron()

glutSolidOctahedron

public void glutSolidOctahedron()

glutSolidSphere

public void glutSolidSphere(double radius,
                            int slices,
                            int stacks)

glutSolidTeapot

public void glutSolidTeapot(double scale)
Renders the teapot as a solid shape of the specified size. The teapot is created in a way that replicates the C GLUT implementation.
Parameters:
scale - the factor by which to scale the teapot

glutSolidTeapot

public void glutSolidTeapot(double scale,
                            boolean cStyle)
Renders the teapot as a solid shape of the specified size. The teapot can either be created in a way that is backward-compatible with the standard C glut library (i.e. broken), or in a more pleasing way (i.e. with surfaces whose front-faces point outwards and standing on the z=0 plane, instead of the y=-1 plane). Both surface normals and texture coordinates for the teapot are generated. The teapot is generated with OpenGL evaluators.
Parameters:
scale - the factor by which to scale the teapot
cStyle - whether to create the teapot in exactly the same way as in the C implementation of GLUT

glutSolidTetrahedron

public void glutSolidTetrahedron()

glutSolidTorus

public void glutSolidTorus(double innerRadius,
                           double outerRadius,
                           int nsides,
                           int rings)

glutStrokeCharacter

public void glutStrokeCharacter(int font,
                                char character)

glutStrokeLength

public int glutStrokeLength(int font,
                            String string)

glutStrokeLengthf

public float glutStrokeLengthf(int font,
                               String string)

glutStrokeString

public void glutStrokeString(int font,
                             String string)

glutStrokeWidth

public int glutStrokeWidth(int font,
                           char character)

glutStrokeWidthf

public float glutStrokeWidthf(int font,
                              char character)

glutWireCone

public void glutWireCone(double base,
                         double height,
                         int slices,
                         int stacks)

glutWireCube

public void glutWireCube(float size)

glutWireDodecahedron

public void glutWireDodecahedron()

glutWireIcosahedron

public void glutWireIcosahedron()

glutWireOctahedron

public void glutWireOctahedron()

glutWireSphere

public void glutWireSphere(double radius,
                           int slices,
                           int stacks)

glutWireTeapot

public void glutWireTeapot(double scale)
Renders the teapot as a wireframe shape of the specified size. The teapot is created in a way that replicates the C GLUT implementation.
Parameters:
scale - the factor by which to scale the teapot

glutWireTeapot

public void glutWireTeapot(double scale,
                           boolean cStyle)
Renders the teapot as a wireframe shape of the specified size. The teapot can either be created in a way that is backward-compatible with the standard C glut library (i.e. broken), or in a more pleasing way (i.e. with surfaces whose front-faces point outwards and standing on the z=0 plane, instead of the y=-1 plane). Both surface normals and texture coordinates for the teapot are generated. The teapot is generated with OpenGL evaluators.
Parameters:
scale - the factor by which to scale the teapot
cStyle - whether to create the teapot in exactly the same way as in the C implementation of GLUT

glutWireTetrahedron

public void glutWireTetrahedron()

glutWireTorus

public void glutWireTorus(double innerRadius,
                          double outerRadius,
                          int nsides,
                          int rings)

Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.