Top Description Fields Constructors Methods
org.lwjgl.test.opengl

public Class Gears

extends Object
Class Inheritance
Imports
java.nio.FloatBuffer, org.lwjgl.BufferUtils, .LWJGLException, .LWJGLUtil, .Sys, org.lwjgl.opengl.Display, .DisplayMode, .GLContext

This is the OpenGL "standard" Gears demo, originally by Brian Paul

Author
Brian Matzon
Version
$Revision$ $Id$

Field Summary

Modifier and TypeField and Description
private float
private int
private int
private int
private float
private float
private float

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
private void
private void
gear(float
radius of hole at center
inner_radius
,
float
radius at center of teeth
outer_radius
,
float
width of gear
width
,
int
number of teeth
teeth
,
float
depth of tooth
tooth_depth
)

Draw a gear wheel.

private void
init()

private void
loop()

public static void
main(String[] args)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

angleback to summary
private float angle
gear1back to summary
private int gear1
gear2back to summary
private int gear2
gear3back to summary
private int gear3
view_rotxback to summary
private float view_rotx
view_rotyback to summary
private float view_roty
view_rotzback to summary
private float view_rotz

Constructor Detail

Gearsback to summary
public Gears()

Method Detail

destroyback to summary
private void destroy()
executeback to summary
private void execute()
gearback to summary
private void gear(float inner_radius, float outer_radius, float width, int teeth, float tooth_depth)

Draw a gear wheel. You'll probably want to call this function when building a display list since we do a lot of trig here.

Parameters
inner_radius:float

radius of hole at center

outer_radius:float

radius at center of teeth

width:float

width of gear

teeth:int

number of teeth

tooth_depth:float

depth of tooth

initback to summary
private void init() throws LWJGLException
loopback to summary
private void loop()
mainback to summary
public static void main(String[] args)