+
+ // Make the definition of the base plane depending on whether there's an image or not
+ final boolean useImage = (inImageFile != null);
+ final boolean useImageOnBox = useImage && (inTerrainFile == null);
+ final String boxDefinition = (useImageOnBox ?
+ " <0, 0, 0>, <1, 1, 0.001>" + inLineSeparator
+ + " pigment {image_map { png \"" + inImageFile.getName() + "\" map_type 0 interpolate 2 once } }" + inLineSeparator
+ + " scale 20.0 rotate <90, 0, 0>" + inLineSeparator
+ + " translate <-10.0, 0, -10.0>"
+ : " <-10.0, -0.15, -10.0>," + inLineSeparator
+ + " <10.0, 0.0, 10.0>" + inLineSeparator
+ + " pigment { color rgb <0.5 0.75 0.8> }");
+ // TODO: Maybe could use the same geometry for the imageless case, would simplify code a bit
+
+ // 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);
+