ccvisu
Class WriterDataGraphicsVRML

java.lang.Object
  extended by ccvisu.WriterData
      extended by ccvisu.WriterDataGraphics
          extended by ccvisu.WriterDataGraphicsVRML

public class WriterDataGraphicsVRML
extends WriterDataGraphics

Writer for layouts in VRML format.

Version:
$Revision: 1.38 $; $Date: 2007/12/15 01:20:51 $
Author:
Dirk Beyer

Field Summary
 
Fields inherited from class ccvisu.WriterDataGraphics
options
 
Fields inherited from class ccvisu.WriterData
endl, graph, out
 
Constructor Summary
WriterDataGraphicsVRML(java.io.PrintWriter out, GraphData graph, Options opt)
          Constructor.
 
Method Summary
 void write()
          Writes the layout in graphics format VRML.
 void writeEdge(GraphEdge edge, int xPos1, int yPos1, int zPos1, int xPos2, int yPos2, int zPos2)
          Writes an edge.
 void writeGraphicsLayout(java.util.List<GraphVertex> pVertices, java.util.List<GraphEdge> pEdges, int size)
          Write graphics layout.
 void writeVertex(GraphVertex curVertex, int xPos, int yPos, int zPos, int radius)
          Writes a vertex in VRML format.
 
Methods inherited from class ccvisu.WriterDataGraphics
paintArrow
 
Methods inherited from class ccvisu.WriterData
mkQuoted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WriterDataGraphicsVRML

public WriterDataGraphicsVRML(java.io.PrintWriter out,
                              GraphData graph,
                              Options opt)
Constructor.

Method Detail

write

public void write()
Writes the layout in graphics format VRML.

Specified by:
write in class WriterDataGraphics

writeGraphicsLayout

public void writeGraphicsLayout(java.util.List<GraphVertex> pVertices,
                                java.util.List<GraphEdge> pEdges,
                                int size)
Write graphics layout.

Overrides:
writeGraphicsLayout in class WriterDataGraphics
Parameters:
size - Size of output area (e.g., number of pixel).

writeVertex

public void writeVertex(GraphVertex curVertex,
                        int xPos,
                        int yPos,
                        int zPos,
                        int radius)
Writes a vertex in VRML format.

Specified by:
writeVertex in class WriterDataGraphics
Parameters:
curVertex - The vertex object, to access vertex attributes.
xPos - x coordinate of the vertex.
yPos - y coordinate of the vertex.
zPos - z coordinate of the vertex.
radius - Radius of the vertex.

writeEdge

public void writeEdge(GraphEdge edge,
                      int xPos1,
                      int yPos1,
                      int zPos1,
                      int xPos2,
                      int yPos2,
                      int zPos2)
Writes an edge.

Specified by:
writeEdge in class WriterDataGraphics
Parameters:
edge - an edge in graph.edges
xPos1 - x coordinate of the first point.
yPos1 - y coordinate of the first point.
zPos1 - z coordinate of the first point.
xPos2 - x coordinate of the second point.
yPos2 - y coordinate of the second point.
zPos2 - z coordinate of the second point.