dLife Home Page

dlife.robot.player
Class PlayerSimulation.PlayerSimulationPuck

java.lang.Object
  extended by dlife.sys.SerializationBase
      extended by dlife.robot.player.PlayerSimulation.PlayerSimulationPuck
All Implemented Interfaces:
Serializable
Enclosing class:
PlayerSimulation

public class PlayerSimulation.PlayerSimulationPuck
extends SerializationBase

A PlayerSimulationPuck is used to keep track of the information a puck has in a player simulation.

Version:
January 14, 2010
Author:
Russell Toris, Dickinson College
See Also:
Serialized Form

Field Summary
(package private)  double height
           
(package private)  double width
           
 
Constructor Summary
PlayerSimulation.PlayerSimulationPuck(String name, double xPos, double yPos, double dir, Color color, double width, double height)
          Creates a PlayerSimulationPuck with the given parameters.
 
Method Summary
 double getHeight()
          Get the width (x-direction) in meters of the puck
 double getWidth()
          Get the height (y-direction) in meters of the puck
 
Methods inherited from class dlife.sys.SerializationBase
read, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

width

double width

height

double height
Constructor Detail

PlayerSimulation.PlayerSimulationPuck

public PlayerSimulation.PlayerSimulationPuck(String name,
                                             double xPos,
                                             double yPos,
                                             double dir,
                                             Color color,
                                             double width,
                                             double height)
Creates a PlayerSimulationPuck with the given parameters.

Parameters:
name - the name of the object
xPos - the x-position in meters (0,0 is the middle)
yPos - the y-position in meters (0,0 is the middle)
dir - the angle in degrees the front is facing
color - the color of the object
width - the height (y-direction) in meters of the puck
height - the width (x-direction) in meters of the puck
Method Detail

getWidth

public double getWidth()
Get the height (y-direction) in meters of the puck

Returns:
the height (y-direction) in meters of the puck

getHeight

public double getHeight()
Get the width (x-direction) in meters of the puck

Returns:
the width (x-direction) in meters of the puck

dLife Home Page