Beispiel #1
0
    def __init__(self, p1, p2):
        '''Constructor.

        @param      p1      An instance of Vector2. The start point of the segment.
        @param      p2      An instance of Vector2.  The end point of the segment.
        '''
        Segment.__init__(self, p1, p2)
Beispiel #2
0
 def __init__( self, p1, p2 ):
     Segment.__init__( self, p1, p2 )
     self.agents = []
     self.coef = Vector3( 0, 0, 0 ) # coefficients to line's equation
                               # dot it with the point (x, y, 1) to get signed distance
     self.computeCoefficients()
     self.flowCounts = []        # flow counts for each time step
     self.transferedAgents = []    # when an agent crosses previous line it gets added
                                 # to this line's transfer line
     self.nextLine = None
Beispiel #3
0
 def __init__( self, p1, p2 ):
     Segment.__init__( self, p1, p2 )