1 /*
2                            SAR Reality Constants
3 
4 	All units are in meters, radians, and cycles unless noted
5 	otherwise.
6  */
7 
8 #ifndef SARREALITY_H
9 #define SARREALITY_H
10 
11 
12 /*
13  *	PI constant:
14  */
15 #ifndef PI
16 # define PI	3.14159265
17 #endif
18 
19 /*
20  *	Cycle interval in microseconds and milliseconds:
21  */
22 #define CYCLE_LAPSE_US	1000000
23 #define CYCLE_LAPSE_MS	(CYCLE_LAPSE_US / 1000)
24 
25 /*
26  *	Seconds to cycles and vice versa coefficients:
27  */
28 #define SAR_SEC_TO_CYCLE_COEFF	(double)1.0
29 #define SAR_CYCLE_TO_SEC_COEFF	(double)1.0
30 
31 /*
32  *	Shadow visibility height (in meters):
33  *
34  *	Objects higher than this distance from ground do not have their
35  *	shadows drawn.
36  */
37 #define SAR_SHADOW_VISIBILITY_HEIGHT	100
38 
39 /*
40  *	Gravity (in meters per cycle^2):
41  */
42 #define SAR_GRAVITY	(9.8 * SAR_SEC_TO_CYCLE_COEFF * SAR_SEC_TO_CYCLE_COEFF)
43 
44 /*
45  *	Maximum visibility (in meters), this value is used for generation
46  *	of large quads. This value needs to be bigger than the drawing
47  *	clip distance (visibility_max), which is at most 21 miles.
48  */
49 #define SAR_MAX_VISIBILITY_DISTANCE	35000.0
50 
51 
52 /*
53  *	Map view maximum altitude (in feet):
54  */
55 #define SAR_MAX_MAP_VIEW_HEIGHT		10000000.0
56 
57 
58 /*
59  *	Radius of primary light position (the sun) to camera
60  *	position in meters.
61  */
62 #define SAR_PRILIGHT_TO_CAMERA_RAD	100000.0
63 
64 
65 #endif	/* SARREALITY_H */
66