File: Export3dFunction.java

package info (click to toggle)
gpsprune 26.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,824 kB
  • sloc: java: 52,154; sh: 25; makefile: 21; python: 15
file content (68 lines) | stat: -rw-r--r-- 1,622 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package tim.prune.function;

import tim.prune.App;
import tim.prune.GenericFunction;
import tim.prune.threedee.ImageDefinition;
import tim.prune.threedee.TerrainDefinition;

/**
 * Abstract superclass of any 3d export function, currently only the PovExporter
 */
public abstract class Export3dFunction extends GenericFunction
{
	/** altitude exaggeration factor */
	protected double _altFactor = 5.0;
	/** symbol scaling factor */
	protected double _symbolScaleFactor = 1.0;
	/** definition of terrain */
	protected TerrainDefinition _terrainDef = null;
	/** definition of base image */
	protected ImageDefinition _imageDef = null;

	/**
	 * Required constructor
	 * @param inApp App object
	 */
	public Export3dFunction(App inApp) {
		super(inApp);
	}

	/**
	 * Set the coordinates for the camera
	 * @param inX X coordinate of camera
	 * @param inY Y coordinate of camera
	 * @param inZ Z coordinate of camera
	 */
	public abstract void setCameraCoordinates(double inX, double inY, double inZ);

	/**
	 * @param inFactor exaggeration factor
	 */
	public void setAltitudeExaggeration(double inFactor)
	{
		if (inFactor >= 1.0) {
			_altFactor = inFactor;
		}
	}

	/**
	 * @param inFactor scaling factor
	 */
	public void setSymbolScalingFactor(double inFactor) {
		_symbolScaleFactor = inFactor;
	}

	/**
	 * @param inDefinition terrain definition, or null
	 */
	public void setTerrainDefinition(TerrainDefinition inDefinition) {
		_terrainDef = inDefinition;
	}

	/**
	 * @param inDefinition image definition, or null
	 */
	public void setImageDefinition(ImageDefinition inDefinition) {
		_imageDef = inDefinition;
	}
}