MCPcopy Create free account
hub / github.com/csaez/mscreen / update

Method update

mscreen.py:298–317  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

296 self.isDirty = True
297
298 def update(self):
299 super(CurvePrim, self).update()
300 self._points = []
301 matrix = self.transform.asMatrix()
302 for i in xrange(len(self._prePoints)):
303 point = om2.MPoint(self._prePoints[i])
304 point *= matrix
305 self._points.append(point)
306
307 if self.degree == CURVE_LINEAR:
308 self._drawPoints = [x for x in self._points]
309
310 elif self.degree == CURVE_BEZIER:
311 num_points = len(self._points)
312 segs = (num_points - 1) * 16
313 self._drawPoints = list()
314 for i in range(segs):
315 t = i/float(segs - 1)
316 p = bezierInterpolate(t, self._points)
317 self._drawPoints.append(p)
318
319 def draw(self, view, renderer):
320 super(CurvePrim, self).draw(view, renderer)

Callers 1

pointsMethod · 0.95

Calls 2

bezierInterpolateFunction · 0.85
updateMethod · 0.45

Tested by

no test coverage detected