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 __CartesianExporter
canCapCylinders, noColor, sphereMatrix, viewpointFields inherited from class ___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 voiddebugPrint(String string) Debug print utility.protected voiddrawSurface(MeshSurface meshSurface, short colix) protected Stringprotected voidprotected voidoutputCircle(P3 pt1, P3 pt2, float radius, short colix, boolean doFill) protected voidoutputCone(P3 ptBase, P3 ptTip, float radius, short colix) protected booleanoutputCylinder(P3 ptCenter, P3 pt1, P3 pt2, short colix, byte endcaps, float radius, P3 ptX, P3 ptY, boolean checkRadius) protected voidoutputEllipsoid(P3 center, P3[] points, short colix) protected voidoutputFace(int[] face, int[] map, int faceVertexMax) protected voidprotected voidoutputSphere(P3 center, float radius, short colix, boolean checkRadius) protected voidoutputTextPixel(P3 pt, int argb) protected voidoutputTriangle(T3 pt1, T3 pt2, T3 pt3, short colix) Methods inherited from class __CartesianExporter
fillTriangle, getCameraPosition, getCoordinateMap, getModelCenter, getNormalMap, outputIndices, outputSolidPlate, setSphereMatrixMethods inherited from class ___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:
outputFacein class__CartesianExporter
-
outputCircle
- Specified by:
outputCirclein class__CartesianExporter
-
outputCone
- Specified by:
outputConein 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:
outputCylinderin class__CartesianExporter
-
outputEllipsoid
- Specified by:
outputEllipsoidin class__CartesianExporter
-
outputSphere
- Specified by:
outputSpherein class__CartesianExporter
-
outputTextPixel
- Specified by:
outputTextPixelin class__CartesianExporter
-
outputTriangle
- Specified by:
outputTrianglein class__CartesianExporter
-
outputHeader
protected void outputHeader()- Specified by:
outputHeaderin class___Exporter
-
output
- Specified by:
outputin class___Exporter
-
drawSurface
-
finalizeOutput
- Overrides:
finalizeOutputin class___Exporter
-