|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jmex.font3d.Font3D
public class Font3D
This class represents a font ready to be used for 3D. Known bugs: - When glyphs are constructed from other glyphs, the shape returned by gv.getGlyphOutline(0); has them all cluddered up. This might be a bug in the VM, and I have no time to fix it, that is why the loading of each glyph has a try-catch-all statement around it.
| Field Summary | |
|---|---|
(package private) java.awt.Font |
font
|
(package private) Glyph3D[] |
glyph3Ds
|
(package private) boolean |
has_alpha_blending
|
(package private) boolean |
has_diffuse_material
|
(package private) Node |
renderNode
|
| Constructor Summary | |
|---|---|
Font3D(java.awt.Font font,
double flatness,
boolean drawSides,
boolean drawFront,
boolean drawBack)
|
|
| Method Summary | |
|---|---|
Text3D |
createText(java.lang.String text,
float size,
int flags)
Method for creating the text from the font. |
static Text3D |
createText(java.lang.String fontname,
java.lang.String text,
float size,
int flags)
This method will create a peace of 3d text from this font. |
boolean |
drawBack()
|
boolean |
drawFront()
|
boolean |
drawSides()
|
void |
enableBlendState()
|
void |
enableDiffuseMaterial()
|
double |
getFlatness()
|
java.awt.Font |
getFont()
|
Glyph3D |
getGlyph(char c)
|
Glyph3D[] |
getGlyphs()
|
Node |
getRenderNode()
This method is used when text wants to render, much like the shared |
boolean |
isMeshLocked()
|
static void |
loadFont3D(java.lang.String fontname,
java.awt.Font font,
double flatness,
boolean drawSides,
boolean drawFront,
boolean drawBack)
This method loads and caches a font, call this before calls to #createText(String, int). |
void |
lockMesh()
|
static void |
unloadFont(java.lang.String fontname)
Removes a cached Font3D. |
void |
unlockMesh()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
Node renderNode
Glyph3D[] glyph3Ds
java.awt.Font font
boolean has_alpha_blending
boolean has_diffuse_material
| Constructor Detail |
|---|
public Font3D(java.awt.Font font,
double flatness,
boolean drawSides,
boolean drawFront,
boolean drawBack)
| Method Detail |
|---|
public Node getRenderNode()
public Text3D createText(java.lang.String text,
float size,
int flags)
createText in interface TextFactorytext - size - flags -
public static void loadFont3D(java.lang.String fontname,
java.awt.Font font,
double flatness,
boolean drawSides,
boolean drawFront,
boolean drawBack)
#createText(String, int).
fontname - font - public static void unloadFont(java.lang.String fontname)
fontname -
public static Text3D createText(java.lang.String fontname,
java.lang.String text,
float size,
int flags)
fontname - text - size -
public Glyph3D getGlyph(char c)
public java.awt.Font getFont()
public double getFlatness()
public boolean drawSides()
public boolean drawFront()
public boolean drawBack()
public Glyph3D[] getGlyphs()
public boolean isMeshLocked()
public void unlockMesh()
public void lockMesh()
public void enableBlendState()
public void enableDiffuseMaterial()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||