public class Wall extends PhysicalObject
shape
position
map
Constructor and Description |
---|
Wall(double[] x,
double[] y)
Create a wall from a list of (x,y) coordinates.
|
Wall(double topX,
double topY,
double width,
double height)
Creates a rectangular wall with a specified top left corner, width and
height.
|
Wall(double x0,
double x1,
double x2,
double x3,
double y0,
double y1,
double y2,
double y3)
Creates a wall from four corner coordinates.
|
Wall(java.util.List<Position> corners)
Create a wall from a list of corner
Position s. |
contains, contains, generatePosition, generatePosition, generatePositions, generatePositions, getCorners, getVectorToPosition, isCollision, isLineCollision, toString
getDistance, getPosition
isDestroyed
public Wall(double topX, double topY, double width, double height)
topX
- The x coordinate of the top left corner.topY
- The y coordinate of the top left corner.width
- The width of the wall.height
- The height of the wall.public Wall(double x0, double x1, double x2, double x3, double y0, double y1, double y2, double y3)
x0
- The first x coordinate.x1
- The second x coordinate.x2
- The third x coordinate.x3
- The fourth x coordinate.y0
- The first y coordinate.y1
- The second y coordinate.y2
- The third y coordinate.y3
- The fourth y coordinate.public Wall(double[] x, double[] y)
x
- The x coordinates.y
- The y coordinates.