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
| Fields inherited from class org.jmol.export.___Exporter |
aperatureAngle, backgroundColix, bw, cameraDistance, cameraPosition, center, commandLineOptions, commentChar, degreesPerRadian, depthZ, exportType, fileName, fixedRotationCenter, g3d, isToFile, jmolRenderer, lightSource, lineWidthMad, nBytes, output, privateKey, referenceCenter, scalePixelsPerAngstrom, screenHeight, screenWidth, slabZ, tempA, tempP1, tempP2, tempP3, tempV1, tempV2, tempV3, viewer |
|
Method Summary |
private void |
addColix(short colix,
boolean haveColors)
|
private void |
addMeshData(String key,
int nFaces,
int nCoord,
int nNormals,
int nColors,
StringBuffer sbFaceCoordIndices,
StringBuffer sbFaceNormalIndices,
StringBuffer sbColorIndices,
StringBuffer sbCoords,
StringBuffer sbNormals,
StringBuffer sbColors)
|
private void |
addShader(String key,
short colix)
|
private void |
checkPoint(Tuple3f pt)
|
(package private) String |
finalizeOutput()
|
private String |
getAuxiliaryFileData()
|
private String |
getCircleResource()
|
private String |
getConeResource()
|
private String |
getCylinderResource(boolean inSide)
|
private String |
getMeshData(String type,
int[][] indices,
Tuple3f[] vertexes,
Tuple3f[] normals)
|
private void |
getMeshHeader(String type,
int nFaces,
int vertexCount,
int normalCount,
int colorCount,
StringBuffer sb)
|
private String |
getParentItem(String name,
Matrix4f m)
|
private String |
getSphereResource()
|
private String |
getTriangleResource(String key,
Point3f pt1,
Point3f pt2,
Point3f pt3)
|
protected void |
output(Tuple3f pt)
|
private void |
output(Tuple3f pt,
StringBuffer sb,
boolean checkpt)
|
protected void |
outputCircle(Point3f pt1,
Point3f pt2,
float radius,
short colix,
boolean doFill)
|
private void |
outputCircle(Point3f ptCenter,
Point3f ptPerp,
short colix,
float radius)
|
protected void |
outputCone(Point3f ptBase,
Point3f ptTip,
float radius,
short colix)
|
protected boolean |
outputCylinder(Point3f ptCenter,
Point3f pt1,
Point3f pt2,
short colix,
byte endcaps,
float radius,
Point3f ptX,
Point3f ptY,
boolean checkRadius)
|
private boolean |
outputEllipse(Point3f ptCenter,
Point3f ptZ,
Point3f ptX,
Point3f ptY,
short colix)
|
private void |
outputEllipsoid(Point3f center,
Matrix4f sphereMatrix,
short colix)
|
protected void |
outputEllipsoid(Point3f center,
Point3f[] points,
short colix)
|
protected void |
outputFace(int[] face,
int[] map,
int faceVertexMax)
|
protected void |
outputFooter()
|
protected void |
outputHeader()
|
private void |
outputNodes()
|
protected void |
outputSphere(Point3f center,
float radius,
short colix,
boolean checkRadius)
|
protected void |
outputSurface(Point3f[] vertices,
Vector3f[] normals,
short[] colixes,
int[][] indices,
short[] polygonColixes,
int nVertices,
int nPolygons,
int nFaces,
BitSet bsPolygons,
int faceVertexMax,
short colix,
List<Short> colorList,
Map<Short,Integer> htColixes,
Point3f offset)
|
protected void |
outputTextPixel(Point3f pt,
int argb)
|
protected void |
outputTriangle(Point3f pt1,
Point3f pt2,
Point3f 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, plotImage, plotText, setSphereMatrix |
| Methods inherited from class org.jmol.export.___Exporter |
drawFilledCircle, drawSurface, getColorList, getConeMesh, getExportDate, getJmolPerspective, getRotationMatrix, getRotationMatrix, initializeOutput, opacityFractionalFromArgb, opacityFractionalFromColix, output, outputComment, outputJmolPerspective, outputVertex, outputVertices, rgbFractionalFromArgb, rgbFractionalFromColix, round, round, setRenderer, setTempVertex, translucencyFractionalFromColix |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
haveSphere
private boolean haveSphere
haveCylinder
private boolean haveCylinder
haveCylinderIn
private boolean haveCylinderIn
haveCone
private boolean haveCone
haveCircle
private boolean haveCircle
ptMin
private Point3f ptMin
ptMax
private Point3f ptMax
iObj
private int iObj
htDefs
private Map<String,Boolean> htDefs
m
private final Matrix4f m
models
private final StringBuffer models
resources
private final StringBuffer resources
modifiers
private final StringBuffer modifiers
htNodes
private Map<String,List<String>> htNodes
cylinderMatrix
private Matrix4f cylinderMatrix
sbTemp
private StringBuffer sbTemp
triangleFace
private int[][] triangleFace
_IdtfExporter
public _IdtfExporter()
output
protected void output(Tuple3f pt)
- Specified by:
output in class ___Exporter
output
private void output(Tuple3f pt,
StringBuffer sb,
boolean checkpt)
checkPoint
private void checkPoint(Tuple3f pt)
outputHeader
protected void outputHeader()
- Specified by:
outputHeader in class ___Exporter
finalizeOutput
String finalizeOutput()
- Overrides:
finalizeOutput in class ___Exporter
getAuxiliaryFileData
private String getAuxiliaryFileData()
getParentItem
private String getParentItem(String name,
Matrix4f m)
addColix
private void addColix(short colix,
boolean haveColors)
addShader
private void addShader(String key,
short colix)
outputFooter
protected void outputFooter()
- Overrides:
outputFooter in class ___Exporter
outputNodes
private void outputNodes()
outputEllipsoid
protected void outputEllipsoid(Point3f center,
Point3f[] points,
short colix)
- Specified by:
outputEllipsoid in class __CartesianExporter
outputEllipsoid
private void outputEllipsoid(Point3f center,
Matrix4f sphereMatrix,
short colix)
getSphereResource
private String getSphereResource()
getMeshData
private String getMeshData(String type,
int[][] indices,
Tuple3f[] vertexes,
Tuple3f[] normals)
getMeshHeader
private void getMeshHeader(String type,
int nFaces,
int vertexCount,
int normalCount,
int colorCount,
StringBuffer sb)
outputCylinder
protected boolean outputCylinder(Point3f ptCenter,
Point3f pt1,
Point3f pt2,
short colix,
byte endcaps,
float radius,
Point3f ptX,
Point3f ptY,
boolean checkRadius)
- Specified by:
outputCylinder in class __CartesianExporter
outputCircle
protected void outputCircle(Point3f pt1,
Point3f pt2,
float radius,
short colix,
boolean doFill)
- Specified by:
outputCircle in class __CartesianExporter
outputEllipse
private boolean outputEllipse(Point3f ptCenter,
Point3f ptZ,
Point3f ptX,
Point3f ptY,
short colix)
outputCircle
private void outputCircle(Point3f ptCenter,
Point3f ptPerp,
short colix,
float radius)
getCylinderResource
private String getCylinderResource(boolean inSide)
outputFace
protected void outputFace(int[] face,
int[] map,
int faceVertexMax)
- Specified by:
outputFace in class __CartesianExporter
outputSurface
protected void outputSurface(Point3f[] vertices,
Vector3f[] normals,
short[] colixes,
int[][] indices,
short[] polygonColixes,
int nVertices,
int nPolygons,
int nFaces,
BitSet bsPolygons,
int faceVertexMax,
short colix,
List<Short> colorList,
Map<Short,Integer> htColixes,
Point3f offset)
- Overrides:
outputSurface in class ___Exporter
- Parameters:
vertices - generally unique vertices [0:nVertices)normals - one per vertexcolixes - one per vertex, or nullindices - 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 = 4polygonColixes - face-based colixesnVertices - vertices[nVertices-1] is last vertexnPolygons - indices[nPolygons - 1] is last polygonnFaces - number of triangular faces requiredbsPolygons - number of polygons (triangles or quads)faceVertexMax - (3) triangles only, indices[][i] may have more elements
(4) triangles and quads; indices[][i].length determinescolix - overall (solid) color indexcolorList - list of unique color IDshtColixes - map of color IDs to colorList
addMeshData
private void addMeshData(String key,
int nFaces,
int nCoord,
int nNormals,
int nColors,
StringBuffer sbFaceCoordIndices,
StringBuffer sbFaceNormalIndices,
StringBuffer sbColorIndices,
StringBuffer sbCoords,
StringBuffer sbNormals,
StringBuffer sbColors)
outputCone
protected void outputCone(Point3f ptBase,
Point3f ptTip,
float radius,
short colix)
- Specified by:
outputCone in class __CartesianExporter
getConeResource
private String getConeResource()
getCircleResource
private String getCircleResource()
outputSphere
protected void outputSphere(Point3f center,
float radius,
short colix,
boolean checkRadius)
- Specified by:
outputSphere in class __CartesianExporter
outputTextPixel
protected void outputTextPixel(Point3f pt,
int argb)
- Specified by:
outputTextPixel in class __CartesianExporter
outputTriangle
protected void outputTriangle(Point3f pt1,
Point3f pt2,
Point3f pt3,
short colix)
- Specified by:
outputTriangle in class __CartesianExporter
getTriangleResource
private String getTriangleResource(String key,
Point3f pt1,
Point3f pt2,
Point3f pt3)