org.jmol.export
Class _IdtfExporter

java.lang.Object
  extended by org.jmol.export._Exporter
      extended by org.jmol.export._IdtfExporter

public class _IdtfExporter
extends _Exporter


Field Summary
private  javax.vecmath.Matrix4f cylinderMatrix
           
private  boolean haveCircle
           
private  boolean haveCone
           
private  boolean haveCylinder
           
private  boolean haveSphere
           
private  java.util.Hashtable htDefs
           
private  java.util.Hashtable htNodes
           
private  int iObj
           
private  javax.vecmath.Matrix4f m
           
private  java.lang.StringBuffer models
           
private  java.lang.StringBuffer modifiers
           
private  javax.vecmath.Point3f pt2
           
private  javax.vecmath.Point3f ptAtom
           
private  javax.vecmath.Point3f ptMax
           
private  javax.vecmath.Point3f ptMin
           
private  java.lang.StringBuffer resources
           
private  javax.vecmath.Matrix4f sphereMatrix
           
private  javax.vecmath.AxisAngle4f viewpoint
           
 
Fields inherited from class org.jmol.export._Exporter
bw, canDoTriangles, center, commandLineOptions, degreesPerRadian, depthZ, fileName, g3d, isCartesianExport, isToFile, jmolRenderer, output, pt, screenHeight, screenWidth, slabZ, tempA, tempP1, tempP2, tempP3, tempV1, tempV2, tempV3, use2dBondOrderCalculation, viewer
 
Constructor Summary
_IdtfExporter()
           
 
Method Summary
private  void addColix(short colix, boolean haveColors)
           
private  void addMeshData(java.lang.String key, int nFaces, int nCoord, int nNormals, int nColors, java.lang.StringBuffer sbFaceCoordIndices, java.lang.StringBuffer sbFaceNormalIndices, java.lang.StringBuffer sbColorIndices, java.lang.StringBuffer sbCoords, java.lang.StringBuffer sbNormals, java.lang.StringBuffer sbColors)
           
private  void addShader(java.lang.String key, short colix)
           
private  void checkPoint(javax.vecmath.Tuple3f pt)
           
 void drawCircleCentered(short colix, int diameter, int x, int y, int z, boolean doFill)
           
 void drawPixel(short colix, int x, int y, int z)
           
 void drawString(short colix, java.lang.String str, Font3D font3d, int xBaseline, int yBaseline, int z, int zSlab)
           
 void drawTextPixel(int argb, int x, int y, int z)
           
 void endShapeBuffer()
           
 void fillCone(short colix, byte endcap, int diameter, javax.vecmath.Point3f screenBase, javax.vecmath.Point3f screenTip)
           
 void fillCylinder(javax.vecmath.Point3f ptA, javax.vecmath.Point3f ptB, short colix1, short colix2, byte endcaps, int diameter, int bondOrder)
           
 void fillCylinder(short colix, byte endcaps, int diameter, javax.vecmath.Point3f screenA, javax.vecmath.Point3f screenB)
           
 void fillScreenedCircleCentered(short colix, int diameter, int x, int y, int z)
           
 void fillSphereCentered(short colix, int diameter, javax.vecmath.Point3f pt)
           
 void fillTriangle(short colix, javax.vecmath.Point3f ptA, javax.vecmath.Point3f ptB, javax.vecmath.Point3f ptC)
           
private  java.lang.Object getCircleResource()
           
private  java.lang.Object getConeResource()
           
private  java.lang.Object getCylinderResource()
           
 void getFooter()
           
 void getHeader()
           
private  java.lang.String getMeshData(java.lang.String type, int[] faces, javax.vecmath.Tuple3f[] vertexes, javax.vecmath.Tuple3f[] normals)
           
private  void getMeshHeader(java.lang.String type, int nFaces, int vertexCount, int normalCount, int colorCount, java.lang.StringBuffer sb)
           
private  java.lang.String getParentItem(java.lang.String name, javax.vecmath.Matrix4f m)
           
private  javax.vecmath.Matrix3f getRotationMatrix(javax.vecmath.Point3f pt1, javax.vecmath.Point3f pt2, float radius)
           
private  java.lang.String getSphereResource()
           
private  java.lang.Object getTriangleResource(java.lang.String key, javax.vecmath.Point3f pt1, javax.vecmath.Point3f pt2, javax.vecmath.Point3f pt3)
           
private  void output(javax.vecmath.Tuple3f pt, java.lang.StringBuffer sb, boolean checkpt)
           
private  void outputCircle(javax.vecmath.Point3f ptCenter, javax.vecmath.Point3f ptPerp, short colix, int madBond)
           
private  void outputCylinder(javax.vecmath.Point3f pt1, javax.vecmath.Point3f pt2, short colix, byte endcaps, int madBond)
           
private  void outputEllipsoid(javax.vecmath.Point3f center, float rx, float ry, float rz, javax.vecmath.AxisAngle4f a, short colix)
           
private  void outputNodes()
           
private  void outputSphere(javax.vecmath.Point3f center, float radius, short colix)
           
 void plotImage(int x, int y, int z, java.awt.Image image, short bgcolix, int width, int height)
           
 void plotText(int x, int y, int z, short colix, java.lang.String text, Font3D font3d)
           
 void renderAtom(Atom atom, short colix)
           
(package private)  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)
           
 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)
           
 void renderText(Text t)
           
 void startShapeBuffer(int iShape)
           
 
Methods inherited from class org.jmol.export._Exporter
adjustViewpointPosition, finalizeOutput, getAxisAngle, getColorList, getExportDate, getFieldOfView, getRotation, getViewpointPosition, initializeOutput, opacityFractionalFromColix, rgbFractionalFromArgb, rgbFractionalFromColix, rgbFromColix, round, setRenderer, translucencyFractionalFromColix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

viewpoint

private javax.vecmath.AxisAngle4f viewpoint

haveSphere

private boolean haveSphere

haveCylinder

private boolean haveCylinder

haveCone

private boolean haveCone

haveCircle

private boolean haveCircle

ptMin

private javax.vecmath.Point3f ptMin

ptMax

private javax.vecmath.Point3f ptMax

iObj

private int iObj

htDefs

private java.util.Hashtable htDefs

ptAtom

private final javax.vecmath.Point3f ptAtom

m

private final javax.vecmath.Matrix4f m

models

private final java.lang.StringBuffer models

resources

private final java.lang.StringBuffer resources

modifiers

private final java.lang.StringBuffer modifiers

htNodes

private java.util.Hashtable htNodes

sphereMatrix

private javax.vecmath.Matrix4f sphereMatrix

cylinderMatrix

private javax.vecmath.Matrix4f cylinderMatrix

pt2

private final javax.vecmath.Point3f pt2
Constructor Detail

_IdtfExporter

public _IdtfExporter()
Method Detail

output

private void output(javax.vecmath.Tuple3f pt,
                    java.lang.StringBuffer sb,
                    boolean checkpt)

checkPoint

private void checkPoint(javax.vecmath.Tuple3f pt)

getHeader

public void getHeader()
Specified by:
getHeader in class _Exporter

getParentItem

private java.lang.String getParentItem(java.lang.String name,
                                       javax.vecmath.Matrix4f m)

addColix

private void addColix(short colix,
                      boolean haveColors)

addShader

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

getFooter

public void getFooter()
Specified by:
getFooter in class _Exporter

outputNodes

private void outputNodes()

renderAtom

public void renderAtom(Atom atom,
                       short colix)
Specified by:
renderAtom in class _Exporter

drawPixel

public void drawPixel(short colix,
                      int x,
                      int y,
                      int z)
Specified by:
drawPixel in class _Exporter

fillSphereCentered

public void fillSphereCentered(short colix,
                               int diameter,
                               javax.vecmath.Point3f pt)
Specified by:
fillSphereCentered in class _Exporter

outputSphere

private void outputSphere(javax.vecmath.Point3f center,
                          float radius,
                          short colix)

outputEllipsoid

private void outputEllipsoid(javax.vecmath.Point3f center,
                             float rx,
                             float ry,
                             float rz,
                             javax.vecmath.AxisAngle4f a,
                             short colix)

getSphereResource

private java.lang.String getSphereResource()

getMeshData

private java.lang.String getMeshData(java.lang.String type,
                                     int[] faces,
                                     javax.vecmath.Tuple3f[] vertexes,
                                     javax.vecmath.Tuple3f[] normals)

getMeshHeader

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

fillCylinder

public void fillCylinder(javax.vecmath.Point3f ptA,
                         javax.vecmath.Point3f ptB,
                         short colix1,
                         short colix2,
                         byte endcaps,
                         int diameter,
                         int bondOrder)
Specified by:
fillCylinder in class _Exporter

outputCylinder

private void outputCylinder(javax.vecmath.Point3f pt1,
                            javax.vecmath.Point3f pt2,
                            short colix,
                            byte endcaps,
                            int madBond)

outputCircle

private void outputCircle(javax.vecmath.Point3f ptCenter,
                          javax.vecmath.Point3f ptPerp,
                          short colix,
                          int madBond)

getRotationMatrix

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

getCylinderResource

private java.lang.Object getCylinderResource()

renderIsosurface

public 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)
Specified by:
renderIsosurface in class _Exporter

addMeshData

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

fillCone

public void fillCone(short colix,
                     byte endcap,
                     int diameter,
                     javax.vecmath.Point3f screenBase,
                     javax.vecmath.Point3f screenTip)
Specified by:
fillCone in class _Exporter

getConeResource

private java.lang.Object getConeResource()

getCircleResource

private java.lang.Object getCircleResource()

fillCylinder

public void fillCylinder(short colix,
                         byte endcaps,
                         int diameter,
                         javax.vecmath.Point3f screenA,
                         javax.vecmath.Point3f screenB)
Specified by:
fillCylinder in class _Exporter

fillTriangle

public void fillTriangle(short colix,
                         javax.vecmath.Point3f ptA,
                         javax.vecmath.Point3f ptB,
                         javax.vecmath.Point3f ptC)
Specified by:
fillTriangle in class _Exporter

getTriangleResource

private java.lang.Object getTriangleResource(java.lang.String key,
                                             javax.vecmath.Point3f pt1,
                                             javax.vecmath.Point3f pt2,
                                             javax.vecmath.Point3f pt3)

plotText

public void plotText(int x,
                     int y,
                     int z,
                     short colix,
                     java.lang.String text,
                     Font3D font3d)
Specified by:
plotText in class _Exporter

startShapeBuffer

public void startShapeBuffer(int iShape)
Specified by:
startShapeBuffer in class _Exporter

endShapeBuffer

public void endShapeBuffer()
Specified by:
endShapeBuffer in class _Exporter

renderText

public void renderText(Text t)
Specified by:
renderText in class _Exporter

drawString

public void drawString(short colix,
                       java.lang.String str,
                       Font3D font3d,
                       int xBaseline,
                       int yBaseline,
                       int z,
                       int zSlab)
Specified by:
drawString in class _Exporter

drawCircleCentered

public void drawCircleCentered(short colix,
                               int diameter,
                               int x,
                               int y,
                               int z,
                               boolean doFill)
Specified by:
drawCircleCentered in class _Exporter

fillScreenedCircleCentered

public void fillScreenedCircleCentered(short colix,
                                       int diameter,
                                       int x,
                                       int y,
                                       int z)
Specified by:
fillScreenedCircleCentered in class _Exporter

drawTextPixel

public void drawTextPixel(int argb,
                          int x,
                          int y,
                          int z)
Specified by:
drawTextPixel in class _Exporter

plotImage

public void plotImage(int x,
                      int y,
                      int z,
                      java.awt.Image image,
                      short bgcolix,
                      int width,
                      int height)
Specified by:
plotImage in class _Exporter

renderEllipsoid

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)
Specified by:
renderEllipsoid in class _Exporter