diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2013-11-14 02:55:17 +0100 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2013-11-14 02:55:17 +0100 |
| commit | e4afc425b8140dd9cd8ddbfc9c211ab6e9e33ca2 (patch) | |
| tree | 47ab15009d924dffbf47fba470f540e62bd0c8ad /unity-shared | |
| parent | d4f635ff66012c29507ab2bec0587cd742deba20 (diff) | |
IntrospectionData: add support for nux::Point3
Fixes LP: #1227131 (bzr r3506.6.14)
Diffstat (limited to 'unity-shared')
| -rw-r--r-- | unity-shared/IntrospectionData.cpp | 7 | ||||
| -rw-r--r-- | unity-shared/IntrospectionData.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/unity-shared/IntrospectionData.cpp b/unity-shared/IntrospectionData.cpp index ca2c8dd4d..33f5e0e52 100644 --- a/unity-shared/IntrospectionData.cpp +++ b/unity-shared/IntrospectionData.cpp @@ -36,6 +36,7 @@ enum class ValueType : uint32_t COLOR = 4, DATE = 5, TIME = 6, + POINT3D = 7, }; IntrospectionData::IntrospectionData() @@ -150,6 +151,12 @@ IntrospectionData& IntrospectionData::add(std::string const& name, nux::Point co return *this; } +IntrospectionData& IntrospectionData::add(std::string const& name, nux::Point3 const& p) +{ + add_(builder_, name, ValueType::POINT3D, {Variant(p.x), Variant(p.y), Variant(p.z)}); + return *this; +} + IntrospectionData& IntrospectionData::add(std::string const& name, nux::Size const& s) { add_(builder_, name, ValueType::SIZE, {Variant(s.width), Variant(s.height)}); diff --git a/unity-shared/IntrospectionData.h b/unity-shared/IntrospectionData.h index 1fe6f1e65..f75191c98 100644 --- a/unity-shared/IntrospectionData.h +++ b/unity-shared/IntrospectionData.h @@ -24,6 +24,7 @@ #include <glib.h> #include <NuxCore/Rect.h> #include <NuxCore/Color.h> +#include <NuxCore/Math/Point3D.h> namespace unity { @@ -50,6 +51,7 @@ public: IntrospectionData& add(std::string const& name, GVariant*); IntrospectionData& add(std::string const& name, nux::Rect const&); IntrospectionData& add(std::string const& name, nux::Point const&); + IntrospectionData& add(std::string const& name, nux::Point3 const&); IntrospectionData& add(std::string const& name, nux::Size const&); IntrospectionData& add(std::string const& name, nux::Color const&); IntrospectionData& add(nux::Rect const&); |
