public class SensorContact extends java.lang.Object implements Contact
Modifier and Type | Field and Description |
---|---|
protected java.text.DecimalFormat |
form
The format for numbers output by this Object.
|
protected Moveable |
mover
The Moveable that this Contact contains information about.
|
Constructor and Description |
---|
SensorContact(Moveable mover)
Creates a new instance of Contact with information about the given
Moveable.
|
Modifier and Type | Method and Description |
---|---|
java.awt.geom.Point2D |
getAcceleration()
Returns the acceleration vector for the underlying Moveable.
|
java.awt.geom.Point2D |
getLocation()
Returns the location of the underlying Moveable.
|
java.awt.geom.Point2D |
getVelocity()
Returns the velocity vector for the underlying Moveable.
|
java.lang.String |
toString()
Returns a String containing the location of the underlying Moveable.
|
protected java.text.DecimalFormat form
protected Moveable mover
public SensorContact(Moveable mover)
mover
- given Moveablepublic java.awt.geom.Point2D getAcceleration()
getAcceleration
in interface Moveable
public java.awt.geom.Point2D getLocation()
getLocation
in interface Moveable
public java.awt.geom.Point2D getVelocity()
getVelocity
in interface Moveable
public java.lang.String toString()
toString
in class java.lang.Object