paysages3d/src/render/software/clouds/BaseCloudsModel.cpp

42 lines
1.1 KiB
C++
Raw Normal View History

2013-12-04 21:52:18 +00:00
#include "BaseCloudsModel.h"
#include "CloudLayerDefinition.h"
BaseCloudsModel::BaseCloudsModel(CloudLayerDefinition *layer) : layer(layer) {
2013-12-04 21:52:18 +00:00
}
BaseCloudsModel::~BaseCloudsModel() {
2013-12-04 21:52:18 +00:00
}
void BaseCloudsModel::update() {
2013-12-04 21:52:18 +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;
}
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;
*max_step = thickness * 0.2;
2013-12-04 21:52:18 +00:00
}
double BaseCloudsModel::getProbability(const Vector3 &, double) const {
2013-12-04 21:52:18 +00:00
return 1.0;
}
double BaseCloudsModel::getDensity(const Vector3 &) const {
2013-12-04 21:52:18 +00:00
return 0.0;
}
Color BaseCloudsModel::filterLight(const Color &light, double, double) const {
2013-12-04 21:52:18 +00:00
return light;
}
Color BaseCloudsModel::applyLightExit(const Color &light, const Vector3 &, const Vector3 &) const {
2013-12-04 21:52:18 +00:00
return light;
}