Space Comps
 All Classes Files Functions Variables
constants.h
Go to the documentation of this file.
1 #ifndef CONSTANTS_H
2 #define CONSTANTS_H
3 
9 // MODIFIABLE BY USER
11 extern int NUM_PARTICLES;
12 extern double MIN_PARTICLE_RADIUS;
13 extern double MAX_PARTICLE_RADIUS;
14 extern double MIN_VELOCITY;
15 extern double MAX_VELOCITY;
16 extern double X_DIMENSION_SIZE;
17 extern double Y_DIMENSION_SIZE;
18 extern double Z_DIMENSION_SIZE;
20 extern int SEED;
21 extern double LOOKAHEAD_TIME; // in seconds;
22 extern double MAX_LOOKAHEAD_TIME;
23 extern int MAX_QUEUE_SIZE;
24 extern int TIMESTEP_LIMIT;
25 extern int FRAMERATE;
26 extern int TARGET_FRAMERATE;
27 
28 extern int LOOKAHEAD_TIMESTEPS;
29 
30 // NOT MODIFIABLE BY USER
31 const int MIN_FRAMERATE = 15;
32 const int MAX_FRAMERATE = 510;
33 const int QUEUE_SIZE_MULTIPLIER = 1000;
34 // 2D
35 //const double X_DIMENSION_SIZE = 210;
36 //const double Y_DIMENSION_SIZE = 180;
37 //const double Z_DIMENSION_SIZE = 200;
38 // 3D
39 const int ALG_SPEED_SCALE = 50;
40 const double DISPLAY_SIDE = 600;
41 const double SIZE_MULTIPLIER_2D = DISPLAY_SIDE / X_DIMENSION_SIZE * 0.5;
42 const double VELOCITY_MULTIPLIER = 0.0003 * X_DIMENSION_SIZE / ALG_SPEED_SCALE;
43 const int MIN_NUM_PARTICLES = 1;
44 const int MAX_NUM_PARTICLES = 1000;
45 extern double GRAVITY;
46 
47 // SWEEP AND PRUNE
48 const int X_DIMENSION = 0;
49 const int Y_DIMENSION = 1;
50 const int Z_DIMENSION = 2;
51 
52 // QUADTREE
53 extern int MAX_PARTICLES_PER_LEVEL;
54 extern int MAX_LEVELS;
55 
56 // SPATIAL HASH
57 //temp with different radii
58 //const int CELL_SIZE = (MIN_PARTICLE_RADIUS + MAX_PARTICLE_RADIUS)*2;
59 //this one is for not working with different radii
60 //const int CELL_SIZE = (MIN_PARTICLE_RADIUS + MAX_PARTICLE_RADIUS)*3;
61 //const int CELL_SIZE = MIN_PARTICLE_RADIUS*4;
62 const int CELL_SIZE = MAX_PARTICLE_RADIUS*5;
63 
64 
65 #endif // CONSTANTS_H
int SEED
The seed used by the random number generator.
Definition: constants.cpp:12
int NUM_PARTICLES
The number of particles.
Definition: constants.cpp:4