com.jmex.font3d
Class Glyph3D

java.lang.Object
  extended by com.jmex.font3d.Glyph3D

public class Glyph3D
extends java.lang.Object

This class represents a glyph of text.

Author:
emanuel

Field Summary
(package private)  java.util.Vector<PlanarEdge> outline
           
(package private)  Vector3f[] outline_normals
           
(package private)  Triangulator subdivision
          This represents the planar subdivision of the glyph, before triangulation.
(package private)  java.nio.IntBuffer surface
           
 
Constructor Summary
Glyph3D(char glyph_char)
           
 
Method Summary
 void addPolygon(ClosedPolygon poly)
          This method adds one closed polygon to the subdivision (it can both be the outer-polygon or the inner) In normal glyphs, the outer should be clockwise and the inner counter-clockwise.
 void generateMesh(boolean drawSides, boolean drawFront, boolean drawBack)
          Here we create the glyph-mesh from the triangulation (using sides/front/back according to arguments).
 java.awt.geom.Rectangle2D getBounds()
           
 char getChar()
           
 int getChildIndex()
           
 Glyph3DMesh getMesh()
           
 java.util.Vector<PlanarEdge> getOutline()
           
 Vector3f[] getOutlineNormals()
           
 java.nio.IntBuffer getSurface()
           
 java.util.ArrayList<TriangulationVertex> getVertices()
           
 boolean isEmpty()
           
 void setBounds(java.awt.geom.Rectangle2D bounds2D)
           
 void setChildIndex(int index)
           
 void triangulate()
          Triangulate the glyph, but first save the original outline.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

subdivision

Triangulator subdivision
This represents the planar subdivision of the glyph, before triangulation.


outline

java.util.Vector<PlanarEdge> outline

outline_normals

Vector3f[] outline_normals

surface

java.nio.IntBuffer surface
Constructor Detail

Glyph3D

public Glyph3D(char glyph_char)
Method Detail

addPolygon

public void addPolygon(ClosedPolygon poly)
This method adds one closed polygon to the subdivision (it can both be the outer-polygon or the inner) In normal glyphs, the outer should be clockwise and the inner counter-clockwise. That is why we add the edges in the opposite order, due to the convention of DoublyConnectedEdgeList.


triangulate

public void triangulate()
Triangulate the glyph, but first save the original outline.


isEmpty

public boolean isEmpty()

getOutline

public java.util.Vector<PlanarEdge> getOutline()

getOutlineNormals

public Vector3f[] getOutlineNormals()

getSurface

public java.nio.IntBuffer getSurface()

setBounds

public void setBounds(java.awt.geom.Rectangle2D bounds2D)

getBounds

public java.awt.geom.Rectangle2D getBounds()

getVertices

public java.util.ArrayList<TriangulationVertex> getVertices()

generateMesh

public void generateMesh(boolean drawSides,
                         boolean drawFront,
                         boolean drawBack)
Here we create the glyph-mesh from the triangulation (using sides/front/back according to arguments).

Parameters:
drawBack -
drawFront -
drawSides -

getMesh

public Glyph3DMesh getMesh()

getChar

public char getChar()

setChildIndex

public void setChildIndex(int index)

getChildIndex

public int getChildIndex()