___Exporter
Date: 2019-10-22

org.jmol.export

## Class ___Exporter

- java.lang.Object
- - org.jmol.export.___Exporter

- Direct Known Subclasses:
    __CartesianExporter, __RayTracerExporter

      public abstract class ___Exporter
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected float` | `apertureAngle`
    `protected short` | `backgroundColix`
    `protected float` | `cameraDistance`
    `protected javajs.util.P3` | `cameraPosition`
    `protected javajs.util.P3` | `center`
    `protected java.lang.String` | `commandLineOptions`
    `protected java.lang.String` | `commentChar`
    `protected static float` | `degreesPerRadian`
    `protected int` | `depthZ`
    `protected JmolRendererInterface` | `export3D`
    `protected float` | `exportScale`
    `(package private) int` | `exportType`
    `protected java.lang.String` | `fileName`
    `protected javajs.util.P3` | `fixedRotationCenter`
    `protected GData` | `gdata`
    `private boolean` | `isWebGL`
    `protected javajs.util.V3` | `lightSource`
    `short` | `lineWidthMad`
    `private int` | `nImage`
    `private int` | `nText`
    `protected javajs.util.OC` | `out`
    `protected double` | `privateKey`
    `protected javajs.util.P3` | `referenceCenter`
    `protected float` | `scalePixelsPerAngstrom`
    `protected int` | `screenHeight`
    `protected int` | `screenWidth`
    `protected int` | `slabZ`
    `protected boolean` | `solidOnly`
    `private javajs.util.P3` | `tempC`
    `protected javajs.util.P3` | `tempP1`
    `protected javajs.util.P3` | `tempP2`
    `protected javajs.util.P3` | `tempP3`
    `protected javajs.util.V3` | `tempV1`
    `protected javajs.util.V3` | `tempV2`
    `protected TransformManager` | `tm`
    `protected Viewer` | `vwr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `___Exporter()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) abstract void` | `drawAtom(Atom atom, float radius)`
    `(package private) abstract void` | `drawCircle(int x, int y, int z, int diameter, short colix, boolean doFill)`
    `(package private) abstract void` | `drawCylinder(javajs.util.P3 atom1, javajs.util.P3 atom2, short colix1, short colix2, byte endcaps, int madBond, int bondOrder)`
    `(package private) abstract boolean` | `drawEllipse(javajs.util.P3 ptAtom, javajs.util.P3 ptX, javajs.util.P3 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, javajs.util.P3 screenBase, javajs.util.P3 screenTip, boolean isBarb)`
    `(package private) abstract void` | `fillCylinderScreen(short colix, byte endcaps, int screenDiameter, javajs.util.P3 screenA, javajs.util.P3 screenB, javajs.util.P3 ptA, javajs.util.P3 ptB, float radius)`
    `(package private) abstract void` | `fillCylinderScreenMad(short colix, byte endcaps, int diameter, javajs.util.P3 screenA, javajs.util.P3 screenB)`
    `(package private) abstract void` | `fillEllipsoid(javajs.util.P3 center, javajs.util.P3[] points, short colix, int x, int y, int z, int diameter, javajs.util.M3 toEllipsoidal, double[] coef, javajs.util.M4 deriv, javajs.util.P3[] octantPoints)`
    `(package private) abstract void` | `fillSphere(short colix, int diameter, javajs.util.P3 pt)`
    `protected abstract void` | `fillTriangle(short colix, javajs.util.T3 ptA0, javajs.util.T3 ptB0, javajs.util.T3 ptC0, boolean twoSided)`
    `protected java.lang.String` | `finalizeOutput()`
    `protected java.lang.String` | `finalizeOutput2()`
    `protected int` | `fixScreenZ(int z)`
    `protected int` | `getByteCount()`
    `protected javajs.util.Lst<java.lang.Short>` | `getColorList(int i00, short[] colixes, int nVertices, javajs.util.BS 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(javajs.util.P3 centerBase, javajs.util.M3 matRotateScale, short colix)`
    `protected java.lang.String` | `getExportDate()`
    `protected java.lang.String` | `getJmolPerspective()`
    `protected javajs.util.M3` | `getRotationMatrix(javajs.util.P3 pt1, javajs.util.P3 pt2, float radius)`
    `protected javajs.util.M3` | `getRotationMatrix(javajs.util.P3 pt1, javajs.util.P3 ptZ, float radius, javajs.util.P3 ptX, javajs.util.P3 ptY)`
    `protected java.lang.String` | `getTriad(javajs.util.T3 t)`
    `protected java.lang.String` | `getTriadC(javajs.util.T3 t)`
    `(package private) boolean` | `initializeOutput(Viewer vwr, double privateKey, GData gdata, java.util.Map<java.lang.String,java.lang.Object> params)`
    `protected boolean` | `initOutput(Viewer vwr, double privateKey, GData g3d, java.util.Map<java.lang.String,java.lang.Object> params)`
    `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(javajs.util.T3 pt)`
    `protected void` | `outputComment(java.lang.String comment)`
    `protected void` | `outputFooter()`
    `protected abstract void` | `outputHeader()`
    `protected void` | `outputJmolPerspective()`
    `protected void` | `outputSurface(javajs.util.T3[] vertices, javajs.util.T3[] normals, short[] colixes, int[][] indices, short[] polygonColixes, int nVertices, int nPolygons, int nTriangles, javajs.util.BS bsPolygons, int faceVertexMax, short colix, javajs.util.Lst<java.lang.Short> colorList, java.util.Map<java.lang.Short,java.lang.Integer> htColixes, javajs.util.P3 offset)`
    `protected void` | `outputVertex(javajs.util.T3 pt, javajs.util.T3 offset)`
    `protected void` | `outputVertices(javajs.util.T3[] vertices, int nVertices, javajs.util.T3 offset)`
    `(package private) void` | `plotImage(int x, int y, int z, java.lang.Object image, short bgcolix, int width, int height)`
    `(package private) void` | `plotText(int x, int y, int z, short colix, java.lang.String text, Font font3d)`
    `protected java.lang.String` | `rgbFractionalFromArgb(int argb)`
    `protected java.lang.String` | `rgbFractionalFromColix(short colix)`
    `protected static java.lang.String` | `round(double number)`
    `protected static java.lang.String` | `round(javajs.util.T3 pt)`
    `protected static void` | `setTempVertex(javajs.util.T3 pt, javajs.util.T3 offset, javajs.util.T3 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

    - #### solidOnly

          protected boolean solidOnly

    - #### vwr

          protected Viewer vwr

    - #### tm

          protected TransformManager tm

    - #### privateKey

          protected double privateKey

    - #### export3D

          protected JmolRendererInterface export3D

    - #### out

          protected javajs.util.OC out

    - #### fileName

          protected java.lang.String fileName

    - #### commandLineOptions

          protected java.lang.String commandLineOptions

    - #### gdata

          protected GData gdata

    - #### backgroundColix

          protected short backgroundColix

    - #### screenWidth

          protected int screenWidth

    - #### screenHeight

          protected int screenHeight

    - #### slabZ

          protected int slabZ

    - #### depthZ

          protected int depthZ

    - #### lightSource

          protected javajs.util.V3 lightSource

    - #### fixedRotationCenter

          protected javajs.util.P3 fixedRotationCenter

    - #### referenceCenter

          protected javajs.util.P3 referenceCenter

    - #### cameraPosition

          protected javajs.util.P3 cameraPosition

    - #### cameraDistance

          protected float cameraDistance

    - #### apertureAngle

          protected float apertureAngle

    - #### scalePixelsPerAngstrom

          protected float scalePixelsPerAngstrom

    - #### exportScale

          protected float exportScale

    - #### exportType

          int exportType

    - #### degreesPerRadian

          protected static final float degreesPerRadian

      See Also:
        Constant Field Values

    - #### tempP1

          protected final javajs.util.P3 tempP1

    - #### tempP2

          protected final javajs.util.P3 tempP2

    - #### tempP3

          protected final javajs.util.P3 tempP3

    - #### center

          protected final javajs.util.P3 center

    - #### tempV1

          protected final javajs.util.V3 tempV1

    - #### tempV2

          protected final javajs.util.V3 tempV2

    - #### isWebGL

          private boolean isWebGL

    - #### commentChar

          protected java.lang.String commentChar

    - #### tempC

          private final javajs.util.P3 tempC

    - #### nText

          private int nText

    - #### nImage

          private int nImage

    - #### lineWidthMad

          public short lineWidthMad

  - ### Constructor Detail

    - #### ___Exporter

          public ___Exporter()

  - ### Method Detail

    - #### initializeOutput

          boolean initializeOutput(Viewer vwr,
                                   double privateKey,
                                   GData gdata,
                                   java.util.Map<java.lang.String,java.lang.Object> params)

    - #### initOutput

          protected boolean initOutput(Viewer vwr,
                                       double privateKey,
                                       GData g3d,
                                       java.util.Map<java.lang.String,java.lang.Object> params)

    - #### outputHeader

          protected abstract void outputHeader()

    - #### output

          protected void output(java.lang.String data)

    - #### getByteCount

          protected int getByteCount()

    - #### outputComment

          protected void outputComment(java.lang.String comment)

    - #### setTempVertex

          protected static void setTempVertex(javajs.util.T3 pt,
                                              javajs.util.T3 offset,
                                              javajs.util.T3 ptTemp)

    - #### outputVertices

          protected void outputVertices(javajs.util.T3[] vertices,
                                        int nVertices,
                                        javajs.util.T3 offset)

    - #### outputVertex

          protected void outputVertex(javajs.util.T3 pt,
                                      javajs.util.T3 offset)

    - #### output

          protected abstract void output(javajs.util.T3 pt)

    - #### outputJmolPerspective

          protected void outputJmolPerspective()

    - #### getJmolPerspective

          protected java.lang.String getJmolPerspective()

    - #### outputFooter

          protected void outputFooter()

    - #### finalizeOutput

          protected java.lang.String finalizeOutput()

    - #### finalizeOutput2

          protected java.lang.String finalizeOutput2()

    - #### getExportDate

          protected java.lang.String getExportDate()

    - #### rgbFractionalFromColix

          protected java.lang.String rgbFractionalFromColix(short colix)

    - #### getTriadC

          protected java.lang.String getTriadC(javajs.util.T3 t)

    - #### getTriad

          protected java.lang.String getTriad(javajs.util.T3 t)

    - #### rgbFractionalFromArgb

          protected java.lang.String rgbFractionalFromArgb(int argb)

    - #### 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(javajs.util.T3 pt)

    - #### getColorList

          protected javajs.util.Lst<java.lang.Short> getColorList(int i00,
                                                                  short[] colixes,
                                                                  int nVertices,
                                                                  javajs.util.BS 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(javajs.util.P3 centerBase,
                                                   javajs.util.M3 matRotateScale,
                                                   short colix)

    - #### getRotationMatrix

          protected javajs.util.M3 getRotationMatrix(javajs.util.P3 pt1,
                                                     javajs.util.P3 pt2,
                                                     float radius)

    - #### getRotationMatrix

          protected javajs.util.M3 getRotationMatrix(javajs.util.P3 pt1,
                                                     javajs.util.P3 ptZ,
                                                     float radius,
                                                     javajs.util.P3 ptX,
                                                     javajs.util.P3 ptY)

    - #### drawAtom

          abstract void drawAtom(Atom atom,
                                 float radius)

    - #### drawCircle

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

    - #### drawEllipse

          abstract boolean drawEllipse(javajs.util.P3 ptAtom,
                                       javajs.util.P3 ptX,
                                       javajs.util.P3 ptY,
                                       short colix,
                                       boolean doFill)

    - #### drawSurface

          void drawSurface(MeshSurface meshSurface,
                           short colix)

    - #### outputSurface

          protected void outputSurface(javajs.util.T3[] vertices,
                                       javajs.util.T3[] normals,
                                       short[] colixes,
                                       int[][] indices,
                                       short[] polygonColixes,
                                       int nVertices,
                                       int nPolygons,
                                       int nTriangles,
                                       javajs.util.BS bsPolygons,
                                       int faceVertexMax,
                                       short colix,
                                       javajs.util.Lst<java.lang.Short> colorList,
                                       java.util.Map<java.lang.Short,java.lang.Integer> htColixes,
                                       javajs.util.P3 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
        `nTriangles` - 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,
                                       javajs.util.P3 screenBase,
                                       javajs.util.P3 screenTip,
                                       boolean isBarb)

    - #### drawCylinder

          abstract void drawCylinder(javajs.util.P3 atom1,
                                     javajs.util.P3 atom2,
                                     short colix1,
                                     short colix2,
                                     byte endcaps,
                                     int madBond,
                                     int bondOrder)

    - #### fillCylinderScreenMad

          abstract void fillCylinderScreenMad(short colix,
                                              byte endcaps,
                                              int diameter,
                                              javajs.util.P3 screenA,
                                              javajs.util.P3 screenB)

    - #### fillCylinderScreen

          abstract void fillCylinderScreen(short colix,
                                           byte endcaps,
                                           int screenDiameter,
                                           javajs.util.P3 screenA,
                                           javajs.util.P3 screenB,
                                           javajs.util.P3 ptA,
                                           javajs.util.P3 ptB,
                                           float radius)

    - #### fillEllipsoid

          abstract void fillEllipsoid(javajs.util.P3 center,
                                      javajs.util.P3[] points,
                                      short colix,
                                      int x,
                                      int y,
                                      int z,
                                      int diameter,
                                      javajs.util.M3 toEllipsoidal,
                                      double[] coef,
                                      javajs.util.M4 deriv,
                                      javajs.util.P3[] octantPoints)

    - #### drawFilledCircle

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

    - #### fillSphere

          abstract void fillSphere(short colix,
                                   int diameter,
                                   javajs.util.P3 pt)

    - #### fillTriangle

          protected abstract void fillTriangle(short colix,
                                               javajs.util.T3 ptA0,
                                               javajs.util.T3 ptB0,
                                               javajs.util.T3 ptC0,
                                               boolean twoSided)

    - #### fixScreenZ

          protected int fixScreenZ(int z)

    - #### plotImage

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

    - #### plotText

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