From: <ha...@us...> - 2009-12-22 14:37:37
|
Revision: 11975 http://jmol.svn.sourceforge.net/jmol/?rev=11975&view=rev Author: hansonr Date: 2009-12-22 14:37:21 +0000 (Tue, 22 Dec 2009) Log Message: ----------- Modified Paths: -------------- trunk/Jmol/src/org/jmol/export/_PovrayExporter.java trunk/Jmol/src/org/jmol/export/_TachyonExporter.java trunk/Jmol/src/org/jmol/export/___Exporter.java Modified: trunk/Jmol/src/org/jmol/export/_PovrayExporter.java =================================================================== --- trunk/Jmol/src/org/jmol/export/_PovrayExporter.java 2009-12-22 14:31:54 UTC (rev 11974) +++ trunk/Jmol/src/org/jmol/export/_PovrayExporter.java 2009-12-22 14:37:21 UTC (rev 11975) @@ -97,11 +97,9 @@ // light source - tempP1.set(Graphics3D.getLightSource()); - output("// " + tempP1 + " \n"); float distance = Math.max(screenWidth, screenHeight); - output("light_source { <" + tempP1.x * distance + "," + tempP1.y * distance - + ", " + (-1 * tempP1.z * distance) + "> " + " rgb <0.6,0.6,0.6> }\n"); + output("light_source { <" + lightSource.x * distance + "," + lightSource.y * distance + + ", " + (-1 * lightSource.z * distance) + "> " + " rgb <0.6,0.6,0.6> }\n"); output("\n"); output("\n"); Modified: trunk/Jmol/src/org/jmol/export/_TachyonExporter.java =================================================================== --- trunk/Jmol/src/org/jmol/export/_TachyonExporter.java 2009-12-22 14:31:54 UTC (rev 11974) +++ trunk/Jmol/src/org/jmol/export/_TachyonExporter.java 2009-12-22 14:37:21 UTC (rev 11975) @@ -71,8 +71,6 @@ protected void outputHeader() { super.outputHeader(); - viewer.transformPoint(center, tempP1); - tempP1.z = 0; output("# ******************************************************\n"); output("# Created by Jmol " + Viewer.getJmolVersion() + "\n"); output("#\n"); @@ -99,11 +97,11 @@ output(" Aspectratio 1\n"); output(" Antialiasing 12\n"); output(" Raydepth 8\n"); - output(" Center " + triad(tempP1) + "\n"); + output(" Center " + triad(screenWidth / 2, screenHeight / 2, 0) + "\n"); output(" Viewdir 0 0 1\n"); output(" Updir 0 -1 0\n"); output("End_Camera\n"); - output("Directional_Light Direction " + round(Graphics3D.getLightSource()) + " Color 1 1 1\n"); + output("Directional_Light Direction " + round(lightSource) + " Color 1 1 1\n"); output("\n"); output("Background " + rgbFractionalFromColix(backgroundColix, ' ') + "\n"); Modified: trunk/Jmol/src/org/jmol/export/___Exporter.java =================================================================== --- trunk/Jmol/src/org/jmol/export/___Exporter.java 2009-12-22 14:31:54 UTC (rev 11974) +++ trunk/Jmol/src/org/jmol/export/___Exporter.java 2009-12-22 14:37:21 UTC (rev 11975) @@ -150,6 +150,7 @@ protected int screenHeight; protected int slabZ; protected int depthZ; + protected Point3f lightSource = Graphics3D.getLightSource(); // Most exporters (Maya, X3D, VRML, IDTF) // can manipulate actual 3D data. @@ -238,7 +239,7 @@ outputComment("scalePixelsPerAngstrom: " + viewer.getScalePixelsPerAngstrom(false)); outputComment("perspectiveDepth: " + viewer.getPerspectiveDepth()); outputComment("cameraDepth: " + viewer.getCameraDepth()); - outputComment("light source: " + Graphics3D.getLightSource()); + outputComment("light source: " + lightSource); outputComment("lighting: " + viewer.getSpecularState().replace('\n', ' ')); outputComment("center: " + center); outputComment("rotationRadius: " + viewer.getRotationRadius()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |