Package org.jmol.export
Class _ObjExporter
java.lang.Object
org.jmol.export.___Exporter
org.jmol.export.__CartesianExporter
org.jmol.export._ObjExporter
Class to export Wavefront OBJ files. The format is described at
http://en.wikipedia.org/wiki/Wavefront_.obj_file
and
http://www.martinreddy.net/gfx/3d/OBJ.spec
At least two files are produced: the object in the .obj file and the materials in the .mtl file. An additional image file is produced for each surface. All should be kept in the same directory.
The exporter has been tested for ball and stick models, but not for:
http://en.wikipedia.org/wiki/Wavefront_.obj_file
and
http://www.martinreddy.net/gfx/3d/OBJ.spec
At least two files are produced: the object in the .obj file and the materials in the .mtl file. An additional image file is produced for each surface. All should be kept in the same directory.
The exporter has been tested for ball and stick models, but not for:
- outputFace (not used)
- outputCone
- outputTextPixel
- outputTriangle
- outputSurface (only some possibilities tested)
- Author:
- ken@kenevans.net
-
Field Summary
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, fileName, fixedRotationCenter, gdata, lightSource, lineWidthMad, out, privateKey, referenceCenter, scalePixelsPerAngstrom, screenHeight, screenWidth, slabZ, solidOnly, tempP1, tempP2, tempP3, tempV1, tempV2, tm, vwr
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
debugPrint
(String string) Debug print utility.protected void
drawSurface
(MeshSurface meshSurface, short colix) protected String
protected void
protected void
outputCircle
(P3 pt1, P3 pt2, float radius, short colix, boolean doFill) protected void
outputCone
(P3 ptBase, P3 ptTip, float radius, short colix) protected boolean
outputCylinder
(P3 ptCenter, P3 pt1, P3 pt2, short colix, byte endcaps, float radius, P3 ptX, P3 ptY, boolean checkRadius) protected void
outputEllipsoid
(P3 center, P3[] points, short colix) protected void
outputFace
(int[] face, int[] map, int faceVertexMax) protected void
protected void
outputSphere
(P3 center, float radius, short colix, boolean checkRadius) protected void
outputTextPixel
(P3 pt, int argb) protected void
outputTriangle
(T3 pt1, T3 pt2, T3 pt3, short colix) Methods inherited from class org.jmol.export.__CartesianExporter
fillTriangle, getCameraPosition, getCoordinateMap, getModelCenter, getNormalMap, outputIndices, outputSolidPlate, setSphereMatrix
Methods inherited from class org.jmol.export.___Exporter
finalizeOutput2, fixScreenZ, getByteCount, getColorList, getConeMesh, getExportDate, getJmolPerspective, getRotationMatrix, getRotationMatrix, getTriad, getTriadC, initOutput, opacityFractionalFromArgb, opacityFractionalFromColix, output, outputComment, outputFooter, outputJmolPerspective, outputSurface, outputVertex, outputVertices, rgbFractionalFromArgb, rgbFractionalFromColix, round, round, setTempVertex, translucencyFractionalFromColix
-
Constructor Details
-
_ObjExporter
public _ObjExporter()
-
-
Method Details
-
debugPrint
Debug print utility. Only prints if debug is true.- Parameters:
string
-
-
outputFace
protected void outputFace(int[] face, int[] map, int faceVertexMax) - Specified by:
outputFace
in class__CartesianExporter
-
outputCircle
- Specified by:
outputCircle
in class__CartesianExporter
-
outputCone
- Specified by:
outputCone
in class__CartesianExporter
-
outputCylinder
protected boolean outputCylinder(P3 ptCenter, P3 pt1, P3 pt2, short colix, byte endcaps, float radius, P3 ptX, P3 ptY, boolean checkRadius) - Specified by:
outputCylinder
in class__CartesianExporter
-
outputEllipsoid
- Specified by:
outputEllipsoid
in class__CartesianExporter
-
outputSphere
- Specified by:
outputSphere
in class__CartesianExporter
-
outputTextPixel
- Specified by:
outputTextPixel
in class__CartesianExporter
-
outputTriangle
- Specified by:
outputTriangle
in class__CartesianExporter
-
outputHeader
protected void outputHeader()- Specified by:
outputHeader
in class___Exporter
-
output
- Specified by:
output
in class___Exporter
-
drawSurface
-
finalizeOutput
- Overrides:
finalizeOutput
in class___Exporter
-