org.newdawn.slick.tests
Class GeomUtilTest

java.lang.Object
  extended by org.newdawn.slick.BasicGame
      extended by org.newdawn.slick.tests.GeomUtilTest
All Implemented Interfaces:
ControlledInputReciever, ControllerListener, Game, GeomUtilListener, InputListener, KeyListener, MouseListener

public class GeomUtilTest
extends BasicGame
implements GeomUtilListener

A test to try shape cutting

Author:
Kevin Glass

Field Summary
 
Fields inherited from class org.newdawn.slick.BasicGame
controllerButton, controllerDown, controllerLeft, controllerRight, controllerUp
 
Constructor Summary
GeomUtilTest()
          Create a simple test
 
Method Summary
 void init()
          Perform the cut
 void init(GameContainer container)
          Initialise the game.
static void main(java.lang.String[] argv)
          Entry point to our test
 void mouseWheelMoved(int change)
          Notification that the mouse wheel position was updated
 void pointExcluded(float x, float y)
          Notification that a point was excluded from geometry
 void pointIntersected(float x, float y)
          Notification that a point was intersected between two geometries
 void pointUsed(float x, float y)
          Notification that a point was used to build a new geometry
 void render(GameContainer container, Graphics g)
          Render the game's screen here.
 void update(GameContainer container, int delta)
          Update the game logic here.
 
Methods inherited from class org.newdawn.slick.BasicGame
closeRequested, controllerButtonPressed, controllerButtonReleased, controllerDownPressed, controllerDownReleased, controllerLeftPressed, controllerLeftReleased, controllerRightPressed, controllerRightReleased, controllerUpPressed, controllerUpReleased, getTitle, inputEnded, inputStarted, isAcceptingInput, keyPressed, keyReleased, mouseClicked, mouseDragged, mouseMoved, mousePressed, mouseReleased, setInput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeomUtilTest

public GeomUtilTest()
Create a simple test

Method Detail

init

public void init()
Perform the cut


init

public void init(GameContainer container)
          throws SlickException
Description copied from interface: Game
Initialise the game. This can be used to load static resources. It's called before the game loop starts

Specified by:
init in interface Game
Specified by:
init in class BasicGame
Parameters:
container - The container holding the game
Throws:
SlickException - Throw to indicate an internal error
See Also:
BasicGame.init(GameContainer)

update

public void update(GameContainer container,
                   int delta)
            throws SlickException
Description copied from interface: Game
Update the game logic here. No rendering should take place in this method though it won't do any harm.

Specified by:
update in interface Game
Specified by:
update in class BasicGame
Parameters:
container - The container holing this game
delta - The amount of time thats passed since last update in milliseconds
Throws:
SlickException - Throw to indicate an internal error
See Also:
BasicGame.update(GameContainer, int)

render

public void render(GameContainer container,
                   Graphics g)
            throws SlickException
Description copied from interface: Game
Render the game's screen here.

Specified by:
render in interface Game
Parameters:
container - The container holing this game
g - The graphics context that can be used to render. However, normal rendering routines can also be used.
Throws:
SlickException - Throw to indicate a internal error
See Also:
Game.render(GameContainer, Graphics)

main

public static void main(java.lang.String[] argv)
Entry point to our test

Parameters:
argv - The arguments passed to the test

pointExcluded

public void pointExcluded(float x,
                          float y)
Description copied from interface: GeomUtilListener
Notification that a point was excluded from geometry

Specified by:
pointExcluded in interface GeomUtilListener
Parameters:
x - The x coordinate of the point
y - The y coordinate of the point

pointIntersected

public void pointIntersected(float x,
                             float y)
Description copied from interface: GeomUtilListener
Notification that a point was intersected between two geometries

Specified by:
pointIntersected in interface GeomUtilListener
Parameters:
x - The x coordinate of the point
y - The y coordinate of the point

pointUsed

public void pointUsed(float x,
                      float y)
Description copied from interface: GeomUtilListener
Notification that a point was used to build a new geometry

Specified by:
pointUsed in interface GeomUtilListener
Parameters:
x - The x coordinate of the point
y - The y coordinate of the point

mouseWheelMoved

public void mouseWheelMoved(int change)
Description copied from interface: MouseListener
Notification that the mouse wheel position was updated

Specified by:
mouseWheelMoved in interface MouseListener
Overrides:
mouseWheelMoved in class BasicGame
Parameters:
change - The amount of the wheel has moved
See Also:
MouseListener.mouseWheelMoved(int)


Copyright © 2006 New Dawn Software. All Rights Reserved.