org.jmol.export
Class _Exporter

java.lang.Object
  extended by org.jmol.export._Exporter
Direct Known Subclasses:
_IdtfExporter, _MayaExporter, _PovrayExporter, _VrmlExporter, _X3dExporter

public abstract class _Exporter
extends java.lang.Object


Field Summary
protected  java.io.BufferedWriter bw
           
(package private)  boolean canDoTriangles
           
protected  javax.vecmath.Point3f center
           
protected  java.lang.String commandLineOptions
           
protected static float degreesPerRadian
           
protected  int depthZ
           
protected  java.lang.String fileName
           
protected  Graphics3D g3d
           
(package private)  boolean isCartesianExport
           
protected  boolean isToFile
           
protected  JmolRendererInterface jmolRenderer
           
private  java.io.FileOutputStream os
           
protected  java.lang.StringBuffer output
           
protected  javax.vecmath.Point3f pt
           
protected  int screenHeight
           
protected  int screenWidth
           
protected  int slabZ
           
protected  javax.vecmath.AxisAngle4f tempA
           
protected  javax.vecmath.Point3f tempP1
           
protected  javax.vecmath.Point3f tempP2
           
protected  javax.vecmath.Point3f tempP3
           
protected  javax.vecmath.Vector3f tempV1
           
protected  javax.vecmath.Vector3f tempV2
           
protected  javax.vecmath.Vector3f tempV3
           
(package private)  boolean use2dBondOrderCalculation
           
protected  Viewer viewer
           
 
Constructor Summary
_Exporter()
           
 
Method Summary
protected  void adjustViewpointPosition(javax.vecmath.Point3f ptAtom)
           
(package private) abstract  void drawCircleCentered(short colix, int diameter, int x, int y, int z, boolean doFill)
           
(package private) abstract  void drawPixel(short colix, int x, int y, int z)
           
(package private) abstract  void drawString(short colix, java.lang.String str, Font3D font3d, int xBaseline, int yBaseline, int z, int zSlab)
           
(package private) abstract  void drawTextPixel(int argb, int x, int y, int z)
           
(package private) abstract  void endShapeBuffer()
           
(package private) abstract  void fillCone(short colix, byte endcap, int diameter, javax.vecmath.Point3f screenBase, javax.vecmath.Point3f screenTip)
           
(package private) abstract  void fillCylinder(javax.vecmath.Point3f atom1, javax.vecmath.Point3f atom2, short colix1, short colix2, byte endcaps, int madBond, int bondOrder)
           
(package private) abstract  void fillCylinder(short colix, byte endcaps, int diameter, javax.vecmath.Point3f screenA, javax.vecmath.Point3f screenB)
           
(package private) abstract  void fillScreenedCircleCentered(short colix, int diameter, int x, int y, int z)
           
(package private) abstract  void fillSphereCentered(short colix, int diameter, javax.vecmath.Point3f pt)
           
(package private) abstract  void fillTriangle(short colix, javax.vecmath.Point3f ptA, javax.vecmath.Point3f ptB, javax.vecmath.Point3f ptC)
           
 java.lang.String finalizeOutput()
           
protected  javax.vecmath.AxisAngle4f getAxisAngle(javax.vecmath.Vector3f v, int x, int y, int z)
           
protected  java.util.Vector getColorList(int i0, short[] colixes, int nVertices, java.util.BitSet bsSelected, java.util.Hashtable htColixes)
          input an array of colixes; returns a Vector for the color list and a HashTable for correlating the colix with a specific color index
protected static java.lang.String getExportDate()
           
protected  float getFieldOfView()
           
(package private) abstract  void getFooter()
           
(package private) abstract  void getHeader()
           
protected  javax.vecmath.Vector3f getRotation(javax.vecmath.Vector3f v)
           
protected  void getViewpointPosition(javax.vecmath.Point3f ptAtom)
           
 boolean initializeOutput(Viewer viewer, Graphics3D g3d, java.lang.Object output)
           
protected  java.lang.String opacityFractionalFromColix(short colix)
           
(package private) abstract  void plotImage(int x, int y, int z, java.awt.Image image, short bgcolix, int width, int height)
           
(package private) abstract  void plotText(int x, int y, int z, short colix, java.lang.String text, Font3D font3d)
           
(package private) abstract  void renderAtom(Atom atom, short colix)
           
(package private) abstract  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)
           
(package private) abstract  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)
           
(package private) abstract  void renderText(Text t)
           
protected  java.lang.String rgbFractionalFromArgb(int argb, char sep)
           
protected  java.lang.String rgbFractionalFromColix(short colix, char sep)
           
protected  java.lang.String rgbFromColix(short colix, char sep)
           
protected static float round(double number)
           
 void setRenderer(JmolRendererInterface jmolRenderer)
           
(package private) abstract  void startShapeBuffer(int iShape)
           
protected  java.lang.String translucencyFractionalFromColix(short colix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

viewer

protected Viewer viewer

jmolRenderer

protected JmolRendererInterface jmolRenderer

output

protected java.lang.StringBuffer output

bw

protected java.io.BufferedWriter bw

os

private java.io.FileOutputStream os

fileName

protected java.lang.String fileName

commandLineOptions

protected java.lang.String commandLineOptions

isToFile

protected boolean isToFile

g3d

protected Graphics3D g3d

screenWidth

protected int screenWidth

screenHeight

protected int screenHeight

slabZ

protected int slabZ

depthZ

protected int depthZ

use2dBondOrderCalculation

boolean use2dBondOrderCalculation

canDoTriangles

boolean canDoTriangles

isCartesianExport

boolean isCartesianExport

center

protected javax.vecmath.Point3f center

tempP1

protected javax.vecmath.Point3f tempP1

tempP2

protected javax.vecmath.Point3f tempP2

tempP3

protected javax.vecmath.Point3f tempP3

tempV1

protected javax.vecmath.Vector3f tempV1

tempV2

protected javax.vecmath.Vector3f tempV2

tempV3

protected javax.vecmath.Vector3f tempV3

tempA

protected javax.vecmath.AxisAngle4f tempA

degreesPerRadian

protected static final float degreesPerRadian
See Also:
Constant Field Values

pt

protected final javax.vecmath.Point3f pt
Constructor Detail

_Exporter

public _Exporter()
Method Detail

setRenderer

public void setRenderer(JmolRendererInterface jmolRenderer)

initializeOutput

public boolean initializeOutput(Viewer viewer,
                                Graphics3D g3d,
                                java.lang.Object output)

finalizeOutput

public java.lang.String finalizeOutput()

getExportDate

protected static java.lang.String getExportDate()

getFieldOfView

protected float getFieldOfView()

getViewpointPosition

protected void getViewpointPosition(javax.vecmath.Point3f ptAtom)

adjustViewpointPosition

protected void adjustViewpointPosition(javax.vecmath.Point3f ptAtom)

getRotation

protected javax.vecmath.Vector3f getRotation(javax.vecmath.Vector3f v)

getAxisAngle

protected javax.vecmath.AxisAngle4f getAxisAngle(javax.vecmath.Vector3f v,
                                                 int x,
                                                 int y,
                                                 int z)

rgbFromColix

protected java.lang.String rgbFromColix(short colix,
                                        char sep)

rgbFractionalFromColix

protected java.lang.String rgbFractionalFromColix(short colix,
                                                  char sep)

rgbFractionalFromArgb

protected java.lang.String rgbFractionalFromArgb(int argb,
                                                 char sep)

translucencyFractionalFromColix

protected java.lang.String translucencyFractionalFromColix(short colix)

opacityFractionalFromColix

protected java.lang.String opacityFractionalFromColix(short colix)

round

protected static float round(double number)

getColorList

protected java.util.Vector getColorList(int i0,
                                        short[] colixes,
                                        int nVertices,
                                        java.util.BitSet bsSelected,
                                        java.util.Hashtable htColixes)
input an array of colixes; returns a Vector for the color list and a HashTable for correlating the colix with a specific color index

Parameters:
i0 -
colixes -
nVertices -
bsSelected -
htColixes -
Returns:
Vector and HashTable

getHeader

abstract void getHeader()

getFooter

abstract void getFooter()

renderAtom

abstract void renderAtom(Atom atom,
                         short colix)

renderIsosurface

abstract 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)

renderText

abstract void renderText(Text t)

drawString

abstract void drawString(short colix,
                         java.lang.String str,
                         Font3D font3d,
                         int xBaseline,
                         int yBaseline,
                         int z,
                         int zSlab)

fillCylinder

abstract void fillCylinder(javax.vecmath.Point3f atom1,
                           javax.vecmath.Point3f atom2,
                           short colix1,
                           short colix2,
                           byte endcaps,
                           int madBond,
                           int bondOrder)

fillCylinder

abstract void fillCylinder(short colix,
                           byte endcaps,
                           int diameter,
                           javax.vecmath.Point3f screenA,
                           javax.vecmath.Point3f screenB)

drawCircleCentered

abstract void drawCircleCentered(short colix,
                                 int diameter,
                                 int x,
                                 int y,
                                 int z,
                                 boolean doFill)

fillScreenedCircleCentered

abstract void fillScreenedCircleCentered(short colix,
                                         int diameter,
                                         int x,
                                         int y,
                                         int z)

drawPixel

abstract void drawPixel(short colix,
                        int x,
                        int y,
                        int z)

drawTextPixel

abstract void drawTextPixel(int argb,
                            int x,
                            int y,
                            int z)

fillCone

abstract void fillCone(short colix,
                       byte endcap,
                       int diameter,
                       javax.vecmath.Point3f screenBase,
                       javax.vecmath.Point3f screenTip)

fillTriangle

abstract void fillTriangle(short colix,
                           javax.vecmath.Point3f ptA,
                           javax.vecmath.Point3f ptB,
                           javax.vecmath.Point3f ptC)

fillSphereCentered

abstract void fillSphereCentered(short colix,
                                 int diameter,
                                 javax.vecmath.Point3f pt)

plotText

abstract void plotText(int x,
                       int y,
                       int z,
                       short colix,
                       java.lang.String text,
                       Font3D font3d)

plotImage

abstract void plotImage(int x,
                        int y,
                        int z,
                        java.awt.Image image,
                        short bgcolix,
                        int width,
                        int height)

startShapeBuffer

abstract void startShapeBuffer(int iShape)

endShapeBuffer

abstract void endShapeBuffer()

renderEllipsoid

abstract 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)