X-Git-Url: https://gitweb.fperrin.net/?a=blobdiff_plain;ds=sidebyside;f=tim%2Fprune%2Fsave%2FPovExporter.java;h=ee30841d6d779f7790b95006a58a75eda7759433;hb=4d5796d02a15808311c09448d79e6e7d1de9d636;hp=313b72aea19ff9080917377516bc285c532d8cea;hpb=f35b6d628f68e3b5ef19965ad8988d0dd1eb8efa;p=GpsPrune.git diff --git a/tim/prune/save/PovExporter.java b/tim/prune/save/PovExporter.java index 313b72a..ee30841 100644 --- a/tim/prune/save/PovExporter.java +++ b/tim/prune/save/PovExporter.java @@ -312,7 +312,7 @@ public class PovExporter extends Export3dFunction { FileWriter writer = null; // find out the line separator for this system - String lineSeparator = System.getProperty("line.separator"); + final String lineSeparator = System.getProperty("line.separator"); try { // create and scale model @@ -377,7 +377,7 @@ public class PovExporter extends Export3dFunction private void writeStartOfFile(FileWriter inWriter, double inModelSize, String inLineSeparator) throws IOException { - inWriter.write("// Pov file produced by Prune - see http://activityworkshop.net/"); + inWriter.write("// Pov file produced by GpsPrune - see http://activityworkshop.net/"); inWriter.write(inLineSeparator); inWriter.write(inLineSeparator); // Select font based on user input @@ -436,7 +436,7 @@ public class PovExporter extends Export3dFunction " sphere {", " <0, 0, 0>, 0.3", // size should depend on model size " texture {", - " pigment {color rgb <0.2 1.0 0.2>}", + " pigment {color rgb <0.1 0.6 0.1>}", // dark green " finish { phong 1 }", " }", " }", @@ -444,7 +444,7 @@ public class PovExporter extends Export3dFunction " sphere {", " <0, 0, 0>, 0.3", // size should depend on model size " texture {", - " pigment {color rgb <0.6 1.0 0.2>}", + " pigment {color rgb <0.4 0.9 0.2>}", // green " finish { phong 1 }", " }", " }", @@ -452,7 +452,7 @@ public class PovExporter extends Export3dFunction " sphere {", " <0, 0, 0>, 0.3", // size should depend on model size " texture {", - " pigment {color rgb <1.0 1.0 0.1>}", + " pigment {color rgb <0.7 0.8 0.2>}", // yellow " finish { phong 1 }", " }", " }", @@ -460,7 +460,7 @@ public class PovExporter extends Export3dFunction " sphere {", " <0, 0, 0>, 0.3", // size should depend on model size " texture {", - " pigment {color rgb <1.0 1.0 1.0>}", + " pigment {color rgb <0.5 0.8 0.6>}", // greeny " finish { phong 1 }", " }", " }", @@ -468,7 +468,15 @@ public class PovExporter extends Export3dFunction " sphere {", " <0, 0, 0>, 0.3", // size should depend on model size " texture {", - " pigment {color rgb <0.1 1.0 1.0>}", + " pigment {color rgb <0.2 0.9 0.9>}", // cyan + " finish { phong 1 }", + " }", + " }", + "#declare track_sphere5 =", + " sphere {", + " <0, 0, 0>, 0.3", // size should depend on model size + " texture {", + " pigment {color rgb <1.0 1.0 1.0>}", // white " finish { phong 1 }", " }", " }", @@ -533,7 +541,7 @@ public class PovExporter extends Export3dFunction * @param inLineSeparator line separator to use * @throws IOException on file writing error */ - private void writeLatLongLines(FileWriter inWriter, ThreeDModel inModel, String inLineSeparator) + private static void writeLatLongLines(FileWriter inWriter, ThreeDModel inModel, String inLineSeparator) throws IOException { inWriter.write("// Latitude and longitude lines:"); @@ -563,7 +571,7 @@ public class PovExporter extends Export3dFunction * @param inLineSeparator line separator to use * @throws IOException on file writing error */ - private void writeDataPointsBallsAndSticks(FileWriter inWriter, ThreeDModel inModel, String inLineSeparator) + private static void writeDataPointsBallsAndSticks(FileWriter inWriter, ThreeDModel inModel, String inLineSeparator) throws IOException { inWriter.write("// Data points:"); @@ -605,7 +613,7 @@ public class PovExporter extends Export3dFunction * @param inLineSeparator line separator to use * @throws IOException on file writing error */ - private void writeDataPointsTubesAndWalls(FileWriter inWriter, ThreeDModel inModel, String inLineSeparator) + private static void writeDataPointsTubesAndWalls(FileWriter inWriter, ThreeDModel inModel, String inLineSeparator) throws IOException { inWriter.write("// Data points:"); @@ -757,7 +765,7 @@ public class PovExporter extends Export3dFunction */ private static byte checkHeightCode(byte inCode) { - final byte maxHeightCode = 4; + final byte maxHeightCode = 5; if (inCode < 0) return 0; if (inCode > maxHeightCode) return maxHeightCode; return inCode;