[2221] | 1 | |
---|
| 2 | /////////////////////////////////////////////////////////////////////////// |
---|
| 3 | // |
---|
| 4 | // Realistic rain real-time simulation program |
---|
| 5 | // |
---|
| 6 | // Pierre Rousseau |
---|
| 7 | // |
---|
| 8 | /////////////////////////////////////////////////////////////////////////// |
---|
| 9 | // |
---|
| 10 | // Global definitions |
---|
| 11 | // |
---|
| 12 | /////////////////////////////////////////////////////////////////////////// |
---|
| 13 | |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | #ifndef __COMMON_RAIN__ |
---|
| 17 | #define __COMMON_RAIN__ |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | //////////////////////////////////////////////////////////// |
---|
| 21 | /// determine what the program will look like |
---|
| 22 | //////////////////////////////////////////////////////////// |
---|
| 23 | |
---|
| 24 | // currently incompatible with STREAKS or LIGHT_EXTENSION : |
---|
| 25 | //#define SNOW |
---|
| 26 | |
---|
| 27 | #ifndef SNOW |
---|
| 28 | #define STREAKS |
---|
| 29 | |
---|
| 30 | //#define LIGHT_EXTENSION |
---|
| 31 | #endif |
---|
| 32 | |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | //////////////////////////////////////////////////////////// |
---|
| 39 | /// this constant defines the size (in pixels) of the |
---|
| 40 | /// position texture. |
---|
| 41 | /// There will be (BILLBOARD_POS_TEX_SIZE) ² |
---|
| 42 | /// particles in the system. |
---|
| 43 | //////////////////////////////////////////////////////////// |
---|
| 44 | #define BILLBOARD_POS_TEX_SIZE 64 |
---|
| 45 | |
---|
| 46 | |
---|
| 47 | |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | |
---|
| 51 | //////////////////////////////////////////////////////////// |
---|
| 52 | /// Constants for the program |
---|
| 53 | //////////////////////////////////////////////////////////// |
---|
| 54 | // size of the "render to texture" : if using frame buffer copy, must be less than the frame buffer size |
---|
| 55 | #define RTTSIZE 512 |
---|
| 56 | |
---|
| 57 | #define _PI 3.1415926535 |
---|
| 58 | #define FOVyCam (_PI/3.0) |
---|
| 59 | #define FOVyRtt (15.0 * _PI / 18.0) |
---|
| 60 | |
---|
| 61 | // arbitrary unit = 0.1m |
---|
| 62 | #define HAUTEUR_OBSERVATEUR 18.0 |
---|
| 63 | |
---|
| 64 | |
---|
| 65 | |
---|
| 66 | //////////////////////////////////////////////////////////// |
---|
| 67 | /// Values for the hardware implementation |
---|
| 68 | /// of the particle system |
---|
| 69 | //////////////////////////////////////////////////////////// |
---|
| 70 | |
---|
| 71 | |
---|
| 72 | #define PARTICLE_POSITION_TEXTURE_NAME "floating_point_RTT_ping" |
---|
| 73 | #define PARTICLE_POSITION_BACKUP_TEXTURE_NAME "floating_point_RTT_pong" |
---|
| 74 | #define PARTICLE_POSITION_INIT_TEXTURE_NAME "floating_point_initializer" |
---|
| 75 | |
---|
| 76 | #define STATIC_GEOMETRY_NAME "billboards_in_vertex_buffer" |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | #define LIGHT_INFO_TEXTURE_NAME "light_information_texture" |
---|
| 80 | |
---|
| 81 | #define BILLBOARD_MESH_NAME "cloned_manual_mesh" |
---|
| 82 | |
---|
| 83 | #define RAIN_MATERIAL_NAME "rain_system_material" |
---|
| 84 | |
---|
| 85 | #define REFRACT_RTT_NAME "refract_rtt" |
---|
| 86 | |
---|
| 87 | |
---|
| 88 | #define PARTICLES_MIN_X -2000 |
---|
| 89 | #define PARTICLES_MAX_X 2000 |
---|
| 90 | #define PARTICLES_MIN_Y -10 |
---|
| 91 | #define PARTICLES_MAX_Y 100 |
---|
| 92 | #define PARTICLES_MIN_Z -2000 |
---|
| 93 | #define PARTICLES_MAX_Z 2000 |
---|
| 94 | |
---|
| 95 | |
---|
| 96 | |
---|
| 97 | #define VIS_PARTICLE_BOX_MIN_X -50 |
---|
| 98 | #define VIS_PARTICLE_BOX_MAX_X 50 |
---|
| 99 | #define VIS_PARTICLE_BOX_MIN_Y -20 |
---|
| 100 | #define VIS_PARTICLE_BOX_MAX_Y 80 |
---|
| 101 | #define VIS_PARTICLE_BOX_MIN_Z -50 |
---|
| 102 | #define VIS_PARTICLE_BOX_MAX_Z 50 |
---|
| 103 | |
---|
| 104 | |
---|
| 105 | #endif // __COMMON_RAIN__ |
---|