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
|
/*
SAR Reality Constants
All units are in meters, radians, and cycles unless noted
otherwise.
*/
#ifndef SARREALITY_H
#define SARREALITY_H
/*
* PI constant:
*/
#ifndef PI
# define PI 3.14159265
#endif
/*
* Cycle interval in microseconds and milliseconds:
*/
#define CYCLE_LAPSE_US 1000000
#define CYCLE_LAPSE_MS (CYCLE_LAPSE_US / 1000)
/*
* Seconds to cycles and vice versa coefficients:
*/
#define SAR_SEC_TO_CYCLE_COEFF (double)1.0
#define SAR_CYCLE_TO_SEC_COEFF (double)1.0
/*
* Shadow visibility height (in meters):
*
* Objects higher than this distance from ground do not have their
* shadows drawn.
*/
#define SAR_SHADOW_VISIBILITY_HEIGHT 100
/*
* Gravity (in meters per cycle^2):
*/
#define SAR_GRAVITY (9.8 * SAR_SEC_TO_CYCLE_COEFF * SAR_SEC_TO_CYCLE_COEFF)
/*
* Maximum visibility (in meters), this value is used for generation
* of large quads. This value needs to be bigger than the drawing
* clip distance (visibility_max), which is at most 21 miles.
*/
#define SAR_MAX_VISIBILITY_DISTANCE 35000.0
/*
* Map view maximum altitude (in feet):
*/
#define SAR_MAX_MAP_VIEW_HEIGHT 10000000.0
/*
* Radius of primary light position (the sun) to camera
* position in meters.
*/
#define SAR_PRILIGHT_TO_CAMERA_RAD 100000.0
#endif /* SARREALITY_H */
|