public class Text2D
extends javax.media.j3d.Shape3D
ALLOW_APPEARANCE_OVERRIDE_READ, ALLOW_APPEARANCE_OVERRIDE_WRITE, ALLOW_APPEARANCE_READ, ALLOW_APPEARANCE_WRITE, ALLOW_COLLISION_BOUNDS_READ, ALLOW_COLLISION_BOUNDS_WRITE, ALLOW_GEOMETRY_READ, ALLOW_GEOMETRY_WRITEALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING| Constructor and Description |
|---|
Text2D(String text,
javax.vecmath.Color3f color,
String fontName,
int fontSize,
int fontStyle)
Creates a Shape3D object which holds a
rectangle that is texture-mapped with an image that has
the specified text written with the specified font
parameters.
|
| Modifier and Type | Method and Description |
|---|---|
javax.media.j3d.Node |
cloneNode(boolean forceDuplicate) |
javax.vecmath.Color3f |
getColor()
Returns the color of the text
|
String |
getFontName()
Returns the font
|
int |
getFontSize()
Returns the font size
|
int |
getFontStyle()
Returns the font style
|
float |
getRectangleScaleFactor()
Gets the current scale factor being used in converting the image
width/height to width/height values in 3D.
|
String |
getString()
Returns the text string
|
void |
setRectangleScaleFactor(float newScaleFactor)
Sets the scale factor used in converting the image width/height
to width/height values in 3D.
|
void |
setString(String text) |
addGeometry, duplicateNode, getAllGeometries, getAppearance, getAppearanceOverrideEnable, getBounds, getCollisionBounds, getGeometry, getGeometry, indexOfGeometry, insertGeometry, intersect, intersect, intersect, numGeometries, removeAllGeometries, removeGeometry, removeGeometry, setAppearance, setAppearanceOverrideEnable, setCollisionBounds, setGeometry, setGeometrycloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickableclearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString, updateNodeReferencespublic Text2D(String text, javax.vecmath.Color3f color, String fontName, int fontSize, int fontStyle)
text - The string to be written into the texture map.color - The color of the text string.fontName - The name of the Java font to be used for
the text string.fontSize - The size of the Java font to be used.fontStyle - The style of the Java font to be used.public javax.media.j3d.Node cloneNode(boolean forceDuplicate)
cloneNode in class javax.media.j3d.Shape3Dpublic void setString(String text)
public void setRectangleScaleFactor(float newScaleFactor)
newScaleFactor - The new scale factor.public float getRectangleScaleFactor()
public String getString()
public javax.vecmath.Color3f getColor()
public String getFontName()
public int getFontSize()
public int getFontStyle()
Copyright © 2015. All rights reserved.