cs567.particles
Class ParticleSystemBuilder

java.lang.Object
  extended by cs567.particles.ParticleSystemBuilder
All Implemented Interfaces:
java.util.EventListener, javax.media.opengl.GLEventListener

public class ParticleSystemBuilder
extends java.lang.Object
implements javax.media.opengl.GLEventListener

CS567: Assignment #1 "Particle Systems" main() entry point class that initializes ParticleSystem, OpenGL rendering, and GUI that manages GUI/mouse events. Spacebar toggles simulation advance.


Field Summary
static double DT
          Default graphics time step size.
 
Method Summary
 void display(javax.media.opengl.GLAutoDrawable drawable)
          Main event loop: OpenGL display + simulation advance.
 void displayChanged(javax.media.opengl.GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged)
          GLEventListener implementation
 javax.vecmath.Point2d getPoint2d(java.awt.event.MouseEvent e)
          Maps mouse event into computational cell using OrthoMap.
 void init(javax.media.opengl.GLAutoDrawable drawable)
          GLEventListener implementation: Initializes JOGL renderer.
static void main(java.lang.String[] args)
          ### Runs the ParticleSystemBuilder.
 void reshape(javax.media.opengl.GLAutoDrawable drawable, int x, int y, int width, int height)
          GLEventListener implementation
 void start()
          Builds and shows windows/GUI, and starts simulator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DT

public static final double DT
Default graphics time step size.

See Also:
Constant Field Values
Method Detail

start

public void start()
Builds and shows windows/GUI, and starts simulator.


getPoint2d

public javax.vecmath.Point2d getPoint2d(java.awt.event.MouseEvent e)
Maps mouse event into computational cell using OrthoMap.


init

public void init(javax.media.opengl.GLAutoDrawable drawable)
GLEventListener implementation: Initializes JOGL renderer.

Specified by:
init in interface javax.media.opengl.GLEventListener

displayChanged

public void displayChanged(javax.media.opengl.GLAutoDrawable drawable,
                           boolean modeChanged,
                           boolean deviceChanged)
GLEventListener implementation

Specified by:
displayChanged in interface javax.media.opengl.GLEventListener

reshape

public void reshape(javax.media.opengl.GLAutoDrawable drawable,
                    int x,
                    int y,
                    int width,
                    int height)
GLEventListener implementation

Specified by:
reshape in interface javax.media.opengl.GLEventListener

display

public void display(javax.media.opengl.GLAutoDrawable drawable)
Main event loop: OpenGL display + simulation advance. GLEventListener implementation.

Specified by:
display in interface javax.media.opengl.GLEventListener

main

public static void main(java.lang.String[] args)
### Runs the ParticleSystemBuilder. ###