public void debugRender ( ShapeRenderer shapeRenderer ) { shapeRenderer . setColor ( Color . YELLOW ) ; FloatArray vertices = Pools . obtain ( FloatArray . class ) ; vertices . clear ( ) ; for ( int i = 0 ; i < rayNum ; i ++ ) { vertices . addAll ( mx [ i ] , my [ i ] ) ; } for ( int i = rayNum - 1 ; i > - 1 ; i -- ) { vertices . addAll ( startX [ i ] , startY [ i ] ) ; } shapeRenderer . polygon ( vertices . shrink ( ) ) ; Pools . free ( vertices ) ; }
Draws a polygon using ray start and end points as vertices