summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-05-10 11:42:39 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-05-15 09:45:55 -0700
commit3fa9f3c9e8fa99bef08f244755368e0879672074 (patch)
tree541afd256864f7882f186d14cb1983919acaed5d /src
parent8fb1a81c46f4358d731712c16868aa1108d5d34c (diff)
downloadqtlocation-mapboxgl-3fa9f3c9e8fa99bef08f244755368e0879672074.tar.gz
[core] Merge light_properties.hpp into light_impl.hpp
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/renderer/render_light.hpp1
-rw-r--r--src/mbgl/style/light.cpp1
-rw-r--r--src/mbgl/style/light.cpp.ejs1
-rw-r--r--src/mbgl/style/light_impl.hpp44
-rw-r--r--src/mbgl/style/light_properties.hpp51
5 files changed, 43 insertions, 55 deletions
diff --git a/src/mbgl/renderer/render_light.hpp b/src/mbgl/renderer/render_light.hpp
index ed8d8bf59c..7e0662105f 100644
--- a/src/mbgl/renderer/render_light.hpp
+++ b/src/mbgl/renderer/render_light.hpp
@@ -1,7 +1,6 @@
#pragma once
#include <mbgl/style/light_impl.hpp>
-#include <mbgl/style/light_properties.hpp>
#include <mbgl/renderer/transitioning_property.hpp>
#include <mbgl/renderer/cascade_parameters.hpp>
#include <mbgl/renderer/property_evaluator.hpp>
diff --git a/src/mbgl/style/light.cpp b/src/mbgl/style/light.cpp
index d2f91c73af..651a323da4 100644
--- a/src/mbgl/style/light.cpp
+++ b/src/mbgl/style/light.cpp
@@ -3,7 +3,6 @@
#include <mbgl/style/light.hpp>
#include <mbgl/style/light_impl.hpp>
#include <mbgl/style/light_observer.hpp>
-#include <mbgl/style/light_properties.hpp>
namespace mbgl {
namespace style {
diff --git a/src/mbgl/style/light.cpp.ejs b/src/mbgl/style/light.cpp.ejs
index 454bad49d8..e933e40b97 100644
--- a/src/mbgl/style/light.cpp.ejs
+++ b/src/mbgl/style/light.cpp.ejs
@@ -6,7 +6,6 @@
#include <mbgl/style/light.hpp>
#include <mbgl/style/light_impl.hpp>
#include <mbgl/style/light_observer.hpp>
-#include <mbgl/style/light_properties.hpp>
namespace mbgl {
namespace style {
diff --git a/src/mbgl/style/light_impl.hpp b/src/mbgl/style/light_impl.hpp
index d607cf00e5..4179c2b276 100644
--- a/src/mbgl/style/light_impl.hpp
+++ b/src/mbgl/style/light_impl.hpp
@@ -1,11 +1,53 @@
#pragma once
#include <mbgl/style/light.hpp>
-#include <mbgl/style/light_properties.hpp>
+#include <mbgl/style/property_value.hpp>
+#include <mbgl/style/transition_options.hpp>
+#include <mbgl/style/types.hpp>
+#include <mbgl/style/position.hpp>
+#include <mbgl/util/color.hpp>
+#include <mbgl/util/indexed_tuple.hpp>
namespace mbgl {
namespace style {
+template <class T>
+class LightProperty {
+public:
+ using Type = T;
+ using ValueType = PropertyValue<T>;
+
+ PropertyValue<T> value;
+ TransitionOptions transition;
+};
+
+struct LightAnchor : LightProperty<LightAnchorType> {
+ static LightAnchorType defaultValue() {
+ return LightAnchorType::Viewport;
+ }
+};
+
+struct LightPosition : LightProperty<Position> {
+ static Position defaultValue() {
+ std::array<float, 3> default_ = { { 1.15, 210, 30 } };
+ return Position{ { default_ } };
+ }
+};
+
+struct LightColor : LightProperty<Color> {
+ static Color defaultValue() {
+ return Color::white();
+ }
+};
+
+struct LightIntensity : LightProperty<float> {
+ static float defaultValue() {
+ return 0.5;
+ }
+};
+
+using LightProperties = TypeList<LightAnchor, LightPosition, LightColor, LightIntensity>;
+
class Light::Impl {
public:
IndexedTuple<LightProperties, LightProperties> properties;
diff --git a/src/mbgl/style/light_properties.hpp b/src/mbgl/style/light_properties.hpp
deleted file mode 100644
index 9f6088a633..0000000000
--- a/src/mbgl/style/light_properties.hpp
+++ /dev/null
@@ -1,51 +0,0 @@
-#pragma once
-
-#include <mbgl/style/property_value.hpp>
-#include <mbgl/style/transition_options.hpp>
-#include <mbgl/style/types.hpp>
-#include <mbgl/style/position.hpp>
-#include <mbgl/util/color.hpp>
-#include <mbgl/util/indexed_tuple.hpp>
-
-namespace mbgl {
-namespace style {
-
-template <class T>
-class LightProperty {
-public:
- using Type = T;
- using ValueType = PropertyValue<T>;
-
- PropertyValue<T> value;
- TransitionOptions transition;
-};
-
-struct LightAnchor : LightProperty<LightAnchorType> {
- static LightAnchorType defaultValue() {
- return LightAnchorType::Viewport;
- }
-};
-
-struct LightPosition : LightProperty<Position> {
- static Position defaultValue() {
- std::array<float, 3> default_ = { { 1.15, 210, 30 } };
- return Position{ { default_ } };
- }
-};
-
-struct LightColor : LightProperty<Color> {
- static Color defaultValue() {
- return Color::white();
- }
-};
-
-struct LightIntensity : LightProperty<float> {
- static float defaultValue() {
- return 0.5;
- }
-};
-
-using LightProperties = TypeList<LightAnchor, LightPosition, LightColor, LightIntensity>;
-
-} // namespace style
-} // namespace mbgl