Mercurial > hg > nsaunier > traffic-intelligence
comparison trafficintelligence/tests/moving.txt @ 1300:f3574e43c238
correcting bug on line crossings (and renaming method)
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Fri, 11 Apr 2025 16:14:51 -0400 |
| parents | 76f5693b530c |
| children |
comparison
equal
deleted
inserted
replaced
| 1299:c4bef099d0a2 | 1300:f3574e43c238 |
|---|---|
| 108 True | 108 True |
| 109 >>> segmentOrientationCrossing(Point(0,0), Point(0,3), Point(1,1), Point(-1,1)) | 109 >>> segmentOrientationCrossing(Point(0,0), Point(0,3), Point(1,1), Point(-1,1)) |
| 110 True | 110 True |
| 111 | 111 |
| 112 >>> o1 = MovingObject.generate(1, Point(1.,0.), Point(1.,0.), TimeInterval(0,10)) | 112 >>> o1 = MovingObject.generate(1, Point(1.,0.), Point(1.,0.), TimeInterval(0,10)) |
| 113 >>> instants, intersections, rightToLeftOrientations = o1.getInstantsCrossingLine(Point(0.,3.5), Point(2.,3.5)) | 113 >>> instants, intersections, rightToLeftOrientations = o1.getInstantsCrossingSegment(Point(0.,3.5), Point(2.,3.5)) |
| 114 >>> rightToLeftOrientations == [] | 114 >>> rightToLeftOrientations == [] |
| 115 True | 115 True |
| 116 >>> len(instants) | 116 >>> len(instants) |
| 117 0 | 117 0 |
| 118 >>> o1 = MovingObject.generate(1, Point(0.,1.), Point(1.,0.), TimeInterval(0,10)) | 118 >>> o1 = MovingObject.generate(1, Point(0.,1.), Point(1.,0.), TimeInterval(0,10)) |
| 119 >>> instants, intersections, rightToLeftOrientations = o1.getInstantsCrossingLine(Point(3.5,0.), Point(3.5, 2.), False) | 119 >>> instants, intersections, rightToLeftOrientations = o1.getInstantsCrossingSegment(Point(3.5,0.), Point(3.5, 2.), False) |
| 120 >>> rightToLeftOrientations == [] | 120 >>> rightToLeftOrientations == [] |
| 121 True | 121 True |
| 122 >>> instants[0] | 122 >>> instants[0] |
| 123 3.5 | 123 3.5 |
| 124 >>> instants, intersections, rightToLeftOrientations = o1.getInstantsCrossingLine(Point(3.5,0.), Point(3.5, 2.), True) | 124 >>> instants, intersections, rightToLeftOrientations = o1.getInstantsCrossingSegment(Point(3.5,0.), Point(3.5, 2.), True) |
| 125 >>> len(rightToLeftOrientations) | 125 >>> len(rightToLeftOrientations) |
| 126 1 | 126 1 |
| 127 >>> rightToLeftOrientations[0] | 127 >>> rightToLeftOrientations[0] |
| 128 False | 128 False |
| 129 | 129 |
