Class VRML

java.lang.Object
  extended by VRML

public class VRML
extends java.lang.Object

Methods to construct a VRML .wrl file to visualize meshes using Balls and Sticks.


Constructor Summary
VRML()
          Constructor
VRML(java.io.PrintStream ps)
          Constructor
 
Method Summary
 void printBall(double x, double y, double z)
          Output a Ball.
 void printPostlog()
          Call this last
 void printProlog()
          Setup - call this first (and only once)
 void printStick(double x0, double y0, double z0, double x1, double y1, double z1)
          Output a Stick
 void setColor(double r, double g, double b)
          Specify the color of the Balls.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VRML

public VRML(java.io.PrintStream ps)
Constructor

Parameters:
ps - where to sent the output

VRML

public VRML()
Constructor

Method Detail

setColor

public void setColor(double r,
                     double g,
                     double b)
Specify the color of the Balls.


printBall

public void printBall(double x,
                      double y,
                      double z)
Output a Ball.

Parameters:
x - x coordinate
y - y coordinate
z - z coordinate

printStick

public void printStick(double x0,
                       double y0,
                       double z0,
                       double x1,
                       double y1,
                       double z1)
                throws java.io.IOException
Output a Stick

Parameters:
x0 - x coordinate for one endpoint
y0 - y coordinate for one endpoint
z0 - z coordinate for one endpoint
x1 - x coordinate for the other endpoint
y1 - y coordinate for the other endpoint
z1 - z coordinate for the other endpoint
Throws:
java.io.IOException

printProlog

public void printProlog()
                 throws java.io.IOException
Setup - call this first (and only once)

Throws:
java.io.IOException

printPostlog

public void printPostlog()
                  throws java.io.IOException
Call this last

Throws:
java.io.IOException