public class TextBillboardRenderer extends AbstractTextRenderer implements ITextRenderer
TextBillboardRenderer
allows writing 2d text always facing the
Camera of a 3d Scene.
String s = new String("2d text in 3d Scene");
TextBillboard txt = new TextBillboard();
BoundingBox3d box;
txt.drawText(gl, s, Coord3d.ORIGIN, Halign.LEFT, Valign.GROUND, Color.BLACK);
box = txt.drawText(gl, glu, cam, s, Coord3d.ORIGIN, Halign.LEFT, Valign.GROUND, Color.BLACK);
TextBillboardRenderer
handles vertical and horizontal layout of text according to the given text
coordinate. defSceneOffset, defScreenOffset
Constructor and Description |
---|
TextBillboardRenderer()
The TextBillboard class provides support for drawing ASCII characters Any
non ascii caracter will be replaced by a square.
|
Modifier and Type | Method and Description |
---|---|
BoundingBox3d |
computeTextBounds(com.jogamp.opengl.GL gl,
com.jogamp.opengl.glu.GLU glu,
Camera cam,
Coord3d position,
org.jzy3d.plot3d.text.renderers.TextBillboardRenderer.BillBoardSize dims) |
void |
drawSimpleText(com.jogamp.opengl.GL gl,
com.jogamp.opengl.glu.GLU glu,
Camera cam,
String s,
Coord3d position,
Color color) |
BoundingBox3d |
drawText(com.jogamp.opengl.GL gl,
com.jogamp.opengl.glu.GLU glu,
Camera cam,
String s,
Coord3d position,
Halign halign,
Valign valign,
Color color,
Coord2d screenOffset,
Coord3d sceneOffset)
Draw a string at the specified position and compute the 3d volume
occupied by the string according to the current Camera configuration.
|
void |
drawText(com.jogamp.opengl.GL gl,
String s,
Coord3d position,
Halign halign,
Valign valign,
Color color)
Draw a string at the specified position.
|
void |
glRaster(com.jogamp.opengl.GL gl,
Coord3d position,
Color color) |
drawText, drawText, drawText
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
drawText, drawText, drawText
public TextBillboardRenderer()
public void drawSimpleText(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera cam, String s, Coord3d position, Color color)
drawSimpleText
in interface ITextRenderer
public void drawText(com.jogamp.opengl.GL gl, String s, Coord3d position, Halign halign, Valign valign, Color color)
public BoundingBox3d drawText(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera cam, String s, Coord3d position, Halign halign, Valign valign, Color color, Coord2d screenOffset, Coord3d sceneOffset)
drawText
in interface ITextRenderer
public BoundingBox3d computeTextBounds(com.jogamp.opengl.GL gl, com.jogamp.opengl.glu.GLU glu, Camera cam, Coord3d position, org.jzy3d.plot3d.text.renderers.TextBillboardRenderer.BillBoardSize dims)
Copyright © 2016. All rights reserved.