2013-12-04 21:52:18 +00:00
|
|
|
#include "BaseCloudsModel.h"
|
|
|
|
|
|
|
|
#include "CloudLayerDefinition.h"
|
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
BaseCloudsModel::BaseCloudsModel(CloudLayerDefinition *layer) : layer(layer) {
|
2013-12-04 21:52:18 +00:00
|
|
|
}
|
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
BaseCloudsModel::~BaseCloudsModel() {
|
2013-12-04 21:52:18 +00:00
|
|
|
}
|
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
void BaseCloudsModel::update() {
|
2013-12-04 21:52:18 +00:00
|
|
|
}
|
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
void BaseCloudsModel::getAltitudeRange(double *min_altitude, double *max_altitude) const {
|
2013-12-04 21:52:18 +00:00
|
|
|
*min_altitude = layer->altitude;
|
|
|
|
*max_altitude = layer->altitude * layer->scaling;
|
|
|
|
}
|
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
void BaseCloudsModel::getDetailRange(double *min_step, double *max_step) const {
|
2013-12-20 16:30:27 +00:00
|
|
|
double min_altitude, max_altitude, thickness;
|
|
|
|
getAltitudeRange(&min_altitude, &max_altitude);
|
|
|
|
thickness = max_altitude - min_altitude;
|
|
|
|
*min_step = thickness * 0.001;
|
2015-09-13 16:58:11 +00:00
|
|
|
*max_step = thickness * 0.2;
|
2013-12-04 21:52:18 +00:00
|
|
|
}
|
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
double BaseCloudsModel::getProbability(const Vector3 &, double) const {
|
2013-12-04 21:52:18 +00:00
|
|
|
return 1.0;
|
|
|
|
}
|
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
double BaseCloudsModel::getDensity(const Vector3 &) const {
|
2013-12-04 21:52:18 +00:00
|
|
|
return 0.0;
|
|
|
|
}
|
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
Color BaseCloudsModel::filterLight(const Color &light, double, double) const {
|
2013-12-04 21:52:18 +00:00
|
|
|
return light;
|
|
|
|
}
|
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
Color BaseCloudsModel::applyLightExit(const Color &light, const Vector3 &, const Vector3 &) const {
|
2013-12-04 21:52:18 +00:00
|
|
|
return light;
|
|
|
|
}
|