/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <dali/public-api/math/vector3.h>
#include <dali/public-api/math/vector4.h>
#include <dali/public-api/object/property.h>
+#include <dali/public-api/common/extents.h>
+#include <dali/public-api/math/matrix3.h>
+#include <dali/public-api/math/matrix.h>
+#include <dali/public-api/math/rect.h>
+#include <dali/public-api/object/property-map.h>
+#include <dali/public-api/object/property-array.h>
namespace Dali
{
switch ( GetType() )
{
case Property::NONE:
+ {
+ // NOOP
+ break;
+ }
+
case Property::RECTANGLE:
+ {
+ Rect<int32_t> convertedValue;
+ if( propertyValue.Get( convertedValue ) )
+ {
+ value = convertedValue;
+ }
+ break;
+ }
+
case Property::STRING:
+ {
+ std::string convertedValue;
+ if( propertyValue.Get( convertedValue ) )
+ {
+ value = convertedValue;
+ }
+ break;
+ }
+
case Property::ARRAY:
+ {
+ Property::Array* array = propertyValue.GetArray();
+ if( array )
+ {
+ value = *array;
+ }
+ break;
+ }
+
case Property::MAP:
+ {
+ Property::Map* map = propertyValue.GetMap();
+ if( map )
+ {
+ value = *map;
+ }
+ break;
+ }
+
+ case Property::EXTENTS:
+ {
+ Extents convertedValue;
+ if( propertyValue.Get( convertedValue ) )
+ {
+ value = convertedValue;
+ }
+ break;
+ }
+
case Property::BOOLEAN:
+ {
+ bool convertedValue;
+ if( propertyValue.Get( convertedValue ) )
+ {
+ value = convertedValue;
+ }
+ break;
+ }
+
case Property::INTEGER:
+ {
+ int32_t convertedValue;
+ if( propertyValue.Get( convertedValue ) )
+ {
+ value = convertedValue;
+ }
+ break;
+ }
+
case Property::FLOAT:
+ {
+ float convertedValue;
+ if( propertyValue.Get( convertedValue ) )
+ {
+ value = convertedValue;
+ }
+ break;
+ }
+
case Property::ROTATION:
+ {
+ Quaternion convertedValue;
+ if( propertyValue.Get( convertedValue ) )
+ {
+ value = convertedValue;
+ }
+ break;
+ }
+
case Property::MATRIX:
+ {
+ Matrix convertedValue;
+ if( propertyValue.Get( convertedValue ) )
+ {
+ value = convertedValue;
+ }
+ break;
+ }
+
case Property::MATRIX3:
{
- value = propertyValue;
+ Matrix3 convertedValue;
+ if( propertyValue.Get( convertedValue ) )
+ {
+ value = convertedValue;
+ }
break;
}
case Property::STRING:
case Property::ARRAY:
case Property::MAP:
+ case Property::EXTENTS:
case Property::BOOLEAN:
case Property::INTEGER:
case Property::FLOAT:
case Property::STRING:
case Property::ARRAY:
case Property::MAP:
+ case Property::EXTENTS:
case Property::MATRIX:
case Property::MATRIX3:
{
if( componentIndex == 0 )
{
- vector4Value.x = relativePropertyValue.Get< float >();
+ vector4Value.x += relativePropertyValue.Get< float >();
}
else if( componentIndex == 1 )
{
- vector4Value.y = relativePropertyValue.Get< float >();
+ vector4Value.y += relativePropertyValue.Get< float >();
}
else if( componentIndex == 2 )
{
- vector4Value.z = relativePropertyValue.Get< float >();
+ vector4Value.z += relativePropertyValue.Get< float >();
}
else if( componentIndex == 3 )
{
- vector4Value.w = relativePropertyValue.Get< float >();
+ vector4Value.w += relativePropertyValue.Get< float >();
}
value = vector4Value;