From f6e79d70735361438655f279c8699a786d25458c Mon Sep 17 00:00:00 2001 From: Lauren Budorick Date: Thu, 27 Apr 2017 15:56:55 -0700 Subject: [core] Render fill-extrusion layers (#8431) --- include/mbgl/style/light.hpp | 52 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 include/mbgl/style/light.hpp (limited to 'include/mbgl/style/light.hpp') diff --git a/include/mbgl/style/light.hpp b/include/mbgl/style/light.hpp new file mode 100644 index 0000000000..bec8e6ddeb --- /dev/null +++ b/include/mbgl/style/light.hpp @@ -0,0 +1,52 @@ +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace mbgl { +namespace style { + +template +class LightProperty { +public: + using Type = T; + using ValueType = PropertyValue; + + PropertyValue value; + TransitionOptions transition; +}; + +struct LightAnchor : LightProperty { + static LightAnchorType defaultValue() { + return LightAnchorType::Viewport; + } +}; + +struct LightPosition : LightProperty { + static Position defaultValue() { + std::array default_ = { { 1.15, 210, 30 } }; + return Position{ { default_ } }; + } +}; + +struct LightColor : LightProperty { + static Color defaultValue() { + return Color::white(); + } +}; + +struct LightIntensity : LightProperty { + static float defaultValue() { + return 0.5; + } +}; + +using LightProperties = TypeList; +class Light : public IndexedTuple {}; + +} // namespace style +} // namespace mbgl -- cgit v1.2.1