MCPcopy Create free account
hub / github.com/PJLab-ADG/OASim / plotSelf

Method plotSelf

limsim/utils/obstacles.py:114–129  ·  view source on GitHub ↗

Plots the circle shape. Args: node: The node to plot the shape on. ex: The x-coordinate of the observer. ey: The y-coordinate of the observer.

(self, node: dpg.node, center: np.ndarray, ex: float,
                 ey: float, ctf: CoordTF)

Source from the content-addressed store, hash-verified

112 return self._radius
113
114 def plotSelf(self, node: dpg.node, center: np.ndarray, ex: float,
115 ey: float, ctf: CoordTF):
116 """
117 Plots the circle shape.
118
119 Args:
120 node: The node to plot the shape on.
121 ex: The x-coordinate of the observer.
122 ey: The y-coordinate of the observer.
123 """
124 cx, cy = ctf.dpgCoord(center[0], center[1], ex, ey)
125 dpg.draw_circle((cx, cy),
126 CoordTF.zoomScale * self.radius,
127 color=(235, 47, 6),
128 fill=(229, 80, 57, 20),
129 parent=node)
130
131
132class ObsType(IntEnum):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected