libgdx/box2dlights — pull request #19 by sprucely (2014-08-13 05:36:44+00:00)
Title: Added ChainLight

I have added a new type of light, ChainLight, which allows specifying a chain of vertices along one side of which rays are evenly distributed. It makes use of a Spinor class (could probably be moved to libgdx proper) to help with interpolating ray angles. Spinors are similar in concept to quaternions, but for 2d.

The test app demonstrates both attaching a ChainLight to a body and dynamically updating chain vertices. I don't think culling works yet, as I didn't adapt that code from PositionalLight. Same for contains(x,y). I'm guessing it would involve creating a polygon of the outer-most points, but I'm not sure how to go about doing that. Anyway, this was enough for my needs. I hope you find it useful.