com.threerings.opengl.util
Class TextBillboard

java.lang.Object
  extended by com.threerings.opengl.util.SimpleRenderable
      extended by com.threerings.opengl.util.SimpleTransformable
          extended by com.threerings.opengl.scene.SimpleSceneElement
              extended by com.threerings.opengl.util.TextBillboard
All Implemented Interfaces:
Compositable, Enqueueable, UIConstants, SceneElement, SceneObject, Intersectable, Tickable

public class TextBillboard
extends SimpleSceneElement
implements UIConstants

A text billboard that may be embedded within a scene.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.threerings.opengl.scene.SceneElement
SceneElement.TickPolicy
 
Field Summary
 
Fields inherited from interface com.threerings.opengl.gui.UIConstants
BOTTOM, CENTER, DEFAULT_SIZE, DEFAULT_SPACING, GLOW, HORIZONTAL, LEFT, NORMAL, OUTLINE, OVERLAPPING, PLAIN, RIGHT, SHADOW, TOP, VERTICAL
 
Constructor Summary
TextBillboard(GlContext ctx, Font font, boolean antialias, String text, Color4f color)
          Creates a new text object using a character text factory.
TextBillboard(GlContext ctx, Font font, boolean antialias, String text, Color4f color, int effect, int effectSize, Color4f effectColor)
          Creates a new text object using a character text factory.
TextBillboard(GlContext ctx, Text text)
          Creates a new text object.
 
Method Summary
 void enqueue()
          Enqueues this object for rendering.
 float getAlpha()
          Returns the alpha value with which the text is being rendered.
 Text getText()
          Returns the text being rendered.
 void setAlpha(float alpha)
          Sets the alpha value with which to render the text.
 void setText(Font font, boolean antialias, String text, Color4f color)
          Sets the text using a character text factory.
 void setText(Font font, boolean antialias, String text, Color4f color, int effect, int effectSize, Color4f effectColor)
          Sets the text using a character text factory.
 void setText(Text text)
          Sets the text to render.
 
Methods inherited from class com.threerings.opengl.scene.SimpleSceneElement
getBounds, getIntersection, getTickPolicy, getUserObject, setInfluences, setTickPolicy, setTransform, setUserObject, tick, updateBounds, updateLastVisit, wasAdded, willBeRemoved
 
Methods inherited from class com.threerings.opengl.util.SimpleTransformable
getTransform
 
Methods inherited from class com.threerings.opengl.util.SimpleRenderable
composite, getStates
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.threerings.opengl.compositor.Compositable
composite
 

Constructor Detail

TextBillboard

public TextBillboard(GlContext ctx,
                     Font font,
                     boolean antialias,
                     String text,
                     Color4f color)
Creates a new text object using a character text factory.


TextBillboard

public TextBillboard(GlContext ctx,
                     Font font,
                     boolean antialias,
                     String text,
                     Color4f color,
                     int effect,
                     int effectSize,
                     Color4f effectColor)
Creates a new text object using a character text factory.


TextBillboard

public TextBillboard(GlContext ctx,
                     Text text)
Creates a new text object.

Method Detail

setText

public void setText(Font font,
                    boolean antialias,
                    String text,
                    Color4f color)
Sets the text using a character text factory.


setText

public void setText(Font font,
                    boolean antialias,
                    String text,
                    Color4f color,
                    int effect,
                    int effectSize,
                    Color4f effectColor)
Sets the text using a character text factory.


setText

public void setText(Text text)
Sets the text to render.


getText

public Text getText()
Returns the text being rendered.


setAlpha

public void setAlpha(float alpha)
Sets the alpha value with which to render the text.


getAlpha

public float getAlpha()
Returns the alpha value with which the text is being rendered.


enqueue

public void enqueue()
Description copied from interface: Enqueueable
Enqueues this object for rendering.

Specified by:
enqueue in interface Enqueueable
Overrides:
enqueue in class SimpleTransformable


Copyright © 2011. All Rights Reserved.