Commit Graph

8 Commits

Author SHA1 Message Date
a6c297196a Add ProfilingList & use it in Player. 2020-03-20 13:12:12 -04:00
de01b04873 Player: stop creating a new Point[] via Line.Rasterize every frame. 2020-03-18 14:34:47 -04:00
7625339d4c add TODOs for places where "new" is used during per-frame code
Fixes #12.
2020-03-18 11:11:40 -04:00
473256d105 make some classes static and some fields readonly 2020-03-09 12:48:10 -04:00
8720896e87 make top-level classes public 2020-03-09 12:22:33 -04:00
f1f717da63 remove unused using statement
GitOrigin-RevId: d3730b153c23fe158f1cd2bd3bd1f222d1a0bc46
2020-02-13 14:52:23 -05:00
84fa044675 more readability fixed via Visual Studio suggestions
GitOrigin-RevId: 330f13485cee32f3a069442bad69c57911a0a34c
2020-02-13 14:51:31 -05:00
bba9f643eb Implement Bresenham's algorithm for line rasterization.
This is implemented as a static Line.Rasterize(Point p1, Point p2) function
that returns an array of Points. There's also a Line.Rasterize(x1, y1, x1, y2)
version for convenience.

Unit tests included.

GitOrigin-RevId: 525098f8c76c6c3d1a6ff2c32fa2206cff080a11
2020-02-13 14:50:53 -05:00