Module seaModels :: Class Obstacle
[hide private]
[frames] | no frames]

Class Obstacle

source code

An obstacle in the sea. Currently an obstacle is just a straight line. This class support general polygon but, for now we only want line composed of 2 points. It is possible to construct complex obstacles just from straight lines.

Therfore, for now IGNORE the following: [Currently implemented as a list of points, where connecting each two consecutive points by line defines the obstacle's shape. The first point should be equal to the last one.]

Instance Methods [hide private]
 
__init__(self, points) source code
 
__str__(self) source code
tuple
getBorder(self)
Returns: a list of points defining the shape of the obstacle
source code
Method Details [hide private]

__init__(self, points)
(Constructor)

source code 
Parameters:
  • points (a list of (x,y) tuples) - a list of points - connecting each consecutive pair of points by line defines the obstacle's shape.

getBorder(self)

source code 
Returns: tuple
a list of points defining the shape of the obstacle