org.jmol.export
Class _VrmlExporter

java.lang.Object
  extended by org.jmol.export._Exporter
      extended by org.jmol.export._VrmlExporter

public class _VrmlExporter
extends _Exporter


Field Summary
private  java.util.Hashtable htDefs
           
private  int iObj
           
private  javax.vecmath.Point3f pt2
           
private  javax.vecmath.Point3f ptAtom
           
private  javax.vecmath.AxisAngle4f viewpoint
           
 
Fields inherited from class org.jmol.export._Exporter
bw, canDoTriangles, center, commandLineOptions, degreesPerRadian, depthZ, fileName, g3d, isCartesianExport, isToFile, jmolRenderer, output, pt, screenHeight, screenWidth, slabZ, tempA, tempP1, tempP2, tempP3, tempV1, tempV2, tempV3, use2dBondOrderCalculation, viewer
 
Constructor Summary
_VrmlExporter()
           
 
Method Summary
 void drawCircleCentered(short colix, int diameter, int x, int y, int z, boolean doFill)
           
 void drawPixel(short colix, int x, int y, int z)
           
 void drawString(short colix, java.lang.String str, Font3D font3d, int xBaseline, int yBaseline, int z, int zSlab)
           
 void drawTextPixel(int argb, int x, int y, int z)
           
 void endShapeBuffer()
           
 void fillCone(short colix, byte endcap, int diameter, javax.vecmath.Point3f screenBase, javax.vecmath.Point3f screenTip)
           
 void fillCylinder(javax.vecmath.Point3f ptA, javax.vecmath.Point3f ptB, short colix1, short colix2, byte endcaps, int diameter, int bondOrder)
           
 void fillCylinder(short colix, byte endcaps, int diameter, javax.vecmath.Point3f screenA, javax.vecmath.Point3f screenB)
           
 void fillScreenedCircleCentered(short colix, int diameter, int x, int y, int z)
           
 void fillSphereCentered(short colix, int diameter, javax.vecmath.Point3f pt)
           
 void fillTriangle(short colix, javax.vecmath.Point3f ptA, javax.vecmath.Point3f ptB, javax.vecmath.Point3f ptC)
           
private  java.lang.String getDef(java.lang.String key)
          Hashtable htDefs contains references to _n where n is a number.
 void getFooter()
           
 void getHeader()
           
private  void output(java.lang.String data)
           
private  void output(javax.vecmath.Tuple3f pt)
           
private  void outputAppearance(short colix, boolean isText)
           
private  void outputCylinder(javax.vecmath.Point3f pt1, javax.vecmath.Point3f pt2, short colix, byte endcaps, int madBond)
           
private  void outputCylinderChild(javax.vecmath.Point3f pt1, javax.vecmath.Point3f pt2, short colix, byte endcaps, int madBond)
           
private  void outputSphere(javax.vecmath.Point3f center, float radius, short colix)
           
private  void outputTransRot(javax.vecmath.Point3f pt1, javax.vecmath.Point3f pt2, int x, int y, int z)
           
 void plotImage(int x, int y, int z, java.awt.Image image, short bgcolix, int width, int height)
           
 void plotText(int x, int y, int z, short colix, java.lang.String text, Font3D font3d)
           
 void renderAtom(Atom atom, short colix)
           
(package private)  void renderEllipsoid(javax.vecmath.Point3f center, javax.vecmath.Point3f[] points, short colix, int x, int y, int z, int diameter, javax.vecmath.Matrix3f toEllipsoidal, double[] coef, javax.vecmath.Matrix4f deriv, javax.vecmath.Point3i[] octantPoints)
           
 void renderIsosurface(javax.vecmath.Point3f[] vertices, short colix, short[] colixes, javax.vecmath.Vector3f[] normals, int[][] indices, java.util.BitSet bsFaces, int nVertices, int faceVertexMax, short[] polygonColixes, int nPolygons)
           
 void renderText(Text t)
           
 void startShapeBuffer(int iShape)
           
 
Methods inherited from class org.jmol.export._Exporter
adjustViewpointPosition, finalizeOutput, getAxisAngle, getColorList, getExportDate, getFieldOfView, getRotation, getViewpointPosition, initializeOutput, opacityFractionalFromColix, rgbFractionalFromArgb, rgbFractionalFromColix, rgbFromColix, round, setRenderer, translucencyFractionalFromColix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

viewpoint

private javax.vecmath.AxisAngle4f viewpoint

iObj

private int iObj

htDefs

private java.util.Hashtable htDefs

ptAtom

private final javax.vecmath.Point3f ptAtom

pt2

private final javax.vecmath.Point3f pt2
Constructor Detail

_VrmlExporter

public _VrmlExporter()
Method Detail

output

private void output(java.lang.String data)

output

private void output(javax.vecmath.Tuple3f pt)

getDef

private java.lang.String getDef(java.lang.String key)
Hashtable htDefs contains references to _n where n is a number. we look up a key for anything and see if an object has been assigned. If it is there, we just return the phrase "USE _n". It it is not there, we return the DEF name that needs to be assigned. The calling method must then make that definition.

Parameters:
key -
Returns:
"_n" or "DEF _n"

getHeader

public void getHeader()
Specified by:
getHeader in class _Exporter

getFooter

public void getFooter()
Specified by:
getFooter in class _Exporter

outputAppearance

private void outputAppearance(short colix,
                              boolean isText)

renderAtom

public void renderAtom(Atom atom,
                       short colix)
Specified by:
renderAtom in class _Exporter

drawPixel

public void drawPixel(short colix,
                      int x,
                      int y,
                      int z)
Specified by:
drawPixel in class _Exporter

fillSphereCentered

public void fillSphereCentered(short colix,
                               int diameter,
                               javax.vecmath.Point3f pt)
Specified by:
fillSphereCentered in class _Exporter

outputSphere

private void outputSphere(javax.vecmath.Point3f center,
                          float radius,
                          short colix)

fillCylinder

public void fillCylinder(javax.vecmath.Point3f ptA,
                         javax.vecmath.Point3f ptB,
                         short colix1,
                         short colix2,
                         byte endcaps,
                         int diameter,
                         int bondOrder)
Specified by:
fillCylinder in class _Exporter

outputCylinder

private void outputCylinder(javax.vecmath.Point3f pt1,
                            javax.vecmath.Point3f pt2,
                            short colix,
                            byte endcaps,
                            int madBond)

outputCylinderChild

private void outputCylinderChild(javax.vecmath.Point3f pt1,
                                 javax.vecmath.Point3f pt2,
                                 short colix,
                                 byte endcaps,
                                 int madBond)

renderIsosurface

public void renderIsosurface(javax.vecmath.Point3f[] vertices,
                             short colix,
                             short[] colixes,
                             javax.vecmath.Vector3f[] normals,
                             int[][] indices,
                             java.util.BitSet bsFaces,
                             int nVertices,
                             int faceVertexMax,
                             short[] polygonColixes,
                             int nPolygons)
Specified by:
renderIsosurface in class _Exporter

outputTransRot

private void outputTransRot(javax.vecmath.Point3f pt1,
                            javax.vecmath.Point3f pt2,
                            int x,
                            int y,
                            int z)

fillCone

public void fillCone(short colix,
                     byte endcap,
                     int diameter,
                     javax.vecmath.Point3f screenBase,
                     javax.vecmath.Point3f screenTip)
Specified by:
fillCone in class _Exporter

fillCylinder

public void fillCylinder(short colix,
                         byte endcaps,
                         int diameter,
                         javax.vecmath.Point3f screenA,
                         javax.vecmath.Point3f screenB)
Specified by:
fillCylinder in class _Exporter

fillTriangle

public void fillTriangle(short colix,
                         javax.vecmath.Point3f ptA,
                         javax.vecmath.Point3f ptB,
                         javax.vecmath.Point3f ptC)
Specified by:
fillTriangle in class _Exporter

plotText

public void plotText(int x,
                     int y,
                     int z,
                     short colix,
                     java.lang.String text,
                     Font3D font3d)
Specified by:
plotText in class _Exporter

startShapeBuffer

public void startShapeBuffer(int iShape)
Specified by:
startShapeBuffer in class _Exporter

endShapeBuffer

public void endShapeBuffer()
Specified by:
endShapeBuffer in class _Exporter

renderText

public void renderText(Text t)
Specified by:
renderText in class _Exporter

drawString

public void drawString(short colix,
                       java.lang.String str,
                       Font3D font3d,
                       int xBaseline,
                       int yBaseline,
                       int z,
                       int zSlab)
Specified by:
drawString in class _Exporter

drawCircleCentered

public void drawCircleCentered(short colix,
                               int diameter,
                               int x,
                               int y,
                               int z,
                               boolean doFill)
Specified by:
drawCircleCentered in class _Exporter

fillScreenedCircleCentered

public void fillScreenedCircleCentered(short colix,
                                       int diameter,
                                       int x,
                                       int y,
                                       int z)
Specified by:
fillScreenedCircleCentered in class _Exporter

drawTextPixel

public void drawTextPixel(int argb,
                          int x,
                          int y,
                          int z)
Specified by:
drawTextPixel in class _Exporter

plotImage

public void plotImage(int x,
                      int y,
                      int z,
                      java.awt.Image image,
                      short bgcolix,
                      int width,
                      int height)
Specified by:
plotImage in class _Exporter

renderEllipsoid

void renderEllipsoid(javax.vecmath.Point3f center,
                     javax.vecmath.Point3f[] points,
                     short colix,
                     int x,
                     int y,
                     int z,
                     int diameter,
                     javax.vecmath.Matrix3f toEllipsoidal,
                     double[] coef,
                     javax.vecmath.Matrix4f deriv,
                     javax.vecmath.Point3i[] octantPoints)
Specified by:
renderEllipsoid in class _Exporter