Example usage for Java com.badlogic.gdx.graphics.glutils ShapeRenderer fields, constructors, methods, implement or subclass
The text is from its open source code.
void | arc(float x, float y, float radius, float start, float degrees) Calls #arc(float,float,float,float,float,int) by estimating the number of segments needed for a smooth arc. |
void | begin(ShapeType type) Starts a new batch of shapes. |
void | begin() Begins a new batch without specifying a shape type. |
void | box(float x, float y, float z, float width, float height, float depth) Draws a cube using ShapeType#Line or ShapeType#Filled . |
void | circle(float x, float y, float radius) Calls #circle(float,float,float,int) by estimating the number of segments needed for a smooth circle. |
void | circle(float x, float y, float radius, int segments) Draws a circle using ShapeType#Line or ShapeType#Filled . |
void | curve(float x1, float y1, float cx1, float cy1, float cx2, float cy2, float x2, float y2, int segments) Draws a curve using ShapeType#Line . |
void | ellipse(float x, float y, float width, float height) Calls #ellipse(float,float,float,float,int) by estimating the number of segments needed for a smooth ellipse. |
void | end() Finishes the batch of shapes and ensures they get rendered. |
void | flush() |
ShapeType | getCurrentType() Returns the current shape type. |
void | identity() Sets the transformation matrix to identity. |
void | line(float x, float y, float x2, float y2) |
void | line(Vector3 v0, Vector3 v1) |
void | line(Vector2 v0, Vector2 v1) |
void | point(float x, float y, float z) Draws a point using ShapeType#Point , ShapeType#Line or ShapeType#Filled . |
void | polygon(float[] vertices) |
void | polygon(float[] vertices, int offset, int count) Draws a polygon in the x/y plane using ShapeType#Line . |
void | polyline(float[] vertices) |
void | rect(float x, float y, float width, float height) Draws a rectangle in the x/y plane using ShapeType#Line or ShapeType#Filled . |
void | rect(float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float degrees) Draws a rectangle in the x/y plane using ShapeType#Line or ShapeType#Filled . |
void | rectLine(float x1, float y1, float x2, float y2, float width) Draws a line using a rotated rectangle, where with one edge is centered at x1, y1 and the opposite edge centered at x2, y2. |
void | rotate(float axisX, float axisY, float axisZ, float degrees) Multiplies the current transformation matrix by a rotation matrix. |
void | set(ShapeType type) |
void | setAutoShapeType(boolean autoShapeType) If true, when drawing a shape cannot be performed with the current shape type, the batch is flushed and the shape type is changed automatically. |
void | setColor(Color color) Sets the color to be used by the next shapes drawn. |
void | setColor(float r, float g, float b, float a) Sets the color to be used by the next shapes drawn. |
void | setProjectionMatrix(Matrix4 matrix) Sets the projection matrix to be used for rendering. |
void | setTransformMatrix(Matrix4 matrix) |
void | translate(float x, float y, float z) Multiplies the current transformation matrix by a translation matrix. |
void | triangle(float x1, float y1, float x2, float y2, float x3, float y3) Draws a triangle in x/y plane using ShapeType#Line or ShapeType#Filled . |
void | x(float x, float y, float size) Draws two crossed lines using ShapeType#Line or ShapeType#Filled . |