76 }; |
76 }; |
77 |
77 |
78 // ============================================================================= |
78 // ============================================================================= |
79 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
79 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
80 // ============================================================================= |
80 // ============================================================================= |
|
81 // Grid stuff |
|
82 cfg (int, grid, Grid::Medium); |
|
83 |
|
84 cfg (float, grid_coarse_x, 5.0f); |
|
85 cfg (float, grid_coarse_y, 5.0f); |
|
86 cfg (float, grid_coarse_z, 5.0f); |
|
87 cfg (float, grid_coarse_angle, 45.0f); |
|
88 cfg (float, grid_medium_x, 1.0f); |
|
89 cfg (float, grid_medium_y, 1.0f); |
|
90 cfg (float, grid_medium_z, 1.0f); |
|
91 cfg (float, grid_medium_angle, 22.5f); |
|
92 cfg (float, grid_fine_x, 0.1f); |
|
93 cfg (float, grid_fine_y, 0.1f); |
|
94 cfg (float, grid_fine_z, 0.1f); |
|
95 cfg (float, grid_fine_angle, 7.5f); |
|
96 |
|
97 const gridinfo g_GridInfo[3] = { |
|
98 { "Coarse", { &grid_coarse_x, &grid_coarse_y, &grid_coarse_z, &grid_coarse_angle } }, |
|
99 { "Medium", { &grid_medium_x, &grid_medium_y, &grid_medium_z, &grid_medium_angle } }, |
|
100 { "Fine", { &grid_fine_x, &grid_fine_y, &grid_fine_z, &grid_fine_angle } } |
|
101 }; |
|
102 |
|
103 // ============================================================================= |
|
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
|
105 // ============================================================================= |
81 str ftoa (double fCoord) { |
106 str ftoa (double fCoord) { |
82 // Disable the locale first so that the decimal point will not |
107 // Disable the locale first so that the decimal point will not |
83 // turn into anything weird (like commas) |
108 // turn into anything weird (like commas) |
84 setlocale (LC_NUMERIC, "C"); |
109 setlocale (LC_NUMERIC, "C"); |
85 |
110 |