public class QuadBasedLineStripRenderer extends java.lang.Object implements LineStripRenderer
Modifier and Type | Field and Description |
---|---|
static int |
MAX_POINTS
Maximum number of points allowed in a single strip
|
Constructor and Description |
---|
QuadBasedLineStripRenderer()
Create a new strip renderer
|
Modifier and Type | Method and Description |
---|---|
boolean |
applyGLLineFixes()
Check if we should apply default line fixes
|
void |
color(float r,
float g,
float b,
float a)
Apply a colour to the next vertex
|
void |
end()
End the line strips
|
void |
renderLines(float[] points,
int count)
Render the lines applying antialiasing if required
|
void |
renderLinesImpl(float[] points,
int count,
float w)
Render the lines given
|
void |
setAntiAlias(boolean antialias)
Indicate whether antialiasing should be applied
|
void |
setLineCaps(boolean caps)
Indicate if we should render end caps
|
void |
setWidth(float width)
Set the width of the lines to be drawn
|
void |
start()
Start the line strips
|
void |
vertex(float x,
float y)
Add a vertex
|
public static int MAX_POINTS
public QuadBasedLineStripRenderer()
public void setLineCaps(boolean caps)
LineStripRenderer
setLineCaps
in interface LineStripRenderer
caps
- True if we should render end capspublic void start()
LineStripRenderer
start
in interface LineStripRenderer
public void end()
LineStripRenderer
end
in interface LineStripRenderer
public void vertex(float x, float y)
LineStripRenderer
vertex
in interface LineStripRenderer
x
- The x coordinate of the vertexy
- The y coordinate of the vertexpublic void setWidth(float width)
LineStripRenderer
setWidth
in interface LineStripRenderer
width
- The width of the lines to be drawnpublic void setAntiAlias(boolean antialias)
LineStripRenderer
setAntiAlias
in interface LineStripRenderer
antialias
- True if antialiasing should be appliedpublic void renderLines(float[] points, int count)
points
- The points to be rendered as linescount
- The number of points to renderpublic void renderLinesImpl(float[] points, int count, float w)
points
- The points building up the linescount
- The number of points to renderw
- The width to render atpublic void color(float r, float g, float b, float a)
LineStripRenderer
color
in interface LineStripRenderer
r
- The red component of the colourg
- The green component of the colourb
- The blue component of the coloura
- The alpha component of the colourpublic boolean applyGLLineFixes()
LineStripRenderer
applyGLLineFixes
in interface LineStripRenderer