Removed _degs and _m suffixes.

This commit is contained in:
Nissim Hadar 2017-10-30 19:45:08 -07:00
parent b00db6a68f
commit 636f7858a3
7 changed files with 103 additions and 103 deletions

View file

@ -77,24 +77,24 @@ public:
bool& somethingChanged) override; bool& somethingChanged) override;
// Range only parameters // Range only parameters
DEFINE_PROPERTY(PROP_HAZE_RANGE, HazeRange, hazeRange, float, model::Haze::initialHazeRange_m); DEFINE_PROPERTY(PROP_HAZE_RANGE, HazeRange, hazeRange, float, model::Haze::initialHazeRange);
DEFINE_PROPERTY_REF(PROP_HAZE_COLOR, HazeColor, hazeColor, xColor, model::Haze::initialHazeColorXcolor); DEFINE_PROPERTY_REF(PROP_HAZE_COLOR, HazeColor, hazeColor, xColor, model::Haze::initialHazeColorXcolor);
DEFINE_PROPERTY_REF(PROP_HAZE_GLARE_COLOR, HazeGlareColor, hazeGlareColor, xColor, model::Haze::initialHazeGlareColorXcolor); DEFINE_PROPERTY_REF(PROP_HAZE_GLARE_COLOR, HazeGlareColor, hazeGlareColor, xColor, model::Haze::initialHazeGlareColorXcolor);
DEFINE_PROPERTY(PROP_HAZE_ENABLE_GLARE, HazeEnableGlare, hazeEnableGlare, bool, false); DEFINE_PROPERTY(PROP_HAZE_ENABLE_GLARE, HazeEnableGlare, hazeEnableGlare, bool, false);
DEFINE_PROPERTY_REF(PROP_HAZE_GLARE_ANGLE, HazeGlareAngle, hazeGlareAngle, float, model::Haze::initialGlareAngle_degs); DEFINE_PROPERTY_REF(PROP_HAZE_GLARE_ANGLE, HazeGlareAngle, hazeGlareAngle, float, model::Haze::initialGlareAngle);
// Altitude parameters // Altitude parameters
DEFINE_PROPERTY(PROP_HAZE_ALTITUDE_EFFECT, HazeAltitudeEffect, hazeAltitudeEffect, bool, false); DEFINE_PROPERTY(PROP_HAZE_ALTITUDE_EFFECT, HazeAltitudeEffect, hazeAltitudeEffect, bool, false);
DEFINE_PROPERTY_REF(PROP_HAZE_CEILING, HazeCeiling, hazeCeiling, float, model::Haze::initialHazeBaseReference_m + model::Haze::initialHazeHeight_m); DEFINE_PROPERTY_REF(PROP_HAZE_CEILING, HazeCeiling, hazeCeiling, float, model::Haze::initialHazeBaseReference + model::Haze::initialHazeHeight);
DEFINE_PROPERTY_REF(PROP_HAZE_BASE_REF, HazeBaseRef, hazeBaseRef, float, model::Haze::initialHazeBaseReference_m); DEFINE_PROPERTY_REF(PROP_HAZE_BASE_REF, HazeBaseRef, hazeBaseRef, float, model::Haze::initialHazeBaseReference);
// Background (skybox) blend value // Background (skybox) blend value
DEFINE_PROPERTY_REF(PROP_HAZE_BACKGROUND_BLEND, HazeBackgroundBlend, hazeBackgroundBlend, float, model::Haze::initialHazeBackgroundBlend); DEFINE_PROPERTY_REF(PROP_HAZE_BACKGROUND_BLEND, HazeBackgroundBlend, hazeBackgroundBlend, float, model::Haze::initialHazeBackgroundBlend);
// hazeDirectional light attenuation // hazeDirectional light attenuation
DEFINE_PROPERTY(PROP_HAZE_ATTENUATE_KEYLIGHT, HazeAttenuateKeyLight, hazeAttenuateKeyLight, bool, false); DEFINE_PROPERTY(PROP_HAZE_ATTENUATE_KEYLIGHT, HazeAttenuateKeyLight, hazeAttenuateKeyLight, bool, false);
DEFINE_PROPERTY_REF(PROP_HAZE_KEYLIGHT_RANGE, HazeKeyLightRange, hazeKeyLightRange, float, model::Haze::initialHazeKeyLightRange_m); DEFINE_PROPERTY_REF(PROP_HAZE_KEYLIGHT_RANGE, HazeKeyLightRange, hazeKeyLightRange, float, model::Haze::initialHazeKeyLightRange);
DEFINE_PROPERTY_REF(PROP_HAZE_KEYLIGHT_ALTITUDE, HazeKeyLightAltitude, hazeKeyLightAltitude, float, model::Haze::initialHazeKeyLightAltitude_m); DEFINE_PROPERTY_REF(PROP_HAZE_KEYLIGHT_ALTITUDE, HazeKeyLightAltitude, hazeKeyLightAltitude, float, model::Haze::initialHazeKeyLightAltitude);
}; };
#endif // hifi_HazePropertyGroup_h #endif // hifi_HazePropertyGroup_h

View file

@ -14,29 +14,29 @@
using namespace model; using namespace model;
const float Haze::initialHazeRange_m{ 1000.0f }; const float Haze::initialHazeRange{ 1000.0f };
const float Haze::initialHazeHeight_m{ 200.0f }; const float Haze::initialHazeHeight{ 200.0f };
const float Haze::initialHazeKeyLightRange_m{ 1000.0f }; const float Haze::initialHazeKeyLightRange{ 1000.0f };
const float Haze::initialHazeKeyLightAltitude_m{ 200.0f }; const float Haze::initialHazeKeyLightAltitude{ 200.0f };
const float Haze::initialHazeBackgroundBlend{ 0.0f }; const float Haze::initialHazeBackgroundBlend{ 0.0f };
const glm::vec3 Haze::initialColorModulationFactor{ const glm::vec3 Haze::initialColorModulationFactor{
convertHazeRangeToHazeRangeFactor(initialHazeRange_m), convertHazeRangeToHazeRangeFactor(initialHazeRange),
convertHazeRangeToHazeRangeFactor(initialHazeRange_m), convertHazeRangeToHazeRangeFactor(initialHazeRange),
convertHazeRangeToHazeRangeFactor(initialHazeRange_m) convertHazeRangeToHazeRangeFactor(initialHazeRange)
}; };
const glm::vec3 Haze::initialHazeColor{ 0.5f, 0.6f, 0.7f }; // Bluish const glm::vec3 Haze::initialHazeColor{ 0.5f, 0.6f, 0.7f }; // Bluish
const xColor Haze::initialHazeColorXcolor{ 128, 154, 179 }; const xColor Haze::initialHazeColorXcolor{ 128, 154, 179 };
const float Haze::initialGlareAngle_degs{ 20.0f }; const float Haze::initialGlareAngle{ 20.0f };
const glm::vec3 Haze::initialHazeGlareColor{ 1.0f, 0.9f, 0.7f }; const glm::vec3 Haze::initialHazeGlareColor{ 1.0f, 0.9f, 0.7f };
const xColor Haze::initialHazeGlareColorXcolor{ 255, 229, 179 }; const xColor Haze::initialHazeGlareColorXcolor{ 255, 229, 179 };
const float Haze::initialHazeBaseReference_m{ 0.0f }; const float Haze::initialHazeBaseReference{ 0.0f };
Haze::Haze() { Haze::Haze() {
Parameters parameters; Parameters parameters;

View file

@ -25,17 +25,17 @@ namespace model {
// f = exp(-d * b) // f = exp(-d * b)
// ln(f) = -d * b // ln(f) = -d * b
// b = -ln(f)/d // b = -ln(f)/d
inline glm::vec3 convertHazeRangeToHazeRangeFactor(const glm::vec3 hazeRange_m) { inline glm::vec3 convertHazeRangeToHazeRangeFactor(const glm::vec3 hazeRange) {
return glm::vec3( return glm::vec3(
-LOG_P_005 / hazeRange_m.x, -LOG_P_005 / hazeRange.x,
-LOG_P_005 / hazeRange_m.y, -LOG_P_005 / hazeRange.y,
-LOG_P_005 / hazeRange_m.z); -LOG_P_005 / hazeRange.z);
} }
// limit range and altitude to no less than 1.0 metres // limit range and altitude to no less than 1.0 metres
inline float convertHazeRangeToHazeRangeFactor(const float hazeRange_m) { return -LOG_P_005 / glm::max(hazeRange_m, 1.0f); } inline float convertHazeRangeToHazeRangeFactor(const float hazeRange) { return -LOG_P_005 / glm::max(hazeRange, 1.0f); }
inline float convertHazeAltitudeToHazeAltitudeFactor(const float hazeHeight_m) { return -LOG_P_005 / glm::max(hazeHeight_m, 1.0f); } inline float convertHazeAltitudeToHazeAltitudeFactor(const float hazeHeight) { return -LOG_P_005 / glm::max(hazeHeight, 1.0f); }
// Derivation (s is the proportion of sun blend, a is the angle at which the blend is 50%, solve for m = 0.5 // Derivation (s is the proportion of sun blend, a is the angle at which the blend is 50%, solve for m = 0.5
// s = dot(lookAngle, sunAngle) = cos(a) // s = dot(lookAngle, sunAngle) = cos(a)
@ -54,11 +54,11 @@ namespace model {
class Haze { class Haze {
public: public:
// Initial values // Initial values
static const float initialHazeRange_m; static const float initialHazeRange;
static const float initialHazeHeight_m; static const float initialHazeHeight;
static const float initialHazeKeyLightRange_m; static const float initialHazeKeyLightRange;
static const float initialHazeKeyLightAltitude_m; static const float initialHazeKeyLightAltitude;
static const float initialHazeBackgroundBlend; static const float initialHazeBackgroundBlend;
@ -67,12 +67,12 @@ namespace model {
static const glm::vec3 initialHazeColor; static const glm::vec3 initialHazeColor;
static const xColor initialHazeColorXcolor; static const xColor initialHazeColorXcolor;
static const float initialGlareAngle_degs; static const float initialGlareAngle;
static const glm::vec3 initialHazeGlareColor; static const glm::vec3 initialHazeGlareColor;
static const xColor initialHazeGlareColorXcolor; static const xColor initialHazeGlareColorXcolor;
static const float initialHazeBaseReference_m; static const float initialHazeBaseReference;
using UniformBufferView = gpu::BufferView; using UniformBufferView = gpu::BufferView;
@ -107,10 +107,10 @@ namespace model {
public: public:
// DO NOT CHANGE ORDER HERE WITHOUT UNDERSTANDING THE std140 LAYOUT // DO NOT CHANGE ORDER HERE WITHOUT UNDERSTANDING THE std140 LAYOUT
glm::vec3 hazeColor{ initialHazeColor }; glm::vec3 hazeColor{ initialHazeColor };
float hazeGlareBlend{ convertGlareAngleToPower(initialGlareAngle_degs) }; float hazeGlareBlend{ convertGlareAngleToPower(initialGlareAngle) };
glm::vec3 hazeGlareColor{ initialHazeGlareColor }; glm::vec3 hazeGlareColor{ initialHazeGlareColor };
float hazeBaseReference{ initialHazeBaseReference_m }; float hazeBaseReference{ initialHazeBaseReference };
glm::vec3 colorModulationFactor{ initialColorModulationFactor }; glm::vec3 colorModulationFactor{ initialColorModulationFactor };
int hazeMode{ 0 }; // bit 0 - set to activate haze attenuation of fragment color int hazeMode{ 0 }; // bit 0 - set to activate haze attenuation of fragment color
@ -124,11 +124,11 @@ namespace model {
float hazeBackgroundBlend{ initialHazeBackgroundBlend }; float hazeBackgroundBlend{ initialHazeBackgroundBlend };
// The haze attenuation exponents used by both fragment and directional light attenuation // The haze attenuation exponents used by both fragment and directional light attenuation
float hazeRangeFactor{ convertHazeRangeToHazeRangeFactor(initialHazeRange_m) }; float hazeRangeFactor{ convertHazeRangeToHazeRangeFactor(initialHazeRange) };
float hazeHeightFactor{ convertHazeAltitudeToHazeAltitudeFactor(initialHazeHeight_m) }; float hazeHeightFactor{ convertHazeAltitudeToHazeAltitudeFactor(initialHazeHeight) };
float hazeKeyLightRangeFactor{ convertHazeRangeToHazeRangeFactor(initialHazeKeyLightRange_m) }; float hazeKeyLightRangeFactor{ convertHazeRangeToHazeRangeFactor(initialHazeKeyLightRange) };
float hazeKeyLightAltitudeFactor{ convertHazeAltitudeToHazeAltitudeFactor(initialHazeKeyLightAltitude_m) }; float hazeKeyLightAltitudeFactor{ convertHazeAltitudeToHazeAltitudeFactor(initialHazeKeyLightAltitude) };
Parameters() {} Parameters() {}
}; };

View file

@ -25,8 +25,8 @@ void HazeConfig::setHazeColor(const glm::vec3 value) {
hazeColor = value; hazeColor = value;
} }
void HazeConfig::setHazeGlareAngle_degs(const float value) { void HazeConfig::setHazeGlareAngle(const float value) {
hazeGlareAngle_degs = value; hazeGlareAngle = value;
} }
void HazeConfig::setHazeGlareColor(const glm::vec3 value) { void HazeConfig::setHazeGlareColor(const glm::vec3 value) {
@ -34,7 +34,7 @@ void HazeConfig::setHazeGlareColor(const glm::vec3 value) {
} }
void HazeConfig::setHazeBaseReference(const float value) { void HazeConfig::setHazeBaseReference(const float value) {
hazeBaseReference_m = value; hazeBaseReference = value;
} }
void HazeConfig::setHazeActive(const bool active) { void HazeConfig::setHazeActive(const bool active) {
@ -57,20 +57,20 @@ void HazeConfig::setHazeEnableGlare(const bool active) {
isHazeEnableGlare = active; isHazeEnableGlare = active;
} }
void HazeConfig::setHazeRange_m(const float value) { void HazeConfig::setHazeRange(const float value) {
hazeRange_m = value; hazeRange = value;
} }
void HazeConfig::setHazeAltitude_m(const float value) { void HazeConfig::setHazeAltitude(const float value) {
hazeHeight_m = value; hazeHeight = value;
} }
void HazeConfig::setHazeKeyLightRange_m(const float value) { void HazeConfig::setHazeKeyLightRange(const float value) {
hazeKeyLightRange_m = value; hazeKeyLightRange = value;
} }
void HazeConfig::setHazeKeyLightAltitude_m(const float value) { void HazeConfig::setHazeKeyLightAltitude(const float value) {
hazeKeyLightAltitude_m = value; hazeKeyLightAltitude = value;
} }
void HazeConfig::setHazeBackgroundBlend(const float value) { void HazeConfig::setHazeBackgroundBlend(const float value) {
@ -83,10 +83,10 @@ MakeHaze::MakeHaze() {
void MakeHaze::configure(const Config& config) { void MakeHaze::configure(const Config& config) {
_haze->setHazeColor(config.hazeColor); _haze->setHazeColor(config.hazeColor);
_haze->setHazeGlareBlend(model::convertGlareAngleToPower(config.hazeGlareAngle_degs)); _haze->setHazeGlareBlend(model::convertGlareAngleToPower(config.hazeGlareAngle));
_haze->setHazeGlareColor(config.hazeGlareColor); _haze->setHazeGlareColor(config.hazeGlareColor);
_haze->setHazeBaseReference(config.hazeBaseReference_m); _haze->setHazeBaseReference(config.hazeBaseReference);
_haze->setHazeActive(config.isHazeActive); _haze->setHazeActive(config.isHazeActive);
_haze->setAltitudeBased(config.isAltitudeBased); _haze->setAltitudeBased(config.isAltitudeBased);
@ -94,11 +94,11 @@ void MakeHaze::configure(const Config& config) {
_haze->setModulateColorActive(config.isModulateColorActive); _haze->setModulateColorActive(config.isModulateColorActive);
_haze->setHazeEnableGlare(config.isHazeEnableGlare); _haze->setHazeEnableGlare(config.isHazeEnableGlare);
_haze->setHazeRangeFactor(model::convertHazeRangeToHazeRangeFactor(config.hazeRange_m)); _haze->setHazeRangeFactor(model::convertHazeRangeToHazeRangeFactor(config.hazeRange));
_haze->setHazeAltitudeFactor(model::convertHazeAltitudeToHazeAltitudeFactor(config.hazeHeight_m)); _haze->setHazeAltitudeFactor(model::convertHazeAltitudeToHazeAltitudeFactor(config.hazeHeight));
_haze->setHazeKeyLightRangeFactor(model::convertHazeRangeToHazeRangeFactor(config.hazeKeyLightRange_m)); _haze->setHazeKeyLightRangeFactor(model::convertHazeRangeToHazeRangeFactor(config.hazeKeyLightRange));
_haze->setHazeKeyLightAltitudeFactor(model::convertHazeAltitudeToHazeAltitudeFactor(config.hazeKeyLightAltitude_m)); _haze->setHazeKeyLightAltitudeFactor(model::convertHazeAltitudeToHazeAltitudeFactor(config.hazeKeyLightAltitude));
_haze->setHazeBackgroundBlend(config.hazeBackgroundBlend); _haze->setHazeBackgroundBlend(config.hazeBackgroundBlend);
} }

View file

@ -30,10 +30,10 @@ class MakeHazeConfig : public render::Job::Config {
Q_OBJECT Q_OBJECT
Q_PROPERTY(glm::vec3 hazeColor MEMBER hazeColor WRITE setHazeColor NOTIFY dirty); Q_PROPERTY(glm::vec3 hazeColor MEMBER hazeColor WRITE setHazeColor NOTIFY dirty);
Q_PROPERTY(float hazeGlareAngle_degs MEMBER hazeGlareAngle_degs WRITE setHazeGlareAngle_degs NOTIFY dirty); Q_PROPERTY(float hazeGlareAngle MEMBER hazeGlareAngle WRITE setHazeGlareAngle NOTIFY dirty);
Q_PROPERTY(glm::vec3 hazeGlareColor MEMBER hazeGlareColor WRITE setHazeGlareColor NOTIFY dirty); Q_PROPERTY(glm::vec3 hazeGlareColor MEMBER hazeGlareColor WRITE setHazeGlareColor NOTIFY dirty);
Q_PROPERTY(float hazeBaseReference_m MEMBER hazeBaseReference_m WRITE setHazeBaseReference NOTIFY dirty); Q_PROPERTY(float hazeBaseReference MEMBER hazeBaseReference WRITE setHazeBaseReference NOTIFY dirty);
Q_PROPERTY(bool isHazeActive MEMBER isHazeActive WRITE setHazeActive NOTIFY dirty); Q_PROPERTY(bool isHazeActive MEMBER isHazeActive WRITE setHazeActive NOTIFY dirty);
Q_PROPERTY(bool isAltitudeBased MEMBER isAltitudeBased WRITE setAltitudeBased NOTIFY dirty); Q_PROPERTY(bool isAltitudeBased MEMBER isAltitudeBased WRITE setAltitudeBased NOTIFY dirty);
@ -41,11 +41,11 @@ class MakeHazeConfig : public render::Job::Config {
Q_PROPERTY(bool isModulateColorActive MEMBER isModulateColorActive WRITE setModulateColorActive NOTIFY dirty); Q_PROPERTY(bool isModulateColorActive MEMBER isModulateColorActive WRITE setModulateColorActive NOTIFY dirty);
Q_PROPERTY(bool isHazeEnableGlare MEMBER isHazeEnableGlare WRITE setHazeEnableGlare NOTIFY dirty); Q_PROPERTY(bool isHazeEnableGlare MEMBER isHazeEnableGlare WRITE setHazeEnableGlare NOTIFY dirty);
Q_PROPERTY(float hazeRange_m MEMBER hazeRange_m WRITE setHazeRange_m NOTIFY dirty); Q_PROPERTY(float hazeRange MEMBER hazeRange WRITE setHazeRange NOTIFY dirty);
Q_PROPERTY(float hazeHeight_m MEMBER hazeHeight_m WRITE setHazeAltitude_m NOTIFY dirty); Q_PROPERTY(float hazeHeight MEMBER hazeHeight WRITE setHazeAltitude NOTIFY dirty);
Q_PROPERTY(float hazeKeyLightRange_m MEMBER hazeKeyLightRange_m WRITE setHazeKeyLightRange_m NOTIFY dirty); Q_PROPERTY(float hazeKeyLightRange MEMBER hazeKeyLightRange WRITE setHazeKeyLightRange NOTIFY dirty);
Q_PROPERTY(float hazeKeyLightAltitude_m MEMBER hazeKeyLightAltitude_m WRITE setHazeKeyLightAltitude_m NOTIFY dirty); Q_PROPERTY(float hazeKeyLightAltitude MEMBER hazeKeyLightAltitude WRITE setHazeKeyLightAltitude NOTIFY dirty);
Q_PROPERTY(float hazeBackgroundBlend MEMBER hazeBackgroundBlend WRITE setHazeBackgroundBlend NOTIFY dirty); Q_PROPERTY(float hazeBackgroundBlend MEMBER hazeBackgroundBlend WRITE setHazeBackgroundBlend NOTIFY dirty);
@ -53,10 +53,10 @@ public:
MakeHazeConfig() : render::Job::Config() {} MakeHazeConfig() : render::Job::Config() {}
glm::vec3 hazeColor{ model::Haze::initialHazeColor }; glm::vec3 hazeColor{ model::Haze::initialHazeColor };
float hazeGlareAngle_degs{ model::Haze::initialGlareAngle_degs }; float hazeGlareAngle{ model::Haze::initialGlareAngle };
glm::vec3 hazeGlareColor{ model::Haze::initialHazeGlareColor }; glm::vec3 hazeGlareColor{ model::Haze::initialHazeGlareColor };
float hazeBaseReference_m{ model::Haze::initialHazeBaseReference_m }; float hazeBaseReference{ model::Haze::initialHazeBaseReference };
bool isHazeActive{ false }; bool isHazeActive{ false };
bool isAltitudeBased{ false }; bool isAltitudeBased{ false };
@ -64,20 +64,20 @@ public:
bool isModulateColorActive{ false }; bool isModulateColorActive{ false };
bool isHazeEnableGlare{ false }; bool isHazeEnableGlare{ false };
float hazeRange_m{ model::Haze::initialHazeRange_m }; float hazeRange{ model::Haze::initialHazeRange };
float hazeHeight_m{ model::Haze::initialHazeHeight_m }; float hazeHeight{ model::Haze::initialHazeHeight };
float hazeKeyLightRange_m{ model::Haze::initialHazeKeyLightRange_m }; float hazeKeyLightRange{ model::Haze::initialHazeKeyLightRange };
float hazeKeyLightAltitude_m{ model::Haze::initialHazeKeyLightAltitude_m }; float hazeKeyLightAltitude{ model::Haze::initialHazeKeyLightAltitude };
float hazeBackgroundBlend{ model::Haze::initialHazeBackgroundBlend }; float hazeBackgroundBlend{ model::Haze::initialHazeBackgroundBlend };
public slots: public slots:
void setHazeColor(const glm::vec3 value) { hazeColor = value; emit dirty(); } void setHazeColor(const glm::vec3 value) { hazeColor = value; emit dirty(); }
void setHazeGlareAngle_degs(const float value) { hazeGlareAngle_degs = value; emit dirty(); } void setHazeGlareAngle(const float value) { hazeGlareAngle = value; emit dirty(); }
void setHazeGlareColor(const glm::vec3 value) { hazeGlareColor = value; emit dirty(); } void setHazeGlareColor(const glm::vec3 value) { hazeGlareColor = value; emit dirty(); }
void setHazeBaseReference(const float value) { hazeBaseReference_m = value; ; emit dirty(); } void setHazeBaseReference(const float value) { hazeBaseReference = value; ; emit dirty(); }
void setHazeActive(const bool active) { isHazeActive = active; emit dirty(); } void setHazeActive(const bool active) { isHazeActive = active; emit dirty(); }
void setAltitudeBased(const bool active) { isAltitudeBased = active; emit dirty(); } void setAltitudeBased(const bool active) { isAltitudeBased = active; emit dirty(); }
@ -85,11 +85,11 @@ public slots:
void setModulateColorActive(const bool active) { isModulateColorActive = active; emit dirty(); } void setModulateColorActive(const bool active) { isModulateColorActive = active; emit dirty(); }
void setHazeEnableGlare(const bool active) { isHazeEnableGlare = active; emit dirty(); } void setHazeEnableGlare(const bool active) { isHazeEnableGlare = active; emit dirty(); }
void setHazeRange_m(const float value) { hazeRange_m = value; emit dirty(); } void setHazeRange(const float value) { hazeRange = value; emit dirty(); }
void setHazeAltitude_m(const float value) { hazeHeight_m = value; emit dirty(); } void setHazeAltitude(const float value) { hazeHeight = value; emit dirty(); }
void setHazeKeyLightRange_m(const float value) { hazeKeyLightRange_m = value; emit dirty(); } void setHazeKeyLightRange(const float value) { hazeKeyLightRange = value; emit dirty(); }
void setHazeKeyLightAltitude_m(const float value) { hazeKeyLightAltitude_m = value; emit dirty(); } void setHazeKeyLightAltitude(const float value) { hazeKeyLightAltitude = value; emit dirty(); }
void setHazeBackgroundBlend(const float value) { hazeBackgroundBlend = value; ; emit dirty(); } void setHazeBackgroundBlend(const float value) { hazeBackgroundBlend = value; ; emit dirty(); }
@ -117,10 +117,10 @@ public:
// attributes // attributes
glm::vec3 hazeColor{ model::Haze::initialHazeColor }; glm::vec3 hazeColor{ model::Haze::initialHazeColor };
float hazeGlareAngle_degs{ model::Haze::initialGlareAngle_degs }; float hazeGlareAngle{ model::Haze::initialGlareAngle };
glm::vec3 hazeGlareColor{ model::Haze::initialHazeGlareColor }; glm::vec3 hazeGlareColor{ model::Haze::initialHazeGlareColor };
float hazeBaseReference_m{ model::Haze::initialHazeBaseReference_m }; float hazeBaseReference{ model::Haze::initialHazeBaseReference };
bool isHazeActive{ false }; // Setting this to true will set haze to on bool isHazeActive{ false }; // Setting this to true will set haze to on
bool isAltitudeBased{ false }; bool isAltitudeBased{ false };
@ -128,17 +128,17 @@ public:
bool isModulateColorActive{ false }; bool isModulateColorActive{ false };
bool isHazeEnableGlare{ false }; bool isHazeEnableGlare{ false };
float hazeRange_m{ model::Haze::initialHazeRange_m }; float hazeRange{ model::Haze::initialHazeRange };
float hazeHeight_m{ model::Haze::initialHazeHeight_m }; float hazeHeight{ model::Haze::initialHazeHeight };
float hazeKeyLightRange_m{ model::Haze::initialHazeKeyLightRange_m }; float hazeKeyLightRange{ model::Haze::initialHazeKeyLightRange };
float hazeKeyLightAltitude_m{ model::Haze::initialHazeKeyLightAltitude_m }; float hazeKeyLightAltitude{ model::Haze::initialHazeKeyLightAltitude };
float hazeBackgroundBlend{ model::Haze::initialHazeBackgroundBlend }; float hazeBackgroundBlend{ model::Haze::initialHazeBackgroundBlend };
// methods // methods
void setHazeColor(const glm::vec3 value); void setHazeColor(const glm::vec3 value);
void setHazeGlareAngle_degs(const float value); void setHazeGlareAngle(const float value);
void setHazeGlareColor(const glm::vec3 value); void setHazeGlareColor(const glm::vec3 value);
void setHazeBaseReference(const float value); void setHazeBaseReference(const float value);
@ -149,11 +149,11 @@ public:
void setModulateColorActive(const bool active); void setModulateColorActive(const bool active);
void setHazeEnableGlare(const bool active); void setHazeEnableGlare(const bool active);
void setHazeRange_m(const float value); void setHazeRange(const float value);
void setHazeAltitude_m(const float value); void setHazeAltitude(const float value);
void setHazeKeyLightRange_m(const float value); void setHazeKeyLightRange(const float value);
void setHazeKeyLightAltitude_m(const float value); void setHazeKeyLightAltitude(const float value);
void setHazeBackgroundBlend(const float value); void setHazeBackgroundBlend(const float value);
}; };

View file

@ -21,10 +21,10 @@ FetchHazeStage::FetchHazeStage() {
void FetchHazeStage::configure(const Config& config) { void FetchHazeStage::configure(const Config& config) {
_haze->setHazeColor(config.hazeColor); _haze->setHazeColor(config.hazeColor);
_haze->setHazeGlareBlend(model::convertGlareAngleToPower(config.hazeGlareAngle_degs)); _haze->setHazeGlareBlend(model::convertGlareAngleToPower(config.hazeGlareAngle));
_haze->setHazeGlareColor(config.hazeGlareColor); _haze->setHazeGlareColor(config.hazeGlareColor);
_haze->setHazeBaseReference(config.hazeBaseReference_m); _haze->setHazeBaseReference(config.hazeBaseReference);
_haze->setHazeActive(config.isHazeActive); _haze->setHazeActive(config.isHazeActive);
_haze->setAltitudeBased(config.isAltitudeBased); _haze->setAltitudeBased(config.isAltitudeBased);
@ -32,11 +32,11 @@ void FetchHazeStage::configure(const Config& config) {
_haze->setModulateColorActive(config.isModulateColorActive); _haze->setModulateColorActive(config.isModulateColorActive);
_haze->setHazeEnableGlare(config.isHazeEnableGlare); _haze->setHazeEnableGlare(config.isHazeEnableGlare);
_haze->setHazeRangeFactor(model::convertHazeRangeToHazeRangeFactor(config.hazeRange_m)); _haze->setHazeRangeFactor(model::convertHazeRangeToHazeRangeFactor(config.hazeRange));
_haze->setHazeAltitudeFactor(model::convertHazeAltitudeToHazeAltitudeFactor(config.hazeHeight_m)); _haze->setHazeAltitudeFactor(model::convertHazeAltitudeToHazeAltitudeFactor(config.hazeHeight));
_haze->setHazeKeyLightRangeFactor(model::convertHazeRangeToHazeRangeFactor(config.hazeKeyLightRange_m)); _haze->setHazeKeyLightRangeFactor(model::convertHazeRangeToHazeRangeFactor(config.hazeKeyLightRange));
_haze->setHazeKeyLightAltitudeFactor(model::convertHazeAltitudeToHazeAltitudeFactor(config.hazeKeyLightAltitude_m)); _haze->setHazeKeyLightAltitudeFactor(model::convertHazeAltitudeToHazeAltitudeFactor(config.hazeKeyLightAltitude));
_haze->setHazeBackgroundBlend(config.hazeBackgroundBlend); _haze->setHazeBackgroundBlend(config.hazeBackgroundBlend);
} }

View file

@ -84,10 +84,10 @@ class FetchHazeConfig : public render::Job::Config {
Q_OBJECT Q_OBJECT
Q_PROPERTY(glm::vec3 hazeColor MEMBER hazeColor WRITE setHazeColor NOTIFY dirty); Q_PROPERTY(glm::vec3 hazeColor MEMBER hazeColor WRITE setHazeColor NOTIFY dirty);
Q_PROPERTY(float hazeGlareAngle_degs MEMBER hazeGlareAngle_degs WRITE setHazeGlareAngle_degs NOTIFY dirty); Q_PROPERTY(float hazeGlareAngle MEMBER hazeGlareAngle WRITE setHazeGlareAngle NOTIFY dirty);
Q_PROPERTY(glm::vec3 hazeGlareColor MEMBER hazeGlareColor WRITE setHazeGlareColor NOTIFY dirty); Q_PROPERTY(glm::vec3 hazeGlareColor MEMBER hazeGlareColor WRITE setHazeGlareColor NOTIFY dirty);
Q_PROPERTY(float hazeBaseReference_m MEMBER hazeBaseReference_m WRITE setHazeBaseReference NOTIFY dirty); Q_PROPERTY(float hazeBaseReference MEMBER hazeBaseReference WRITE setHazeBaseReference NOTIFY dirty);
Q_PROPERTY(bool isHazeActive MEMBER isHazeActive WRITE setHazeActive NOTIFY dirty); Q_PROPERTY(bool isHazeActive MEMBER isHazeActive WRITE setHazeActive NOTIFY dirty);
Q_PROPERTY(bool isAltitudeBased MEMBER isAltitudeBased WRITE setAltitudeBased NOTIFY dirty); Q_PROPERTY(bool isAltitudeBased MEMBER isAltitudeBased WRITE setAltitudeBased NOTIFY dirty);
@ -95,11 +95,11 @@ class FetchHazeConfig : public render::Job::Config {
Q_PROPERTY(bool isModulateColorActive MEMBER isModulateColorActive WRITE setModulateColorActive NOTIFY dirty); Q_PROPERTY(bool isModulateColorActive MEMBER isModulateColorActive WRITE setModulateColorActive NOTIFY dirty);
Q_PROPERTY(bool isHazeEnableGlare MEMBER isHazeEnableGlare WRITE setHazeEnableGlare NOTIFY dirty); Q_PROPERTY(bool isHazeEnableGlare MEMBER isHazeEnableGlare WRITE setHazeEnableGlare NOTIFY dirty);
Q_PROPERTY(float hazeRange_m MEMBER hazeRange_m WRITE setHazeRange_m NOTIFY dirty); Q_PROPERTY(float hazeRange MEMBER hazeRange WRITE setHazeRange NOTIFY dirty);
Q_PROPERTY(float hazeHeight_m MEMBER hazeHeight_m WRITE setHazeAltitude_m NOTIFY dirty); Q_PROPERTY(float hazeHeight MEMBER hazeHeight WRITE setHazeAltitude NOTIFY dirty);
Q_PROPERTY(float hazeKeyLightRange_m MEMBER hazeKeyLightRange_m WRITE setHazeKeyLightRange_m NOTIFY dirty); Q_PROPERTY(float hazeKeyLightRange MEMBER hazeKeyLightRange WRITE setHazeKeyLightRange NOTIFY dirty);
Q_PROPERTY(float hazeKeyLightAltitude_m MEMBER hazeKeyLightAltitude_m WRITE setHazeKeyLightAltitude_m NOTIFY dirty); Q_PROPERTY(float hazeKeyLightAltitude MEMBER hazeKeyLightAltitude WRITE setHazeKeyLightAltitude NOTIFY dirty);
Q_PROPERTY(float hazeBackgroundBlend MEMBER hazeBackgroundBlend WRITE setHazeBackgroundBlend NOTIFY dirty); Q_PROPERTY(float hazeBackgroundBlend MEMBER hazeBackgroundBlend WRITE setHazeBackgroundBlend NOTIFY dirty);
@ -107,10 +107,10 @@ public:
FetchHazeConfig() : render::Job::Config() {} FetchHazeConfig() : render::Job::Config() {}
glm::vec3 hazeColor{ model::Haze::initialHazeColor }; glm::vec3 hazeColor{ model::Haze::initialHazeColor };
float hazeGlareAngle_degs{ model::Haze::initialGlareAngle_degs }; float hazeGlareAngle{ model::Haze::initialGlareAngle };
glm::vec3 hazeGlareColor{ model::Haze::initialHazeGlareColor }; glm::vec3 hazeGlareColor{ model::Haze::initialHazeGlareColor };
float hazeBaseReference_m{ model::Haze::initialHazeBaseReference_m }; float hazeBaseReference{ model::Haze::initialHazeBaseReference };
bool isHazeActive{ false }; bool isHazeActive{ false };
bool isAltitudeBased{ false }; bool isAltitudeBased{ false };
@ -118,20 +118,20 @@ public:
bool isModulateColorActive{ false }; bool isModulateColorActive{ false };
bool isHazeEnableGlare{ false }; bool isHazeEnableGlare{ false };
float hazeRange_m{ model::Haze::initialHazeRange_m }; float hazeRange{ model::Haze::initialHazeRange };
float hazeHeight_m{ model::Haze::initialHazeHeight_m }; float hazeHeight{ model::Haze::initialHazeHeight };
float hazeKeyLightRange_m{ model::Haze::initialHazeKeyLightRange_m }; float hazeKeyLightRange{ model::Haze::initialHazeKeyLightRange };
float hazeKeyLightAltitude_m{ model::Haze::initialHazeKeyLightAltitude_m }; float hazeKeyLightAltitude{ model::Haze::initialHazeKeyLightAltitude };
float hazeBackgroundBlend{ model::Haze::initialHazeBackgroundBlend }; float hazeBackgroundBlend{ model::Haze::initialHazeBackgroundBlend };
public slots: public slots:
void setHazeColor(const glm::vec3 value) { hazeColor = value; emit dirty(); } void setHazeColor(const glm::vec3 value) { hazeColor = value; emit dirty(); }
void setHazeGlareAngle_degs(const float value) { hazeGlareAngle_degs = value; emit dirty(); } void setHazeGlareAngle(const float value) { hazeGlareAngle = value; emit dirty(); }
void setHazeGlareColor(const glm::vec3 value) { hazeGlareColor = value; emit dirty(); } void setHazeGlareColor(const glm::vec3 value) { hazeGlareColor = value; emit dirty(); }
void setHazeBaseReference(const float value) { hazeBaseReference_m = value; ; emit dirty(); } void setHazeBaseReference(const float value) { hazeBaseReference = value; ; emit dirty(); }
void setHazeActive(const bool active) { isHazeActive = active; emit dirty(); } void setHazeActive(const bool active) { isHazeActive = active; emit dirty(); }
void setAltitudeBased(const bool active) { isAltitudeBased = active; emit dirty(); } void setAltitudeBased(const bool active) { isAltitudeBased = active; emit dirty(); }
@ -139,11 +139,11 @@ public slots:
void setModulateColorActive(const bool active) { isModulateColorActive = active; emit dirty(); } void setModulateColorActive(const bool active) { isModulateColorActive = active; emit dirty(); }
void setHazeEnableGlare(const bool active) { isHazeEnableGlare = active; emit dirty(); } void setHazeEnableGlare(const bool active) { isHazeEnableGlare = active; emit dirty(); }
void setHazeRange_m(const float value) { hazeRange_m = value; emit dirty(); } void setHazeRange(const float value) { hazeRange = value; emit dirty(); }
void setHazeAltitude_m(const float value) { hazeHeight_m = value; emit dirty(); } void setHazeAltitude(const float value) { hazeHeight = value; emit dirty(); }
void setHazeKeyLightRange_m(const float value) { hazeKeyLightRange_m = value; emit dirty(); } void setHazeKeyLightRange(const float value) { hazeKeyLightRange = value; emit dirty(); }
void setHazeKeyLightAltitude_m(const float value) { hazeKeyLightAltitude_m = value; emit dirty(); } void setHazeKeyLightAltitude(const float value) { hazeKeyLightAltitude = value; emit dirty(); }
void setHazeBackgroundBlend(const float value) { hazeBackgroundBlend = value; ; emit dirty(); } void setHazeBackgroundBlend(const float value) { hazeBackgroundBlend = value; ; emit dirty(); }