public class JoGLDrawingTools extends java.lang.Object implements DrawingTools
Modifier and Type | Method and Description |
---|---|
void |
bind(Texture texture)
Bind the given texture to the OpenGl context.
|
void |
clear(Color color)
Clear the canvas with the given color.
|
void |
clear(java.awt.Color color)
Clear the canvas with the given color.
|
void |
clearDepthBuffer()
Clear the depth buffer.
|
void |
draw(Geometry geometry)
Draw the given geometry with default appearance.
|
void |
draw(Geometry geometry,
Appearance appearance)
Draw the given geometry.
|
void |
draw(Renderer renderer)
Ask the given renderer to perform a draw.
|
void |
draw(Texture texture)
Draw the texture on XY plane in current coordinate.
|
void |
draw(Texture texture,
AnchorPosition anchor,
ElementsBuffer positions)
Draw the given texture at all given position.
|
void |
draw(Texture texture,
AnchorPosition anchor,
ElementsBuffer positions,
double rotationAngle)
Draw the given texture at all given position with the given rotation angle.
|
void |
draw(Texture texture,
AnchorPosition anchor,
Vector3d position)
Draw the given texture at given position.
|
void |
draw(Texture texture,
AnchorPosition anchor,
Vector3d position,
double rotationAngle)
Draw the given texture at given position with the given rotation angle.
|
JoGLCanvas |
getCanvas()
Return the canvas where draw is done.
|
ClippingManager |
getClippingManager()
Return the clipping manager.
|
GL2 |
getGl()
Return the OpenGl context.
|
JoGLCapacity |
getGLCapacity()
Return the OpenGl capacity of this canvas.
|
LightManager |
getLightManager()
Return the light manager.
|
TransformationManager |
getTransformationManager()
Return the transformation manager.
|
public JoGLCanvas getCanvas()
DrawingTools
getCanvas
in interface DrawingTools
public GL2 getGl()
public JoGLCapacity getGLCapacity()
public TransformationManager getTransformationManager()
DrawingTools
getTransformationManager
in interface DrawingTools
public LightManager getLightManager()
DrawingTools
getLightManager
in interface DrawingTools
public ClippingManager getClippingManager()
DrawingTools
getClippingManager
in interface DrawingTools
public void clear(Color color)
DrawingTools
clear
in interface DrawingTools
color
- the color used to clear the canvas.public void clear(java.awt.Color color)
DrawingTools
clear
in interface DrawingTools
color
- the color used to clear the canvas.public void clearDepthBuffer()
DrawingTools
clearDepthBuffer
in interface DrawingTools
public void draw(Renderer renderer)
DrawingTools
draw
in interface DrawingTools
renderer
- the given renderer.public void draw(Geometry geometry) throws SciRendererException
DrawingTools
draw
in interface DrawingTools
geometry
- the geometry to draw.SciRendererException
- if the draw is not possible.public void draw(Geometry geometry, Appearance appearance) throws SciRendererException
DrawingTools
draw
in interface DrawingTools
geometry
- the geometry to draw.appearance
- the appearance to use.SciRendererException
- if the draw is not possible.public void draw(Texture texture) throws SciRendererException
DrawingTools
draw
in interface DrawingTools
texture
- the texture to drawn.SciRendererException
- if the texture is not drawable.public void draw(Texture texture, AnchorPosition anchor, ElementsBuffer positions) throws SciRendererException
DrawingTools
draw
in interface DrawingTools
texture
- the texture to draw.anchor
- the texture anchor position.positions
- the positions where the texture will be drawn.SciRendererException
- if the texture is not drawable.public void draw(Texture texture, AnchorPosition anchor, ElementsBuffer positions, double rotationAngle) throws SciRendererException
DrawingTools
draw
in interface DrawingTools
texture
- the texture to draw.anchor
- the texture anchor position.positions
- the positions where the texture will be drawn.rotationAngle
- the rotation angle.SciRendererException
- if the texture is not drawable.public void draw(Texture texture, AnchorPosition anchor, Vector3d position) throws SciRendererException
DrawingTools
draw
in interface DrawingTools
texture
- the texture to draw.anchor
- the texture anchor position.position
- the position where the texture will be drawn.SciRendererException
- if the texture is not drawable.public void draw(Texture texture, AnchorPosition anchor, Vector3d position, double rotationAngle) throws SciRendererException
DrawingTools
draw
in interface DrawingTools
texture
- the texture to draw.anchor
- the texture anchor position.position
- the position where the texture will be drawn.rotationAngle
- the rotation angle.SciRendererException
- if the texture is not drawable.public void bind(Texture texture) throws SciRendererException
texture
- the given texture.SciRendererException
- is thrown if the texture is invalid.