layer_transition(0),
layer_type(SG_CLOUD_CLEAR)
{
- rebuild();
+ rebuild();
}
// Destructor
-SGCloudLayer::~SGCloudLayer( void ) {
+SGCloudLayer::~SGCloudLayer()
+{
+ delete layer_root;
}
float
void
SGCloudLayer::setSpan_m (float span_m)
{
- layer_span = span_m;
+ if (span_m != layer_span) {
+ layer_span = span_m;
+ rebuild();
+ }
}
float
void
SGCloudLayer::setType (Type type)
{
- layer_type = type;
- rebuild();
+ if (type != layer_type) {
+ layer_type = type;
+ rebuild();
+ }
}
layer_states[SG_CLOUD_CLEAR] = 0;
}
+ // This should automatically delete
+ // layer_transform as well.
delete layer_root;
+ layer_root = 0;
+ layer_transform = 0;
scale = 4000.0;