Java Doc for Font3D.java in  » 6.0-JDK-Modules » java-3d » javax » media » j3d » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » java 3d » javax.media.j3d 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.media.j3d.SceneGraphObject
      javax.media.j3d.NodeComponent
         javax.media.j3d.Font3D

Font3D
public class Font3D extends NodeComponent (Code)
The Font3D object is used to store extruded 2D glyphs. These 3D glyphs can then be used to construct Text3D NodeComponent objects.

A 3D Font consists of a Java 2D font, a tesellation tolerance, and an extrusion path. The extrusion path creates depth by describing how the edge of a glyph varies in the Z axis.

The construction of a Text3D object requires a Font3D object. The Font3D object describes the style of the text, such as its depth. The text also needs other classes, such as java.awt.Font and FontExtrusion. The Font object describes the font name (Helvetica, Courier, etc.), the font style (bold, Italic, etc.), and point size. The FontExtrusion object extends Font3D by describing the extrusion path for the Font3D object (how the edge of the font glyph varies in the Z axis).

To ensure correct rendering, the 2D Font object should be created with the default AffineTransform. The point size of the 2D font will be used as a rough measure of how fine a tesselation to use when creating the Font3D object: the larger the point size, in general, the finer the tesselation.

Custom 3D fonts as well as methods to store 3D fonts to disk will be addressed in a future release.
See Also:   java.awt.Font
See Also:   FontExtrusion
See Also:   Text3D



Field Summary
final static  floatEPS
    
 Fontfont
    
 FontExtrusionfontExtrusion
    
 FontRenderContextfrc
    
 HashtablegeomHash
    
 doubletessellationTolerance
    

Constructor Summary
public  Font3D(Font font, FontExtrusion extrudePath)
     Constructs a Font3D object from the specified Font and FontExtrusion objects, using the default value for the tessellation tolerance.
public  Font3D(Font font, double tessellationTolerance, FontExtrusion extrudePath)
     Constructs a Font3D object from the specified Font and FontExtrusion objects, using the specified tessellation tolerance. The FontExtrusion object contains the extrusion path to use on the 2D Font glyphs.

Method Summary
static  intcheck2Contours(int begin1, int end1, int begin2, int end2, Point3f[] vertices)
    
public  voidgetBoundingBox(int glyphCode, BoundingBox bounds)
     Returns the 3D bounding box of the specified glyph code.
public  FontgetFont()
     Returns the Java 2D Font used to create this Font3D object.
public  voidgetFontExtrusion(FontExtrusion extrudePath)
     Copies the FontExtrusion object used to create this Font3D object into the specified parameter.
public  GeometryArraygetGlyphGeometry(char c)
     Returns a GeometryArray of a glyph in this Font3D.
Parameters:
  c - character from which to generate a tessellated glyph.
static  booleangetNormal(Point3f p1, Point3f p2, Point3f p3, Vector3f normal)
    
public  doublegetTessellationTolerance()
     Returns the tessellation tolerance with which this Font3D was created.
final static  booleannormalize(Vector3f v)
    
static  booleanpointInPolygon2D(float x, float y, int begIdx, int endIdx, Point3f[] verts)
    
 GeometryArrayRetainedtriangulateGlyphs(GlyphVector gv, char c)
    

Field Detail
EPS
final static float EPS(Code)



font
Font font(Code)



fontExtrusion
FontExtrusion fontExtrusion(Code)



frc
FontRenderContext frc(Code)



geomHash
Hashtable geomHash(Code)



tessellationTolerance
double tessellationTolerance(Code)




Constructor Detail
Font3D
public Font3D(Font font, FontExtrusion extrudePath)(Code)
Constructs a Font3D object from the specified Font and FontExtrusion objects, using the default value for the tessellation tolerance. The default value is as follows:
    tessellation tolerance : 0.01

The FontExtrusion object contains the extrusion path to use on the 2D Font glyphs. To ensure correct rendering the font must be created with the default AffineTransform. Passing null for the FontExtrusion parameter results in no extrusion being done.
Parameters:
  font - the Java 2D font used to create the 3D font object
Parameters:
  extrudePath - the extrusion path used to describe howthe edge of the font varies along the Z axis




Font3D
public Font3D(Font font, double tessellationTolerance, FontExtrusion extrudePath)(Code)
Constructs a Font3D object from the specified Font and FontExtrusion objects, using the specified tessellation tolerance. The FontExtrusion object contains the extrusion path to use on the 2D Font glyphs. To ensure correct rendering, the font must be created with the default AffineTransform. Passing null for the FontExtrusion parameter results in no extrusion being done.
Parameters:
  font - the Java 2D font used to create the 3D font object.
Parameters:
  tessellationTolerance - the tessellation tolerance valueused in tessellating the glyphs of the 2D Font.This corresponds to the flatness parameter inthe java.awt.Shape.getPathIterator method.
Parameters:
  extrudePath - the extrusion path used to describe howthe edge of the font varies along the Z axis.
since:
   Java 3D 1.2




Method Detail
check2Contours
static int check2Contours(int begin1, int end1, int begin2, int end2, Point3f[] vertices)(Code)



getBoundingBox
public void getBoundingBox(int glyphCode, BoundingBox bounds)(Code)
Returns the 3D bounding box of the specified glyph code.
Parameters:
  glyphCode - the glyphCode from the original 2D Font
Parameters:
  bounds - the 3D glyph's bounds



getFont
public Font getFont()(Code)
Returns the Java 2D Font used to create this Font3D object. Font object used by this Font3D



getFontExtrusion
public void getFontExtrusion(FontExtrusion extrudePath)(Code)
Copies the FontExtrusion object used to create this Font3D object into the specified parameter.
Parameters:
  extrudePath - object that will receive theFontExtrusion information for this Font3D object



getGlyphGeometry
public GeometryArray getGlyphGeometry(char c)(Code)
Returns a GeometryArray of a glyph in this Font3D.
Parameters:
  c - character from which to generate a tessellated glyph. a GeometryArray
since:
   Java 3D 1.4



getNormal
static boolean getNormal(Point3f p1, Point3f p2, Point3f p3, Vector3f normal)(Code)



getTessellationTolerance
public double getTessellationTolerance()(Code)
Returns the tessellation tolerance with which this Font3D was created. the tessellation tolerance used by this Font3D
since:
   Java 3D 1.2



normalize
final static boolean normalize(Vector3f v)(Code)



pointInPolygon2D
static boolean pointInPolygon2D(float x, float y, int begIdx, int endIdx, Point3f[] verts)(Code)



triangulateGlyphs
GeometryArrayRetained triangulateGlyphs(GlyphVector gv, char c)(Code)



Fields inherited from javax.media.j3d.NodeComponent
boolean forceDuplicate(Code)(Java Doc)

Methods inherited from javax.media.j3d.NodeComponent
final void checkDuplicateNodeComponent(NodeComponent originalNodeComponent)(Code)(Java Doc)
public NodeComponent cloneNodeComponent()(Code)(Java Doc)
public NodeComponent cloneNodeComponent(boolean forceDuplicate)(Code)(Java Doc)
void createRetained()(Code)(Java Doc)
void duplicateAttributes(NodeComponent originalNode, boolean forceDuplicate)(Code)(Java Doc)
boolean duplicateChild()(Code)(Java Doc)
public void duplicateNodeComponent(NodeComponent originalNodeComponent)(Code)(Java Doc)
public void duplicateNodeComponent(NodeComponent originalNodeComponent, boolean forceDuplicate)(Code)(Java Doc)
public boolean getDuplicateOnCloneTree()(Code)(Java Doc)
public void setDuplicateOnCloneTree(boolean duplicate)(Code)(Java Doc)
void validateImageIllegalSharing(ImageComponent image)(Code)(Java Doc)

Fields inherited from javax.media.j3d.SceneGraphObject
Hashtable nodeHashtable(Code)(Java Doc)
SceneGraphObjectRetained retained(Code)(Java Doc)

Methods inherited from javax.media.j3d.SceneGraphObject
final boolean capabilityBitsEmpty()(Code)(Java Doc)
final void checkForLiveOrCompiled()(Code)(Java Doc)
final public void clearCapability(int bit)(Code)(Java Doc)
final public void clearCapabilityIsFrequent(int bit)(Code)(Java Doc)
final void clearLive()(Code)(Java Doc)
void createRetained()(Code)(Java Doc)
protected void duplicateSceneGraphObject(SceneGraphObject originalNode)(Code)(Java Doc)
final public boolean getCapability(int bit)(Code)(Java Doc)
final public boolean getCapabilityIsFrequent(int bit)(Code)(Java Doc)
public String getName()(Code)(Java Doc)
String getNamePrefix()(Code)(Java Doc)
NodeComponent getNodeComponent(NodeComponent originalNodeComponent, boolean forceDuplicate, Hashtable hashtable)(Code)(Java Doc)
public Object getUserData()(Code)(Java Doc)
final public boolean isCompiled()(Code)(Java Doc)
final public boolean isLive()(Code)(Java Doc)
final boolean isLiveOrCompiled()(Code)(Java Doc)
final public void setCapability(int bit)(Code)(Java Doc)
final public void setCapabilityIsFrequent(int bit)(Code)(Java Doc)
final void setCompiled()(Code)(Java Doc)
void setDefaultReadCapabilities(int[] bits)(Code)(Java Doc)
final void setLive()(Code)(Java Doc)
public void setName(String name)(Code)(Java Doc)
public void setUserData(Object userData)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public void updateNodeReferences(NodeReferenceTable referenceTable)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.