This is the OpenGL "standard" Gears demo, originally by Brian Paul
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private float | |
| private Shader | |
| private Gears. | |
| private Gears. | |
| private Gears. | |
| private int | |
| private int | |
| private final FloatBuffer | |
| private final FloatBuffer | |
| private final Matrix4f | |
| private int | |
| private final Matrix4f | |
| private int | |
| private final Matrix4f | |
| private ShaderProgram | |
| private boolean | |
| private float | |
| private float | |
| private float | |
| private int | |
| private int | |
| private Shader |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| private static Geometry | 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 | |
| private void | |
| private void | |
| public static void |
| angle | back to summary |
|---|---|
| private float angle | |
| fsh | back to summary |
|---|---|
| private Shader fsh | |
| gear1 | back to summary |
|---|---|
| private Gears. | |
| gear2 | back to summary |
|---|---|
| private Gears. | |
| gear3 | back to summary |
|---|---|
| private Gears. | |
| GEAR_COLOR | back to summary |
|---|---|
| private int GEAR_COLOR | |
| LIGHT_POS | back to summary |
|---|---|
| private int LIGHT_POS | |
| m3fBuffer | back to summary |
|---|---|
| private final FloatBuffer m3fBuffer | |
| m4fBuffer | back to summary |
|---|---|
| private final FloatBuffer m4fBuffer | |
| mv | back to summary |
|---|---|
| private final Matrix4f mv | |
| MVP | back to summary |
|---|---|
| private int MVP | |
| mvp | back to summary |
|---|---|
| private final Matrix4f mvp | |
| NM | back to summary |
|---|---|
| private int NM | |
| p | back to summary |
|---|---|
| private final Matrix4f p | |
| program | back to summary |
|---|---|
| private ShaderProgram program | |
| run | back to summary |
|---|---|
| private boolean run | |
| view_rotx | back to summary |
|---|---|
| private float view_rotx | |
| view_roty | back to summary |
|---|---|
| private float view_roty | |
| view_rotz | back to summary |
|---|---|
| private float view_rotz | |
| vNormal | back to summary |
|---|---|
| private int vNormal | |
| vPosition | back to summary |
|---|---|
| private int vPosition | |
| vsh | back to summary |
|---|---|
| private Shader vsh | |
| Gears | back to summary |
|---|---|
| public Gears() | |
| destroy | back to summary |
|---|---|
| private void destroy() | |
| execute | back to summary |
|---|---|
| private void execute() | |
| gear | back to summary |
|---|---|
| private static Geometry 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.
| |
| handleInput | back to summary |
|---|---|
| private void handleInput() | |
| init | back to summary |
|---|---|
| private void init() throws LWJGLException | |
| loop | back to summary |
|---|---|
| private void loop() | |
| main | back to summary |
|---|---|
| public static void main(String[] args) | |
| Modifier and Type | Field and Description |
|---|---|
| private final float[] | |
| private final Geometry |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv void |
| color | back to summary |
|---|---|
| private final float[] color | |
| geom | back to summary |
|---|---|
| private final Geometry geom | |
| Gear | back to summary |
|---|---|
| pack-priv Gear(final Geometry geom, final float[] color) | |
| destroy | back to summary |
|---|---|
| pack-priv void destroy() | |
| render | back to summary |
|---|---|
| pack-priv void render() | |