org.jmol.export
Class ___Exporter

java.lang.Object
  extended by org.jmol.export.___Exporter
Direct Known Subclasses:
__CartesianExporter, __RayTracerExporter

public abstract class ___Exporter
extends java.lang.Object


Field Summary
protected  float aperatureAngle
           
protected  short backgroundColix
           
protected  java.io.BufferedWriter bw
           
protected  float cameraDistance
           
protected  javax.vecmath.Point3f cameraPosition
           
protected  javax.vecmath.Point3f center
           
protected  java.lang.String commandLineOptions
           
protected  java.lang.String commentChar
           
protected static float degreesPerRadian
           
protected  int depthZ
           
(package private)  int exportType
           
protected  java.lang.String fileName
           
protected  javax.vecmath.Point3f fixedRotationCenter
           
protected  Graphics3D g3d
           
protected  boolean isToFile
           
protected  JmolRendererInterface jmolRenderer
           
protected  javax.vecmath.Point3f lightSource
           
 short lineWidthMad
           
protected  int nBytes
           
private  int nImage
           
private  int nText
           
private  java.io.FileOutputStream os
           
protected  java.lang.StringBuffer output
           
protected  double privateKey
           
protected  javax.vecmath.Point3f referenceCenter
           
protected  float scalePixelsPerAngstrom
           
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
           
protected  Viewer viewer
           
 
Constructor Summary
___Exporter()
           
 
Method Summary
(package private) abstract  void drawAtom(Atom atom)
           
(package private) abstract  void drawCircle(int x, int y, int z, int diameter, short colix, boolean doFill)
           
(package private) abstract  void drawCylinder(javax.vecmath.Point3f atom1, javax.vecmath.Point3f atom2, short colix1, short colix2, byte endcaps, int madBond, int bondOrder)
           
(package private) abstract  boolean drawEllipse(javax.vecmath.Point3f ptAtom, javax.vecmath.Point3f ptX, javax.vecmath.Point3f ptY, short colix, boolean doFill)
           
(package private)  void drawFilledCircle(short colixRing, short colixFill, int diameter, int x, int y, int z)
           
(package private) abstract  void drawPixel(short colix, int x, int y, int z, int scale)
           
(package private)  void drawSurface(MeshSurface meshSurface, short colix)
           
(package private) abstract  void drawTextPixel(int argb, int x, int y, int z)
           
(package private) abstract  void fillConeScreen(short colix, byte endcap, int screenDiameter, javax.vecmath.Point3f screenBase, javax.vecmath.Point3f screenTip, boolean isBarb)
           
(package private) abstract  void fillCylinderScreen(short colix, byte endcaps, int screenDiameter, javax.vecmath.Point3f screenA, javax.vecmath.Point3f screenB)
           
(package private) abstract  void fillCylinderScreenMad(short colix, byte endcaps, int diameter, javax.vecmath.Point3f screenA, javax.vecmath.Point3f screenB)
           
(package private) abstract  void fillEllipsoid(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 fillSphere(short colix, int diameter, javax.vecmath.Point3f pt)
           
protected abstract  void fillTriangle(short colix, javax.vecmath.Point3f ptA, javax.vecmath.Point3f ptB, javax.vecmath.Point3f ptC, boolean twoSided)
           
(package private)  java.lang.String finalizeOutput()
           
protected  java.util.List<java.lang.Short> getColorList(int i00, short[] colixes, int nVertices, java.util.BitSet bsSelected, java.util.Map<java.lang.Short,java.lang.Integer> 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 MeshSurface getConeMesh(javax.vecmath.Point3f centerBase, javax.vecmath.Matrix3f matRotateScale, short colix)
           
protected static java.lang.String getExportDate()
           
protected  java.lang.String getJmolPerspective()
           
protected  javax.vecmath.Matrix3f getRotationMatrix(javax.vecmath.Point3f pt1, javax.vecmath.Point3f pt2, float radius)
           
protected  javax.vecmath.Matrix3f getRotationMatrix(javax.vecmath.Point3f pt1, javax.vecmath.Point3f ptZ, float radius, javax.vecmath.Point3f ptX, javax.vecmath.Point3f ptY)
           
(package private)  boolean initializeOutput(Viewer viewer, double privateKey, Graphics3D g3d, java.lang.Object output)
           
protected static java.lang.String opacityFractionalFromArgb(int argb)
           
protected static java.lang.String opacityFractionalFromColix(short colix)
           
protected  void output(java.lang.String data)
           
protected abstract  void output(javax.vecmath.Tuple3f pt)
           
protected  void outputComment(java.lang.String comment)
           
protected  void outputFooter()
           
protected abstract  void outputHeader()
           
protected  void outputJmolPerspective()
           
protected  void outputSurface(javax.vecmath.Point3f[] vertices, javax.vecmath.Vector3f[] normals, short[] colixes, int[][] indices, short[] polygonColixes, int nVertices, int nPolygons, int nFaces, java.util.BitSet bsPolygons, int faceVertexMax, short colix, java.util.List<java.lang.Short> colorList, java.util.Map<java.lang.Short,java.lang.Integer> htColixes, javax.vecmath.Point3f offset)
           
protected  void outputVertex(javax.vecmath.Point3f pt, javax.vecmath.Point3f offset)
           
protected  void outputVertices(javax.vecmath.Point3f[] vertices, int nVertices, javax.vecmath.Point3f offset)
           
(package private)  void plotImage(int x, int y, int z, java.awt.Image image, short bgcolix, int width, int height)
           
(package private)  void plotText(int x, int y, int z, short colix, java.lang.String text, Font3D font3d)
           
protected static java.lang.String rgbFractionalFromArgb(int argb, char sep)
           
protected  java.lang.String rgbFractionalFromColix(short colix, char sep)
           
protected static java.lang.String round(double number)
           
protected static java.lang.String round(javax.vecmath.Tuple3f pt)
           
(package private)  void setRenderer(JmolRendererInterface jmolRenderer)
           
protected static void setTempVertex(javax.vecmath.Point3f pt, javax.vecmath.Point3f offset, javax.vecmath.Point3f ptTemp)
           
protected static 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

privateKey

protected double privateKey

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

backgroundColix

protected short backgroundColix

screenWidth

protected int screenWidth

screenHeight

protected int screenHeight

slabZ

protected int slabZ

depthZ

protected int depthZ

lightSource

protected javax.vecmath.Point3f lightSource

fixedRotationCenter

protected javax.vecmath.Point3f fixedRotationCenter

referenceCenter

protected javax.vecmath.Point3f referenceCenter

cameraPosition

protected javax.vecmath.Point3f cameraPosition

cameraDistance

protected float cameraDistance

aperatureAngle

protected float aperatureAngle

scalePixelsPerAngstrom

protected float scalePixelsPerAngstrom

exportType

int exportType

degreesPerRadian

protected static final float degreesPerRadian
See Also:
Constant Field Values

tempP1

protected final javax.vecmath.Point3f tempP1

tempP2

protected final javax.vecmath.Point3f tempP2

tempP3

protected final javax.vecmath.Point3f tempP3

center

protected final javax.vecmath.Point3f center

tempV1

protected final javax.vecmath.Vector3f tempV1

tempV2

protected final javax.vecmath.Vector3f tempV2

tempV3

protected final javax.vecmath.Vector3f tempV3

tempA

protected final javax.vecmath.AxisAngle4f tempA

nBytes

protected int nBytes

commentChar

protected java.lang.String commentChar

nText

private int nText

nImage

private int nImage

lineWidthMad

public short lineWidthMad
Constructor Detail

___Exporter

public ___Exporter()
Method Detail

setRenderer

void setRenderer(JmolRendererInterface jmolRenderer)

initializeOutput

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

outputHeader

protected abstract void outputHeader()

output

protected void output(java.lang.String data)

outputComment

protected void outputComment(java.lang.String comment)

setTempVertex

protected static void setTempVertex(javax.vecmath.Point3f pt,
                                    javax.vecmath.Point3f offset,
                                    javax.vecmath.Point3f ptTemp)

outputVertices

protected void outputVertices(javax.vecmath.Point3f[] vertices,
                              int nVertices,
                              javax.vecmath.Point3f offset)

outputVertex

protected void outputVertex(javax.vecmath.Point3f pt,
                            javax.vecmath.Point3f offset)

output

protected abstract void output(javax.vecmath.Tuple3f pt)

outputJmolPerspective

protected void outputJmolPerspective()

getJmolPerspective

protected java.lang.String getJmolPerspective()

outputFooter

protected void outputFooter()

finalizeOutput

java.lang.String finalizeOutput()

getExportDate

protected static java.lang.String getExportDate()

rgbFractionalFromColix

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

rgbFractionalFromArgb

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

translucencyFractionalFromColix

protected static java.lang.String translucencyFractionalFromColix(short colix)

opacityFractionalFromColix

protected static java.lang.String opacityFractionalFromColix(short colix)

opacityFractionalFromArgb

protected static java.lang.String opacityFractionalFromArgb(int argb)

round

protected static java.lang.String round(double number)

round

protected static java.lang.String round(javax.vecmath.Tuple3f pt)

getColorList

protected java.util.List<java.lang.Short> getColorList(int i00,
                                                       short[] colixes,
                                                       int nVertices,
                                                       java.util.BitSet bsSelected,
                                                       java.util.Map<java.lang.Short,java.lang.Integer> 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:
i00 -
colixes -
nVertices -
bsSelected -
htColixes -
Returns:
Vector and HashTable

getConeMesh

protected static MeshSurface getConeMesh(javax.vecmath.Point3f centerBase,
                                         javax.vecmath.Matrix3f matRotateScale,
                                         short colix)

getRotationMatrix

protected javax.vecmath.Matrix3f getRotationMatrix(javax.vecmath.Point3f pt1,
                                                   javax.vecmath.Point3f pt2,
                                                   float radius)

getRotationMatrix

protected javax.vecmath.Matrix3f getRotationMatrix(javax.vecmath.Point3f pt1,
                                                   javax.vecmath.Point3f ptZ,
                                                   float radius,
                                                   javax.vecmath.Point3f ptX,
                                                   javax.vecmath.Point3f ptY)

drawAtom

abstract void drawAtom(Atom atom)

drawCircle

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

drawEllipse

abstract boolean drawEllipse(javax.vecmath.Point3f ptAtom,
                             javax.vecmath.Point3f ptX,
                             javax.vecmath.Point3f ptY,
                             short colix,
                             boolean doFill)

drawSurface

void drawSurface(MeshSurface meshSurface,
                 short colix)

outputSurface

protected void outputSurface(javax.vecmath.Point3f[] vertices,
                             javax.vecmath.Vector3f[] normals,
                             short[] colixes,
                             int[][] indices,
                             short[] polygonColixes,
                             int nVertices,
                             int nPolygons,
                             int nFaces,
                             java.util.BitSet bsPolygons,
                             int faceVertexMax,
                             short colix,
                             java.util.List<java.lang.Short> colorList,
                             java.util.Map<java.lang.Short,java.lang.Integer> htColixes,
                             javax.vecmath.Point3f offset)
Parameters:
vertices - generally unique vertices [0:nVertices)
normals - one per vertex
colixes - one per vertex, or null
indices - one per triangular or quad polygon; may have additional elements beyond vertex indices if faceVertexMax = 3 triangular if faceVertexMax == 3; 3 or 4 if face VertexMax = 4
polygonColixes - face-based colixes
nVertices - vertices[nVertices-1] is last vertex
nPolygons - indices[nPolygons - 1] is last polygon
nFaces - number of triangular faces required
bsPolygons - number of polygons (triangles or quads)
faceVertexMax - (3) triangles only, indices[][i] may have more elements (4) triangles and quads; indices[][i].length determines
colix - overall (solid) color index
colorList - list of unique color IDs
htColixes - map of color IDs to colorList
offset -

drawPixel

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

drawTextPixel

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

fillConeScreen

abstract void fillConeScreen(short colix,
                             byte endcap,
                             int screenDiameter,
                             javax.vecmath.Point3f screenBase,
                             javax.vecmath.Point3f screenTip,
                             boolean isBarb)

drawCylinder

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

fillCylinderScreenMad

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

fillCylinderScreen

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

fillEllipsoid

abstract void fillEllipsoid(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)

drawFilledCircle

void drawFilledCircle(short colixRing,
                      short colixFill,
                      int diameter,
                      int x,
                      int y,
                      int z)

fillSphere

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

fillTriangle

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

plotImage

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

plotText

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