Now the theta = 0 should be on +x axis.
And cos(theta) should correctly represent x value.
Without this fix, the poly theta (from atan2) can be wrongly rotated 90 degrees.
Also, make sure the incoming polygon is CW for the shadow system.
This fix visual artifacts in recent regression for spot shadows.
bug:13553955
Change-Id: I9bbf54db094e7f133326da4dae4610962da849c1
All the computations are estimated using bounding box.
TODO: Spot shadow could have more accurate but also more expensive methods, we need
more experiments to decide.
Change-Id: I9c10c419576cee55daf0f9f278b0db78cb847447
Fixes the simplifying assumption that shadow casters were always
rectangular.
Java side APIs + plumbing to pass down correct shapes still need to be added.
Change-Id: Ic4fee90af15679951a44bb5cc6ae454b98c4c194
Basically we compute the shadow as a strip of triangles, whose alpha value
is the strength of the shadow.
We use the normal to extend the geometry.
And we use static function and try to avoid new/malloc in the computation.
Change-Id: I382286f1cad351bd5ff983f76f446c075819dcaf