#endif
float SGCloudField::fieldSize = 50000.0f;
-float SGCloudField::coverage = 1.0f;
double SGCloudField::timer_dt = 0.0;
float SGCloudField::view_distance = 20000.0f;
sgVec3 SGCloudField::view_vec, SGCloudField::view_X, SGCloudField::view_Y;
deltay(0.0),
last_course(0.0),
last_coverage(0.0),
+ coverage(0.0),
defined3D(false),
reposition_count(0)
{
for (int x = 0; x < QUADTREE_SIZE; x++) {
for (int y = 0; y < QUADTREE_SIZE; y++) {
int num_children = field_group[x][y]->getNumChildren();
-
- for (int i = 0; i < num_children; i++) {
- field_group[x][y]->removeChild(i);
- }
+ field_group[x][y]->removeChildren(0, num_children);
}
}
void SGCloudField::applyCoverage(void) {
int row = (int) (coverage * 10.0);
- if (row > 10) row = 9;
+ if (row > 9) row = 9;
int col = 0;
if (coverage != last_coverage) {
double deltax, deltay, alt;
double last_course;
sgSphere field_sphere;
- float last_coverage;
+ float last_coverage;
+ float coverage;
SGGeoc cld_pos;
int reposition_count;
struct CloudFog : public simgear::Singleton<CloudFog>
static sgVec3 view_vec, view_X, view_Y;
- static float coverage;
static float view_distance;
static double timer_dt;
static float fieldSize;
bool defined3D;
- static float getCoverage(void) { return coverage; }
- static void setCoverage(float coverage) { coverage = coverage; }
+ float getCoverage(void) { return coverage; }
+ void setCoverage(float c) { coverage = c; }
static float getVisRange(void) { return view_distance; }
static void setVisRange(float d) { view_distance = d; }