MCPcopy Create free account
hub / github.com/chenbq/CAVDN / PolyLine

Class PolyLine

env/multiagent_com/rendering.py:279–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277 g.render()
278
279class PolyLine(Geom):
280 def __init__(self, v, close):
281 Geom.__init__(self)
282 self.v = v
283 self.close = close
284 self.linewidth = LineWidth(1)
285 self.add_attr(self.linewidth)
286 def render1(self):
287 glBegin(GL_LINE_LOOP if self.close else GL_LINE_STRIP)
288 for p in self.v:
289 glVertex3f(p[0], p[1],0) # draw each vertex
290 glEnd()
291 def set_linewidth(self, x):
292 self.linewidth.stroke = x
293
294class Line(Geom):
295 def __init__(self, start=(0.0, 0.0), end=(0.0, 0.0)):

Callers 3

make_circleFunction · 0.85
make_polygonFunction · 0.85
make_polylineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected