_PovrayExporter
Date: 2019-10-22

org.jmol.export

## Class _PovrayExporter

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

-     public class _PovrayExporter
      extends __RayTracerExporter

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private boolean` | `haveMacros`

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

      `isSlabEnabled, minScreenDimension, wasPerspective`

    - ### 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
    `_PovrayExporter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private java.lang.String` | `color4(short colix)`
    `protected java.lang.String` | `finalizeOutput()`
    `private java.lang.String` | `getAuxiliaryFileData()`
    `private java.lang.String` | `getTriad(int[] i)`
    `protected java.lang.String` | `getTriad(javajs.util.T3 pt)`
    `protected void` | `output(javajs.util.T3 pt)`
    `protected void` | `outputCircle(int x, int y, int z, float radius, short colix, boolean doFill)`
    `protected void` | `outputCone(javajs.util.P3 screenBase, javajs.util.P3 screenTip, float radius, short colix, boolean isBarb)`
    `protected void` | `outputCylinder(javajs.util.P3 screenA, javajs.util.P3 screenB, float radius, short colix, boolean withCaps)`
    `protected void` | `outputCylinderConical(javajs.util.P3 screenA, javajs.util.P3 screenB, float radius1, float radius2, short colix)`
    `protected void` | `outputEllipsoid(javajs.util.P3 center, float radius, double[] coef, short colix)`
    `protected void` | `outputHeader()`
    `protected void` | `outputSphere(float x, float y, float z, float radius, short colix)`
    `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(int x, int y, int z, int argb)`
    `protected void` | `outputTriangle(javajs.util.T3 ptA, javajs.util.T3 ptB, javajs.util.T3 ptC, short colix)`
    `private void` | `writeMacros()`
    `private void` | `writeMacros2()`
    `private void` | `writeMacrosAtom()`
    `private void` | `writeMacrosBond()`
    `private void` | `writeMacrosFinish()`

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

      `drawAtom, drawCircle, drawCylinder, drawEllipse, drawPixel, drawTextPixel, fillConeScreen, fillConicalCylinder, fillCylinderScreen, fillCylinderScreenMad, fillEllipsoid, fillSphere, fillTriangle, finalizeOutput2, getScreenNormal, initOutput, initVars, outputVertex`

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

      `drawFilledCircle, drawSurface, fixScreenZ, getByteCount, getColorList, getConeMesh, getExportDate, getJmolPerspective, getRotationMatrix, getRotationMatrix, getTriadC, initializeOutput, opacityFractionalFromArgb, opacityFractionalFromColix, output, outputComment, outputFooter, outputJmolPerspective, outputVertices, plotImage, plotText, 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

    - #### haveMacros

          private boolean haveMacros

  - ### Constructor Detail

    - #### _PovrayExporter

          public _PovrayExporter()

  - ### Method Detail

    - #### finalizeOutput

          protected java.lang.String finalizeOutput()

      Overrides:
        `finalizeOutput` in class `___Exporter`

    - #### outputHeader

          protected void outputHeader()

      Specified by:
        `outputHeader` in class `___Exporter`

    - #### writeMacros

          private void writeMacros()

    - #### writeMacrosFinish

          private void writeMacrosFinish()

    - #### writeMacrosAtom

          private void writeMacrosAtom()

    - #### writeMacrosBond

          private void writeMacrosBond()

    - #### writeMacros2

          private void writeMacros2()

    - #### getTriad

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

      Overrides:
        `getTriad` in class `___Exporter`

    - #### getTriad

          private java.lang.String getTriad(int[] i)

    - #### color4

          private java.lang.String color4(short colix)

    - #### getAuxiliaryFileData

          private java.lang.String getAuxiliaryFileData()

    - #### output

          protected void output(javajs.util.T3 pt)

      Specified by:
        `output` in class `___Exporter`

    - #### outputCircle

          protected void outputCircle(int x,
                                      int y,
                                      int z,
                                      float radius,
                                      short colix,
                                      boolean doFill)

      Specified by:
        `outputCircle` in class `__RayTracerExporter`

    - #### outputCone

          protected void outputCone(javajs.util.P3 screenBase,
                                    javajs.util.P3 screenTip,
                                    float radius,
                                    short colix,
                                    boolean isBarb)

      Specified by:
        `outputCone` in class `__RayTracerExporter`

    - #### outputCylinder

          protected void outputCylinder(javajs.util.P3 screenA,
                                        javajs.util.P3 screenB,
                                        float radius,
                                        short colix,
                                        boolean withCaps)

      Specified by:
        `outputCylinder` in class `__RayTracerExporter`

    - #### outputCylinderConical

          protected void outputCylinderConical(javajs.util.P3 screenA,
                                               javajs.util.P3 screenB,
                                               float radius1,
                                               float radius2,
                                               short colix)

      Specified by:
        `outputCylinderConical` in class `__RayTracerExporter`

    - #### outputEllipsoid

          protected void outputEllipsoid(javajs.util.P3 center,
                                         float radius,
                                         double[] coef,
                                         short colix)

      Specified by:
        `outputEllipsoid` in class `__RayTracerExporter`

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

    - #### outputSphere

          protected void outputSphere(float x,
                                      float y,
                                      float z,
                                      float radius,
                                      short colix)

      Specified by:
        `outputSphere` in class `__RayTracerExporter`

    - #### outputTextPixel

          protected void outputTextPixel(int x,
                                         int y,
                                         int z,
                                         int argb)

      Specified by:
        `outputTextPixel` in class `__RayTracerExporter`

    - #### outputTriangle

          protected void outputTriangle(javajs.util.T3 ptA,
                                        javajs.util.T3 ptB,
                                        javajs.util.T3 ptC,
                                        short colix)

      Specified by:
        `outputTriangle` in class `__RayTracerExporter`