X-Git-Url: http://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Fsave%2FPovExporter.java;fp=tim%2Fprune%2Fsave%2FPovExporter.java;h=d4a6beb87a0482219c5ecedb5620bd2f72992f1c;hp=e0fc9d35be049168096f68d97c1b7286901ae462;hb=2d8cb72e84d5cc1089ce77baf1e34ea3ea2f8465;hpb=1a735a99408fd3b0c5ac4fe7b2fdbdbb23d38f40 diff --git a/tim/prune/save/PovExporter.java b/tim/prune/save/PovExporter.java index e0fc9d3..d4a6beb 100644 --- a/tim/prune/save/PovExporter.java +++ b/tim/prune/save/PovExporter.java @@ -511,6 +511,18 @@ public class PovExporter extends Export3dFunction // Definition of terrain shape if any final String terrainDefinition = makeTerrainString(inTerrainFile, inImageFile, inLineSeparator); + final String[] pointLights = { + "// lights", + "light_source { <-1, 9, -4> color rgb <0.5 0.5 0.5>}", + "light_source { <1, 6, -14> color rgb <0.6 0.6 0.6>}", + "light_source { <11, 12, 8> color rgb <0.3 0.3 0.3>}" + }; + final String[] northwestLight = { + "// lights from NW", + "light_source { <-10, 10, 10> color rgb <1.5 1.5 1.5> parallel }", + }; + final String[] lightsLines = (inTerrainFile == null ? pointLights : northwestLight); + // Set up output String[] outputLines = { "global_settings { ambient_light rgb <4, 4, 4> }", "", @@ -626,21 +638,30 @@ public class PovExporter extends Export3dFunction " ttf \"" + fontPath + "\" \"" + I18nManager.getText("cardinal.w") + "\" 0.3, 0", " pigment { color rgb <1 1 1> }", " translate <-10.3, 0.2, 0>", - "}", "", - // MAYBE: Light positions should relate to model size - "// lights", - "light_source { <-1, 9, -4> color rgb <0.5 0.5 0.5>}", - "light_source { <1, 6, -14> color rgb <0.6 0.6 0.6>}", - "light_source { <11, 12, 8> color rgb <0.3 0.3 0.3>}", - "", + "}" }; + // write strings to file - int numLines = outputLines.length; - for (int i=0; i