|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.scenegraph.SceneGraphObject
org.xith3d.scenegraph.Node
org.xith3d.scenegraph.Leaf
org.xith3d.scenegraph.Shape3D
org.xith3d.scenegraph.primitives.Quad
org.xith3d.scenegraph.primitives.Rectangle
org.xith3d.scenegraph.primitives.TextRectangle
org.xith3d.scenegraph.primitives.TextBillboard
public class TextBillboard
The TextBillboard is a Rectangle with a text-Texture on it, that's always
facing the camera.
The Texture is created by TextureCreator.createTexture(String, Colorf, java.awt.Font, int).
TextureCreator.createTexture(String, Colorf, java.awt.Font, int)| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.xith3d.scenegraph.primitives.Rectangle |
|---|
Rectangle.ZeroPointLocation |
| Field Summary | |
|---|---|
protected org.openmali.vecmath2.Point3f[] |
transformedVertices
|
protected org.openmali.vecmath2.Tuple3f[] |
zeroVertices
|
| Fields inherited from class org.xith3d.scenegraph.primitives.TextRectangle |
|---|
TEXT_ALIGNMENT_HORIZONTAL_CENTER, TEXT_ALIGNMENT_HORIZONTAL_LEFT, TEXT_ALIGNMENT_HORIZONTAL_RIGHT |
| Fields inherited from class org.xith3d.scenegraph.Node |
|---|
bounds, boundsAutoCompute, boundsDirty, globalIgnoreBounds, instanceBoundsTypeHint, parent, transformGroup, untransformedBounds |
| Fields inherited from class org.xith3d.scenegraph.SceneGraphObject |
|---|
XITH3D_USERDATAKEY_OLDUSERDATA |
| Constructor Summary | |
|---|---|
protected |
TextBillboard(float width,
float height,
Rectangle.ZeroPointLocation zpl,
float zOffset,
Texture texture)
Creates a TextBillboard. |
protected |
TextBillboard(float width,
float height,
org.openmali.vecmath2.Tuple3f position,
Texture texture)
Creates a TextBillboard. |
| Method Summary | |
|---|---|
static TextBillboard |
createFixedHeight(float height,
float zOffset,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font)
Creates a TextBillboard. |
static TextBillboard |
createFixedHeight(float height,
float zOffset,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font,
int alignment)
Creates a TextBillboard. |
static TextBillboard |
createFixedHeight(float height,
Rectangle.ZeroPointLocation zpl,
float zOffset,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font)
Creates a TextBillboard. |
static TextBillboard |
createFixedHeight(float height,
Rectangle.ZeroPointLocation zpl,
float zOffset,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font,
int alignment)
Creates a TextBillboard. |
static TextBillboard |
createFixedHeight(float height,
Rectangle.ZeroPointLocation zpl,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font)
Creates a TextBillboard. |
static TextBillboard |
createFixedHeight(float height,
Rectangle.ZeroPointLocation zpl,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font,
int alignment)
Creates a TextBillboard. |
static TextBillboard |
createFixedHeight(float height,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font)
Creates a TextBillboard. |
static TextBillboard |
createFixedHeight(float height,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font,
int alignment)
Creates a TextBillboard. |
static TextBillboard |
createFixedHeight(float height,
org.openmali.vecmath2.Tuple3f position,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font)
Creates a TextBillboard. |
static TextBillboard |
createFixedHeight(float height,
org.openmali.vecmath2.Tuple3f position,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font,
int alignment)
Creates a TextBillboard. |
static TextBillboard |
createFixedWidth(float width,
float zOffset,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font)
Creates a TextBillboard. |
static TextBillboard |
createFixedWidth(float width,
float zOffset,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font,
int alignment)
Creates a TextBillboard. |
static TextBillboard |
createFixedWidth(float width,
Rectangle.ZeroPointLocation zpl,
float zOffset,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font)
Creates a TextBillboard. |
static TextBillboard |
createFixedWidth(float width,
Rectangle.ZeroPointLocation zpl,
float zOffset,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font,
int alignment)
Creates a TextBillboard. |
static TextBillboard |
createFixedWidth(float width,
Rectangle.ZeroPointLocation zpl,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font)
Creates a TextBillboard. |
static TextBillboard |
createFixedWidth(float width,
Rectangle.ZeroPointLocation zpl,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font,
int alignment)
Creates a TextBillboard. |
static TextBillboard |
createFixedWidth(float width,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font)
Creates a TextRectangle. |
static TextBillboard |
createFixedWidth(float width,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font,
int alignment)
Creates a TextRectangle. |
static TextBillboard |
createFixedWidth(float width,
org.openmali.vecmath2.Tuple3f position,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font)
Creates a TextBillboard. |
static TextBillboard |
createFixedWidth(float width,
org.openmali.vecmath2.Tuple3f position,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font,
int alignment)
Creates a TextBillboard. |
org.openmali.types.twodee.Sized2iRO |
getSizeOnScreen()
Returns the Billboard desired on screen dimensions. |
void |
updateFaceToCamera(org.openmali.vecmath2.Matrix3f viewRotation,
long frameId,
long nanoTime,
long nanoStep)
This method is called by the renderer each frame, the BillBoard is rendered. |
void |
updateOriginalVertexCoordinates()
|
| Methods inherited from class org.xith3d.scenegraph.primitives.TextRectangle |
|---|
createFixedHeight, getHeightFromFixedWidth, getText, getTextAlignment, getTextColor, getTextFont, getWidthFromFixedHeight, setText, setText |
| Methods inherited from class org.xith3d.scenegraph.primitives.Quad |
|---|
createGeometry, generateNormals, getAlpha, getColor, getGeometry, setAlpha, setColor, setTexture, setTexture, setTexture, setTextureCoordinates, setTexturePosition, setVertexCoords, setVertexCoords, setVertexCoords, update, update |
| Methods inherited from class org.xith3d.scenegraph.Shape3D |
|---|
absorbDetails, freeOpenGLResources, getAppearance, getAppearance, isBumpMappingEnabled, isShadowReceiver, isVisible, newAppearance, setAppearance, setBounds, setBumpMappingEnabled, setBumpMappingEnabled, setGeometry, setIsShadowReceiver, setLive, setModListener, setVisible, sharedCopy, sharedCopy, traverse, updateBounds, updateBoundsCheap, updateWorldTransform, verifyAppChange |
| Methods inherited from class org.xith3d.scenegraph.Leaf |
|---|
dump, getPickHost, setPickHost |
| Methods inherited from class org.xith3d.scenegraph.SceneGraphObject |
|---|
getName, getUserData, getUserData, getUserDataMap, isLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected org.openmali.vecmath2.Tuple3f[] zeroVertices
protected org.openmali.vecmath2.Point3f[] transformedVertices
| Constructor Detail |
|---|
protected TextBillboard(float width,
float height,
org.openmali.vecmath2.Tuple3f position,
Texture texture)
width - width of the Rectangleheight - height of the Rectangleposition - relative Location of the Rectangletexture - the text-texture to apply
protected TextBillboard(float width,
float height,
Rectangle.ZeroPointLocation zpl,
float zOffset,
Texture texture)
width - width of the Rectangleheight - height of the Rectanglezpl - the location of the point (0, 0, 0)zOffset - relative z-Location of the Rectangletexture - the text-texture to apply| Method Detail |
|---|
public void updateOriginalVertexCoordinates()
public org.openmali.types.twodee.Sized2iRO getSizeOnScreen()
null, as the on-screen dimension is dependant on the
distance between the Billboard and the camera.
If the desired effect is a Billboard having a constant size on screen (usefull for icons,
or textual information that should be readable at any distance), then this method should
return the desired size in pixels. In this case, the Sized2iRO returned will
generally be a constant.
This method is called by the renderer each frame the Billboard is rendered.
Note to implementers: for this behaviour to work properly, the unmodified geometry
should of course have a unit size, ie: the width and the height should should be
equal to 1f. Else the effective desired size on screen will be scaled accordingly.
getSizeOnScreen in interface Billboardnull for a standard billboard.
public void updateFaceToCamera(org.openmali.vecmath2.Matrix3f viewRotation,
long frameId,
long nanoTime,
long nanoStep)
updateFaceToCamera in interface BillboardviewRotation - the camera's rotationframeId - the current rendered frame's id
public static TextBillboard createFixedWidth(float width,
org.openmali.vecmath2.Tuple3f position,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font,
int alignment)
width - (fixed) width of the Rectangleposition - relative Location of the Rectangletext - the text to render on the Rectanglecolor - the color to use for the textfont - the Font to use for the textalignment - the text horizontal alignment
public static TextBillboard createFixedWidth(float width,
float zOffset,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font,
int alignment)
width - (fixed) width of the RectanglezOffset - relative z-Location of the Rectangletext - the text to render on the Rectanglecolor - the color to use for the textfont - the Font to use for the textalignment - the text horizontal alignment
public static TextBillboard createFixedWidth(float width,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font,
int alignment)
alignment - the text horizontal alignmentwidth - (fixed) width of the Rectangletext - the text to render on the Rectanglecolor - the color to use for the textfont - the Font to use for the text
public static TextBillboard createFixedWidth(float width,
Rectangle.ZeroPointLocation zpl,
float zOffset,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font,
int alignment)
width - (fixed) width of the Rectanglezpl - the location of the point (0, 0, 0)zOffset - relative z-Location of the Rectangletext - the text to render on the Rectanglecolor - the color to use for the textfont - the Font to use for the textalignment - the text horizontal alignment
public static TextBillboard createFixedWidth(float width,
Rectangle.ZeroPointLocation zpl,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font,
int alignment)
width - (fixed) width of the Rectanglezpl - the location of the point (0, 0, 0)text - the text to render on the Rectanglecolor - the color to use for the textfont - the Font to use for the textalignment - the text horizontal alignment
public static TextBillboard createFixedWidth(float width,
org.openmali.vecmath2.Tuple3f position,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font)
width - (fixed) width of the Rectangleposition - relative Location of the Rectangletext - the text to render on the Rectanglecolor - the color to use for the textfont - the Font to use for the text
public static TextBillboard createFixedWidth(float width,
float zOffset,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font)
width - (fixed) width of the RectanglezOffset - relative z-Location of the Rectangletext - the text to render on the Rectanglecolor - the color to use for the textfont - the Font to use for the text
public static TextBillboard createFixedWidth(float width,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font)
text - the text to render on the Rectanglecolor - the color to use for the textfont - the Font to use for the textwidth - (fixed) width of the Rectangle
public static TextBillboard createFixedWidth(float width,
Rectangle.ZeroPointLocation zpl,
float zOffset,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font)
width - (fixed) width of the Rectanglezpl - the location of the point (0, 0, 0)zOffset - relative z-Location of the Rectangletext - the text to render on the Rectanglecolor - the color to use for the textfont - the Font to use for the text
public static TextBillboard createFixedWidth(float width,
Rectangle.ZeroPointLocation zpl,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font)
width - (fixed) width of the Rectanglezpl - the location of the point (0, 0, 0)text - the text to render on the Rectanglecolor - the color to use for the textfont - the Font to use for the text
public static TextBillboard createFixedHeight(float height,
org.openmali.vecmath2.Tuple3f position,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font,
int alignment)
height - (fixed) height of the Rectangleposition - relative Location of the Rectangletext - the text to render on the Rectanglecolor - the color to use for the textfont - the Font to use for the textalignment - the text horizontal alignment
public static TextBillboard createFixedHeight(float height,
float zOffset,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font,
int alignment)
height - (fixed) height of the RectanglezOffset - relative z-Location of the Rectangletext - the text to render on the Rectanglecolor - the color to use for the textfont - the Font to use for the textalignment - the text horizontal alignment
public static TextBillboard createFixedHeight(float height,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font,
int alignment)
height - (fixed) height of the Rectangletext - the text to render on the Rectanglecolor - the color to use for the textfont - the Font to use for the textalignment - the text horizontal alignment
public static TextBillboard createFixedHeight(float height,
Rectangle.ZeroPointLocation zpl,
float zOffset,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font,
int alignment)
height - (fixed) height of the Rectanglezpl - the location of the point (0, 0, 0)zOffset - relative z-Location of the Rectangletext - the text to render on the Rectanglecolor - the color to use for the textfont - the Font to use for the textalignment - the text horizontal alignment
public static TextBillboard createFixedHeight(float height,
Rectangle.ZeroPointLocation zpl,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font,
int alignment)
height - (fixed) height of the Rectanglezpl - the location of the point (0, 0, 0)text - the text to render on the Rectanglecolor - the color to use for the textfont - the Font to use for the textalignment - the text horizontal alignment
public static TextBillboard createFixedHeight(float height,
org.openmali.vecmath2.Tuple3f position,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font)
height - (fixed) height of the Rectangleposition - relative Location of the Rectangletext - the text to render on the Rectanglecolor - the color to use for the textfont - the Font to use for the text
public static TextBillboard createFixedHeight(float height,
float zOffset,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font)
height - (fixed) height of the RectanglezOffset - relative z-Location of the Rectangletext - the text to render on the Rectanglecolor - the color to use for the textfont - the Font to use for the text
public static TextBillboard createFixedHeight(float height,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font)
height - (fixed) height of the Rectangletext - the text to render on the Rectanglecolor - the color to use for the textfont - the Font to use for the text
public static TextBillboard createFixedHeight(float height,
Rectangle.ZeroPointLocation zpl,
float zOffset,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font)
height - (fixed) height of the Rectanglezpl - the location of the point (0, 0, 0)zOffset - relative z-Location of the Rectangletext - the text to render on the Rectanglecolor - the color to use for the textfont - the Font to use for the text
public static TextBillboard createFixedHeight(float height,
Rectangle.ZeroPointLocation zpl,
java.lang.String text,
org.openmali.vecmath2.Colorf color,
java.awt.Font font)
height - (fixed) height of the Rectanglezpl - the location of the point (0, 0, 0)text - the text to render on the Rectanglecolor - the color to use for the textfont - the Font to use for the text
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||