]> gitweb.fperrin.net Git - GpsPrune.git/blob - tim/prune/function/Export3dFunction.java
Version 19, May 2018
[GpsPrune.git] / tim / prune / function / Export3dFunction.java
1 package tim.prune.function;
2
3 import tim.prune.App;
4 import tim.prune.GenericFunction;
5 import tim.prune.threedee.ImageDefinition;
6 import tim.prune.threedee.TerrainDefinition;
7
8 /**
9  * Abstract superclass of any 3d export function, currently only the PovExporter
10  */
11 public abstract class Export3dFunction extends GenericFunction
12 {
13         /** altitude exaggeration factor */
14         protected double _altFactor = 5.0;
15         /** definition of terrain */
16         protected TerrainDefinition _terrainDef = null;
17         /** definition of base image */
18         protected ImageDefinition _imageDef = null;
19
20         /**
21          * Required constructor
22          * @param inApp App object
23          */
24         public Export3dFunction(App inApp) {
25                 super(inApp);
26         }
27
28         /**
29          * Set the coordinates for the camera
30          * @param inX X coordinate of camera
31          * @param inY Y coordinate of camera
32          * @param inZ Z coordinate of camera
33          */
34         public abstract void setCameraCoordinates(double inX, double inY, double inZ);
35
36         /**
37          * @param inFactor exaggeration factor
38          */
39         public void setAltitudeExaggeration(double inFactor)
40         {
41                 if (inFactor >= 1.0) {
42                         _altFactor = inFactor;
43                 }
44         }
45
46         /**
47          * @param inDefinition terrain definition, or null
48          */
49         public void setTerrainDefinition(TerrainDefinition inDefinition)
50         {
51                 _terrainDef = inDefinition;
52         }
53
54         /**
55          * @param inDefinition image definition, or null
56          */
57         public void setImageDefinition(ImageDefinition inDefinition)
58         {
59                 _imageDef = inDefinition;
60         }
61 }