List of usage examples for com.badlogic.gdx.graphics GL10 GL_LINE_LOOP
int GL_LINE_LOOP
To view the source code for com.badlogic.gdx.graphics GL10 GL_LINE_LOOP.
Click Source Link
From source file:com.altportalgames.colorrain.utils.Box2DDebugRenderer.java
License:Apache License
private void drawSolidCircle(Vector2 center, float radius, Vector2 axis, Color color) { renderer.begin(GL10.GL_LINE_LOOP); float angle = 0; float angleInc = 2 * (float) Math.PI / 20; for (int i = 0; i < 20; i++, angle += angleInc) { v.set((float) Math.cos(angle) * radius + center.x, (float) Math.sin(angle) * radius + center.y); renderer.color(color.r, color.g, color.b, color.a); renderer.vertex(v.x * Assets.PIXELS_PER_METER_X, v.y * Assets.PIXELS_PER_METER_Y, 0); }//ww w.ja va 2 s .c o m renderer.end(); renderer.begin(GL10.GL_LINES); renderer.color(color.r, color.g, color.b, color.a); renderer.vertex(center.x * Assets.PIXELS_PER_METER_X, center.y * Assets.PIXELS_PER_METER_Y, 0); renderer.color(color.r, color.g, color.b, color.a); renderer.vertex(center.x * Assets.PIXELS_PER_METER_X + axis.x * Assets.PIXELS_PER_METER_X * radius, center.y * Assets.PIXELS_PER_METER_X + axis.y * radius * Assets.PIXELS_PER_METER_Y, 0); renderer.end(); }
From source file:com.altportalgames.colorrain.utils.Box2DDebugRenderer.java
License:Apache License
private void drawSolidPolygon(Vector2[] vertices, int vertexCount, Color color) { renderer.begin(GL10.GL_LINE_LOOP); for (int i = 0; i < vertexCount; i++) { Vector2 v = vertices[i];/*ww w .ja v a2 s .co m*/ renderer.color(color.r, color.g, color.b, color.a); renderer.vertex(v.x * Assets.PIXELS_PER_METER_X, v.y * Assets.PIXELS_PER_METER_Y, 0); } renderer.end(); }
From source file:org.interreg.docexplore.reader.gfx.GfxUtils.java
License:Open Source License
public static void drawQuad(float x1, float y1, float s1, float t1, float x2, float y2, float s2, float t2, float width) { Gdx.gl10.glLineWidth(width);// w w w. j av a 2 s . c o m Gdx.gl10.glEnable(GL10.GL_LINE_SMOOTH); doQuad(x1, y1, s1, t1, x2, y2, s2, t2, GL10.GL_LINE_LOOP); }