| 493 | |
| 494 | |
| 495 | class DummyVehicle: |
| 496 | def __init__(self, x: float, y: float, radius: float) -> None: |
| 497 | self.x = x |
| 498 | self.y = y |
| 499 | if radius > 100: |
| 500 | print( |
| 501 | '[yellow]The given local radius is too large, and is resized to 100![/yellow]') |
| 502 | self.radius = 100 |
| 503 | elif radius < 20: |
| 504 | print( |
| 505 | '[yellow]The given local radius is too small, and is resized to 20![/yellow]') |
| 506 | self.radius = 20 |
| 507 | else: |
| 508 | self.radius = radius |
| 509 | |
| 510 | def plotArea(self, node: dpg.node, ex: float, ey: float, ctf: CoordTF): |
| 511 | cx, cy = ctf.qtCoord(self.x, self.y, ex, ey) |
| 512 | dpg.draw_circle( |
| 513 | (cx, cy), |
| 514 | ctf.zoomScale*self.radius, |
| 515 | thickness=0, |
| 516 | fill=(243, 156, 18, 20), |
| 517 | parent=node |
| 518 | ) |