_IdtfExporter
Date: 2019-10-22

org.jmol.export

## Class _IdtfExporter

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

-     public class _IdtfExporter
      extends __CartesianExporter

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private javajs.util.M4` | `cylinderMatrix`
    `private boolean` | `haveCircle`
    `private boolean` | `haveCone`
    `private boolean` | `haveCylinder`
    `private boolean` | `haveCylinderIn`
    `private boolean` | `haveSphere`
    `private java.util.Map<java.lang.String,java.lang.Boolean>` | `htDefs`
    `private java.util.Map<java.lang.String,javajs.util.Lst<java.lang.String>>` | `htNodes`
    `private int` | `iObj`
    `private javajs.util.M4` | `m`
    `private javajs.util.SB` | `models`
    `private javajs.util.SB` | `modifiers`
    `private javajs.util.P3` | `ptMax`
    `private javajs.util.P3` | `ptMin`
    `private javajs.util.SB` | `resources`
    `private javajs.util.SB` | `sbTemp`
    `private int[][]` | `triangleFace`

    - ### Fields inherited from class org.jmol.export.__CartesianExporter

      `canCapCylinders, noColor, sphereMatrix, viewpoint`

    - ### Fields inherited from class org.jmol.export.___Exporter

      `apertureAngle, backgroundColix, cameraDistance, cameraPosition, center, commandLineOptions, commentChar, degreesPerRadian, depthZ, export3D, exportScale, exportType, fileName, fixedRotationCenter, gdata, lightSource, lineWidthMad, out, privateKey, referenceCenter, scalePixelsPerAngstrom, screenHeight, screenWidth, slabZ, solidOnly, tempP1, tempP2, tempP3, tempV1, tempV2, tm, vwr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `_IdtfExporter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private void` | `addColix(short colix, boolean haveColors)`
    `private void` | `addMeshData(java.lang.String key, int nFaces, int nCoord, int nNormals, int nColors, javajs.util.SB sbFaceCoordIndices, javajs.util.SB sbFaceNormalIndices, javajs.util.SB sbColorIndices, javajs.util.SB sbCoords, javajs.util.SB sbNormals, javajs.util.SB sbColors)`
    `private void` | `addShader(java.lang.String key, short colix)`
    `private void` | `checkPoint(javajs.util.T3 pt)`
    `protected java.lang.String` | `finalizeOutput()`
    `private java.lang.String` | `getAuxiliaryFileData()`
    `private java.lang.String` | `getCircleResource()`
    `private java.lang.String` | `getConeResource()`
    `private java.lang.String` | `getCylinderResource(boolean inSide)`
    `private java.lang.String` | `getMeshData(java.lang.String type, int[][] indices, javajs.util.T3[] vertexes, javajs.util.T3[] normals)`
    `private void` | `getMeshHeader(java.lang.String type, int nFaces, int vertexCount, int normalCount, int colorCount, javajs.util.SB sb)`
    `private java.lang.String` | `getParentItem(java.lang.String name, javajs.util.M4 m)`
    `private java.lang.String` | `getSphereResource()`
    `private java.lang.String` | `getTriangleResource(java.lang.String key, javajs.util.T3 pt1, javajs.util.T3 pt2, javajs.util.T3 pt3)`
    `protected void` | `output(javajs.util.T3 pt)`
    `private void` | `output(javajs.util.T3 pt, javajs.util.SB sb, boolean checkpt)`
    `protected void` | `outputCircle(javajs.util.P3 pt1, javajs.util.P3 pt2, float radius, short colix, boolean doFill)`
    `private void` | `outputCircle(javajs.util.P3 ptCenter, javajs.util.P3 ptPerp, short colix, float radius)`
    `protected void` | `outputCone(javajs.util.P3 ptBase, javajs.util.P3 ptTip, float radius, short colix)`
    `protected boolean` | `outputCylinder(javajs.util.P3 ptCenter, javajs.util.P3 pt1, javajs.util.P3 pt2, short colix, byte endcaps, float radius, javajs.util.P3 ptX, javajs.util.P3 ptY, boolean checkRadius)`
    `private boolean` | `outputEllipse(javajs.util.P3 ptCenter, javajs.util.P3 ptZ, javajs.util.P3 ptX, javajs.util.P3 ptY, short colix)`
    `protected void` | `outputEllipsoid(javajs.util.P3 center, javajs.util.P3[] points, short colix)`
    `private void` | `outputEllipsoid(javajs.util.T3 center, javajs.util.M4 sphereMatrix, short colix)`
    `protected void` | `outputFace(int[] face, int[] map, int faceVertexMax)`
    `protected void` | `outputFooter()`
    `protected void` | `outputHeader()`
    `private void` | `outputNodes()`
    `protected void` | `outputSphere(javajs.util.P3 center, float radius, short colix, boolean checkRadius)`
    `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` | `outputTextPixel(javajs.util.P3 pt, int argb)`
    `protected void` | `outputTriangle(javajs.util.T3 pt1, javajs.util.T3 pt2, javajs.util.T3 pt3, short colix)`

    - ### Methods inherited from class org.jmol.export.__CartesianExporter

      `drawAtom, drawCircle, drawCylinder, drawEllipse, drawPixel, drawTextPixel, fillConeScreen, fillCylinderScreen, fillCylinderScreenMad, fillEllipsoid, fillSphere, fillTriangle, getCameraPosition, getCoordinateMap, getModelCenter, getNormalMap, outputIndices, outputSolidPlate, plotImage, plotText, setSphereMatrix`

    - ### Methods inherited from class org.jmol.export.___Exporter

      `drawFilledCircle, drawSurface, finalizeOutput2, fixScreenZ, getByteCount, getColorList, getConeMesh, getExportDate, getJmolPerspective, getRotationMatrix, getRotationMatrix, getTriad, getTriadC, initializeOutput, initOutput, opacityFractionalFromArgb, opacityFractionalFromColix, output, outputComment, outputJmolPerspective, outputVertex, outputVertices, rgbFractionalFromArgb, rgbFractionalFromColix, round, round, setTempVertex, translucencyFractionalFromColix`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### haveSphere

          private boolean haveSphere

    - #### haveCylinder

          private boolean haveCylinder

    - #### haveCylinderIn

          private boolean haveCylinderIn

    - #### haveCone

          private boolean haveCone

    - #### haveCircle

          private boolean haveCircle

    - #### ptMin

          private javajs.util.P3 ptMin

    - #### ptMax

          private javajs.util.P3 ptMax

    - #### iObj

          private int iObj

    - #### htDefs

          private java.util.Map<java.lang.String,java.lang.Boolean> htDefs

    - #### m

          private final javajs.util.M4 m

    - #### models

          private final javajs.util.SB models

    - #### resources

          private final javajs.util.SB resources

    - #### modifiers

          private final javajs.util.SB modifiers

    - #### htNodes

          private java.util.Map<java.lang.String,javajs.util.Lst<java.lang.String>> htNodes

    - #### cylinderMatrix

          private javajs.util.M4 cylinderMatrix

    - #### sbTemp

          private javajs.util.SB sbTemp

    - #### triangleFace

          private int[][] triangleFace

  - ### Constructor Detail

    - #### _IdtfExporter

          public _IdtfExporter()

  - ### Method Detail

    - #### output

          protected void output(javajs.util.T3 pt)

      Specified by:
        `output` in class `___Exporter`

    - #### output

          private void output(javajs.util.T3 pt,
                              javajs.util.SB sb,
                              boolean checkpt)

    - #### checkPoint

          private void checkPoint(javajs.util.T3 pt)

    - #### outputHeader

          protected void outputHeader()

      Specified by:
        `outputHeader` in class `___Exporter`

    - #### finalizeOutput

          protected java.lang.String finalizeOutput()

      Overrides:
        `finalizeOutput` in class `___Exporter`

    - #### getAuxiliaryFileData

          private java.lang.String getAuxiliaryFileData()

    - #### getParentItem

          private java.lang.String getParentItem(java.lang.String name,
                                                 javajs.util.M4 m)

    - #### addColix

          private void addColix(short colix,
                                boolean haveColors)

    - #### addShader

          private void addShader(java.lang.String key,
                                 short colix)

    - #### outputFooter

          protected void outputFooter()

      Overrides:
        `outputFooter` in class `___Exporter`

    - #### outputNodes

          private void outputNodes()

    - #### outputEllipsoid

          protected void outputEllipsoid(javajs.util.P3 center,
                                         javajs.util.P3[] points,
                                         short colix)

      Specified by:
        `outputEllipsoid` in class `__CartesianExporter`

    - #### outputEllipsoid

          private void outputEllipsoid(javajs.util.T3 center,
                                       javajs.util.M4 sphereMatrix,
                                       short colix)

    - #### getSphereResource

          private java.lang.String getSphereResource()

    - #### getMeshData

          private java.lang.String getMeshData(java.lang.String type,
                                               int[][] indices,
                                               javajs.util.T3[] vertexes,
                                               javajs.util.T3[] normals)

    - #### getMeshHeader

          private void getMeshHeader(java.lang.String type,
                                     int nFaces,
                                     int vertexCount,
                                     int normalCount,
                                     int colorCount,
                                     javajs.util.SB sb)

    - #### outputCylinder

          protected boolean outputCylinder(javajs.util.P3 ptCenter,
                                           javajs.util.P3 pt1,
                                           javajs.util.P3 pt2,
                                           short colix,
                                           byte endcaps,
                                           float radius,
                                           javajs.util.P3 ptX,
                                           javajs.util.P3 ptY,
                                           boolean checkRadius)

      Specified by:
        `outputCylinder` in class `__CartesianExporter`

    - #### outputCircle

          protected void outputCircle(javajs.util.P3 pt1,
                                      javajs.util.P3 pt2,
                                      float radius,
                                      short colix,
                                      boolean doFill)

      Specified by:
        `outputCircle` in class `__CartesianExporter`

    - #### outputEllipse

          private boolean outputEllipse(javajs.util.P3 ptCenter,
                                        javajs.util.P3 ptZ,
                                        javajs.util.P3 ptX,
                                        javajs.util.P3 ptY,
                                        short colix)

    - #### outputCircle

          private void outputCircle(javajs.util.P3 ptCenter,
                                    javajs.util.P3 ptPerp,
                                    short colix,
                                    float radius)

    - #### getCylinderResource

          private java.lang.String getCylinderResource(boolean inSide)

    - #### outputFace

          protected void outputFace(int[] face,
                                    int[] map,
                                    int faceVertexMax)

      Specified by:
        `outputFace` in class `__CartesianExporter`

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

      Overrides:
        `outputSurface` in class `___Exporter`
      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

    - #### addMeshData

          private void addMeshData(java.lang.String key,
                                   int nFaces,
                                   int nCoord,
                                   int nNormals,
                                   int nColors,
                                   javajs.util.SB sbFaceCoordIndices,
                                   javajs.util.SB sbFaceNormalIndices,
                                   javajs.util.SB sbColorIndices,
                                   javajs.util.SB sbCoords,
                                   javajs.util.SB sbNormals,
                                   javajs.util.SB sbColors)

    - #### outputCone

          protected void outputCone(javajs.util.P3 ptBase,
                                    javajs.util.P3 ptTip,
                                    float radius,
                                    short colix)

      Specified by:
        `outputCone` in class `__CartesianExporter`

    - #### getConeResource

          private java.lang.String getConeResource()

    - #### getCircleResource

          private java.lang.String getCircleResource()

    - #### outputSphere

          protected void outputSphere(javajs.util.P3 center,
                                      float radius,
                                      short colix,
                                      boolean checkRadius)

      Specified by:
        `outputSphere` in class `__CartesianExporter`

    - #### outputTextPixel

          protected void outputTextPixel(javajs.util.P3 pt,
                                         int argb)

      Specified by:
        `outputTextPixel` in class `__CartesianExporter`

    - #### outputTriangle

          protected void outputTriangle(javajs.util.T3 pt1,
                                        javajs.util.T3 pt2,
                                        javajs.util.T3 pt3,
                                        short colix)

      Specified by:
        `outputTriangle` in class `__CartesianExporter`

    - #### getTriangleResource

          private java.lang.String getTriangleResource(java.lang.String key,
                                                       javajs.util.T3 pt1,
                                                       javajs.util.T3 pt2,
                                                       javajs.util.T3 pt3)