add DynamicProperty checking module
authorDae Young Ryu <karzia@samsung.com>
Fri, 6 Sep 2013 11:57:24 +0000 (20:57 +0900)
committerDae Young Ryu <karzia@samsung.com>
Fri, 6 Sep 2013 11:57:24 +0000 (20:57 +0900)
Change-Id: Ia9336ec8f0c7cee90851de335677be3a67cca267
Signed-off-by: Dae Young Ryu <karzia@samsung.com>
src/ui/CMakeLists.txt
src/ui/animations/FUiAnim_DynamicProperty.cpp [new file with mode: 0644]
src/ui/animations/FUiAnim_DynamicProperty.h [new file with mode: 0644]
src/ui/animations/FUiAnim_GeometryInfo.cpp
src/ui/animations/FUiAnim_GlNode.cpp
src/ui/animations/FUiAnim_VisualElementEnvironment.cpp
src/ui/inc/FUiAnim_GeometryInfo.h
src/ui/inc/FUiAnim_VisualElementImpl.h

index 848d50b..ea016c8 100644 (file)
@@ -51,12 +51,13 @@ SET (${this_target}_SOURCE_FILES
        animations/FUiAnim_Waiter.cpp
     animations/FUiAnim_MeshImpl.cpp
     animations/FUiAnim_GeometryInfo.cpp
+    animations/FUiAnim_DynamicProperty.cpp
     animations/FUiAnim_MeshImportSample.cpp        
     animations/FUiAnimMesh.cpp
        animations/FUiAnim_ShaderImpl.cpp
        animations/FUiAnim_ShaderProgramImpl.cpp
        animations/FUiAnimShader.cpp
-       animations/FUiAnimShaderProgram.cpp
+       animations/FUiAnimShaderProgram.cpp     
     animations/platform/FUiAnim_NativeWindow.cpp
     animations/platform/FUiAnim_X11Window.cpp
        animations/platform/FUiAnim_GlContext.cpp
diff --git a/src/ui/animations/FUiAnim_DynamicProperty.cpp b/src/ui/animations/FUiAnim_DynamicProperty.cpp
new file mode 100644 (file)
index 0000000..c78aaef
--- /dev/null
@@ -0,0 +1,249 @@
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 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.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       FUiAnim_AnimationManager.cpp
+ * @brief      This file contains implementation of _AnimationManager class
+ *
+ * This file contains implementation _AnimationManager class.
+ */
+
+#include <wchar.h>
+
+#include <FBaseSysLog.h>
+#include <FBaseStringHashCodeProvider.h>
+#include "FUiAnim_DynamicProperty.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+
+namespace Tizen { namespace Ui { namespace Animations
+{
+
+
+
+_DynamicKeyString::_DynamicKeyString(const Tizen::Base::String& keyString)
+{
+       __name = keyString;
+       const wchar_t* pDelimiter = L".";
+
+       wchar_t temp[__name.GetLength()+1];
+
+       wcscpy(temp, __name.GetPointer());
+
+       wchar_t* pSrc = temp;
+       wchar_t* pToken = null;
+
+       do
+       {
+               pToken = wcstok(pSrc, pDelimiter, &pSrc);
+
+               if(pToken)
+               {
+                       if(pToken[0] == '#')
+                       {
+                               __subStrings.Add(String(&pToken[1]));
+                       }
+               }
+       }while(pToken);
+}
+
+_DynamicKeyString::_DynamicKeyString(const wchar_t* pKeyString)
+{
+       __name.Append(pKeyString);
+       const wchar_t* pDelimiter = L".";
+
+
+       wchar_t temp[__name.GetLength()+1];
+
+       wcscpy(temp, __name.GetPointer());
+
+       wchar_t* pSrc = temp;
+       wchar_t* pToken = null;
+
+       do
+       {
+               pToken = wcstok(pSrc, pDelimiter, &pSrc);
+
+               if(pToken)
+               {
+                       if(pToken[0] == '#')
+                       {
+                               __subStrings.Add(String(&pToken[1]));
+                       }
+               }
+       }while(pToken);
+}
+
+bool
+_DynamicKeyString::Equals(const Tizen::Base::String& comparekey) const
+{
+       const wchar_t* pSrc = __name.GetPointer();
+       const wchar_t* pDst = comparekey.GetPointer();
+
+       for(int i = 0, j = 0; pSrc[i]!=0 && pDst[j]!=0;i++,j++)
+       {
+               if(pSrc[i] == '#')
+               {
+                       for( ;pSrc[i] != 0;i++)
+                       {
+                               if(pSrc[i] == '.')
+                                       break;
+                       }
+
+               }
+               if(pDst[j] == '#')
+               {
+                       for( ;pDst[j] != 0;j++)
+                       {
+                               if(pDst[j] == '.')
+                                       break;
+                       }
+               }
+               if(pSrc[i] != pDst[j])
+                       return false;
+       }
+       return true;
+}
+
+const Tizen::Base::String
+_DynamicKeyString::GetSubString(int index) const
+{
+       String resString;
+       if(__subStrings.GetAt(index, resString) != E_SUCCESS)
+       {
+       }
+       return resString;
+}
+
+
+
+
+static wchar_t __valueString[1024];
+
+_DyanamicPropertyString::_DyanamicPropertyString(_DynamicKeyString& keyString, const Tizen::Base::String& property)
+       :__keyString(keyString)
+{
+       __isAvailable = __keyString.Equals(property);
+       static ComparerT<String> comparer;
+       static StringHashCodeProvider strHashCodeProvider;
+
+       __map.Construct(16, 0.75, strHashCodeProvider, comparer);
+
+       if(__isAvailable == true)
+       {
+
+               int count  = __keyString.GetSubStringCount();
+               int subIndex = 0;
+
+               const wchar_t* pDst = property.GetPointer();
+
+               for(int j = 0 ; pDst[j]!=0 ; j++)
+               {
+                       if(pDst[j] == '#')
+                       {
+                               if(subIndex >= count)
+                               {
+                                       // error
+                                       __isAvailable = false;
+                                       return;
+                               }
+                               const String& keyName = __keyString.GetSubString(subIndex);
+                               if(keyName.IsEmpty())
+                               {
+                                       // error
+                                       __isAvailable = false;
+                                       return;
+                               }
+
+                               j++;
+                               __valueString[0] = 0;
+                               int i = 0;
+                               for( ; pDst[j] != 0 ; j++, i++)
+                               {
+                                       if(pDst[j] == '.')
+                                               break;
+                                       __valueString[i] = pDst[j];
+                               }
+                               __valueString[i+1] = 0;
+                               __map.Add(keyName , String(__valueString));
+                               subIndex++;
+                       }
+               }
+
+       }
+}
+
+Tizen::Base::String
+_DyanamicPropertyString::GetValue(const Tizen::Base::String& key) const
+{
+       if(!__isAvailable)
+       {
+               return null;
+       }
+
+       bool out = false;
+
+       __map.ContainsKey(key,out);
+       if(out != true)
+       {
+               return null;
+       }
+
+       String value;
+
+       __map.GetValue(key, value);
+       return value;
+
+
+
+//     if(__map.find(key) == __map.end())
+//             return null;
+
+//     return &__map.at(key);
+}
+
+
+result
+_DyanamicPropertyString::GetValueToInteger(const Tizen::Base::String& key, long& value) const
+{
+       if(!__isAvailable)
+       {
+               return null;
+       }
+
+       bool out = false;
+
+       __map.ContainsKey(key,out);
+       if(out != true)
+       {
+               return null;
+       }
+
+       String valueStr;
+
+       __map.GetValue(key, valueStr);
+       if(valueStr.IsEmpty())
+       {
+               return E_INVALID_ARG;
+       }
+       value = wcstol(valueStr.GetPointer(), NULL, 10);
+
+       return E_SUCCESS;
+}
+
+}}}   // Tizen::Ui::Animations
diff --git a/src/ui/animations/FUiAnim_DynamicProperty.h b/src/ui/animations/FUiAnim_DynamicProperty.h
new file mode 100644 (file)
index 0000000..c42c8e7
--- /dev/null
@@ -0,0 +1,90 @@
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 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.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       FUiAnim_DynamicProperty.h
+ * @brief      This is the header file for the _DynamicKeyString class.
+ *
+ * This header file contains the declarations of the _DynamicKeyString class.
+ */
+
+#ifndef _FUI_ANIM_INTERNAL_DYNAMIC_PROPERTY_H_
+#define _FUI_ANIM_INTERNAL_DYNAMIC_PROPERTY_H_
+
+#include <FOspConfig.h>
+#include <FBaseErrorDefine.h>
+#include <FBaseColArrayListT.h>
+#include <FBaseColHashMapT.h>
+
+#include <map>
+
+namespace Tizen { namespace Ui { namespace Animations
+{
+
+//keyString rule : '.' = token , '#' = name
+
+class _DynamicKeyString : public Tizen::Base::Object
+{
+public:
+       explicit _DynamicKeyString(const Tizen::Base::String& keyString);
+       explicit _DynamicKeyString(const wchar_t* pKeyString);
+
+       int GetSubStringCount() const
+       {
+               return __subStrings.GetCount();
+       }
+
+       const Tizen::Base::String GetKeyString() const
+       {
+               return __name;
+       }
+       const Tizen::Base::String GetSubString(int index) const;
+
+       virtual bool Equals(const Tizen::Base::String& comparekey)const;
+
+private:
+       Tizen::Base::String __name;
+       Tizen::Base::Collection::ArrayListT<Tizen::Base::String> __subStrings;
+};
+
+
+class _DyanamicPropertyString: public Tizen::Base::Object
+{
+public:
+       explicit _DyanamicPropertyString(_DynamicKeyString& keyString, const Tizen::Base::String& property);
+       Tizen::Base::String GetValue(const Tizen::Base::String& key) const;
+       result GetValueToInteger(const Tizen::Base::String& key, long& value) const;
+
+       bool IsAvailable() const
+       {
+               return __isAvailable;
+       }
+
+private:
+       _DynamicKeyString& __keyString;
+
+       Tizen::Base::Collection::HashMapT<Tizen::Base::String, Tizen::Base::String> __map;
+       bool __isAvailable;
+
+//     std::map<Tizen::Base::String, Tizen::Base::String> __map;
+};
+
+
+}}}            // Tizen::Ui::Animations
+
+#endif //_FUI_ANIM_INTERNAL_ANIMATION_MANAGER_H_
+
index 1077931..984faf3 100644 (file)
 #include <FUiAnimMesh.h>
 
 #include "FUiAnim_VisualElementImpl.h"
-#include "FUiAnim_GeometryInfo.h"
 #include "FUiAnim_ShaderProgramImpl.h"
+#include "FUiAnim_DynamicProperty.h"
+#include "FUiAnim_GeometryInfo.h"
 
+#include <stdio.h>
 
-#define PRINT(...) fprintf(stderr, __VA_ARGS__)
+
+//#define PRINT(FMT__,...) print(FMT__, __VA_ARGS__)
 //#define PRINT(...) SysLog(NID_UI_ANIM, __VA_ARGS__)
 //#define PRINT(...)
 
+void PRINT(const char* format ,...)
+{
+       va_list arg;
+       va_start(arg,format);
+       vfprintf(stderr,format, arg);
+       va_end(arg);
+}
+
 
 using namespace Tizen::Base;
 
 namespace Tizen { namespace Ui { namespace Animations{
 
+// 3.0 properties
+extern _DynamicKeyString* pVeMeshPropVertexCount;
+extern _DynamicKeyString* pVeMeshPropVertex;
+extern _DynamicKeyString* pVeMeshPropColor;
+extern _DynamicKeyString* pVeMeshPropTextureCoord;
+extern _DynamicKeyString* pVeMeshPropNormal;
+extern _DynamicKeyString* pVeMeshPropVertexIndex;
+extern _DynamicKeyString* pVeMeshPropBoneCount;
+extern _DynamicKeyString* pVeMeshPropBone;
+extern _DynamicKeyString* pVeMeshPropBoneIndex;
+extern _DynamicKeyString* pVeMeshPropBoneWeight;
+
+extern _DynamicKeyString* pVeMaterialDiffuse;
+extern _DynamicKeyString* pVeMaterialSpecular;
+extern _DynamicKeyString* pVeMaterialAmbient;
+extern _DynamicKeyString* pVeMaterialEmissive;
+extern _DynamicKeyString* pVeMaterialShiness;
+
+// is it needed ?
+extern _DynamicKeyString* pVeShadowColor;
+
+extern _DynamicKeyString* pVeLightCount;
+extern _DynamicKeyString* pVeLightType;
+extern _DynamicKeyString* pVeLightDiffuse;
+extern _DynamicKeyString* pVeLightSpecular;
+extern _DynamicKeyString* pVeLightAmbient;
+extern _DynamicKeyString* pVeLightPosition;
+extern _DynamicKeyString* pVeLightDirection;
+extern _DynamicKeyString* pVeLightExponent;
+extern _DynamicKeyString* pVeLightCutOff;
+extern _DynamicKeyString* pVeLightConstantAttenuation;
+extern _DynamicKeyString* pVeLightLinearAttenuation;
+extern _DynamicKeyString* pVeLightQuadraticAttenuation;
+// need to design
+//extern _DynamicKeyString* pVeShaderUniform;
+
 _GeometryInfo::_GeometryInfo()
        : __pMesh(null)
        , __pShaderProgram(null)
+       , __isMeshUpdated(false)
+       , __isLightUpdated(false)
+       , __isMaterialUpdated(false)
+       , __isShaderProgramUpdated(false)
 {
+
 }
 
 _GeometryInfo::~_GeometryInfo()
@@ -69,6 +121,7 @@ _GeometryInfo::SetMesh(Mesh* pMesh)
                        __pMesh = null;
                }
        }
+       __isMeshUpdated = true;
 }
 
 Mesh*
@@ -96,6 +149,7 @@ _GeometryInfo::SetShaderProgram(ShaderProgram* pShaderProgram)
        }
 
        __pShaderProgram = pShaderProgram;
+       __isShaderProgramUpdated = true;
 
        return E_SUCCESS;
 }
@@ -105,13 +159,797 @@ _GeometryInfo::GetShaderProgram(void)
 {
        return __pShaderProgram;
 }
+result
+_GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& value)
+{
+       //TODO : implementation
+       int index = 0;
+       static const String mesh(L"mesh");
+       static const String material(L"material");
+       static const String light(L"light");
+       _DynamicKeyString* pKeyString = null;
+
+       PRINT("property:%ls\n",property.GetPointer());
+
+       // is it needed ?
+
+       if(property.IndexOf(mesh, 0, index) == E_SUCCESS)
+       {
+               if(!__pMesh)
+               {
+                       return E_OBJ_NOT_FOUND;
+               }
+
+
+               bool check = pVeMeshPropVertex->Equals(property);
+               PRINT("property check :%ls : %d -> %ls\n",property.GetPointer(), check,pVeMeshPropVertex->GetKeyString().GetPointer());
+
+               if(pVeMeshPropVertexCount->Equals(property))
+               {
+                       PRINT("SetProperty:%ls\n",property.GetPointer());
+               }
+               else if(pVeMeshPropVertex->Equals(property))
+               {
+                       pKeyString = pVeMeshPropVertex;
+                       PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+                       PRINT("SetProperty:[%ls]\n", pKeyString->GetKeyString().GetPointer());
+
+                       if(value.GetType() != VARIANT_TYPE_FLOAT_POINT3)
+                       {
+                               return E_INVALID_ARG;
+                       }
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS)
+                       {
+                               __pMesh->SetVertex(index, value.ToFloatPoint3());
+                               return E_SUCCESS;
+                       }
+               }
+               else if(pVeMeshPropColor->Equals(property))
+               {
+                       pKeyString = pVeMeshPropColor;
+                       PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       if(value.GetType() != VARIANT_TYPE_COLOR)
+                       {
+                               return E_INVALID_ARG;
+                       }
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS)
+                       {
+                               __pMesh->SetColor(index, value.ToColor());
+                               return E_SUCCESS;
+                       }
+                       return E_INVALID_ARG;
+               }
+               else if(pVeMeshPropTextureCoord->Equals(property))
+               {
+
+                       pKeyString = pVeMeshPropTextureCoord;
+                       PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       if(value.GetType() != VARIANT_TYPE_FLOAT_DIMENSION)
+                       {
+                               return E_INVALID_ARG;
+                       }
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS)
+                       {
+                               __pMesh->SetTextureCoord(index, value.ToFloatPoint());
+                               return E_SUCCESS;
+                       }
+                       return E_INVALID_ARG;
+               }
+               else if(pVeMeshPropNormal->Equals(property))
+               {
+                       pKeyString = pVeMeshPropNormal;
+                       PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       if(value.GetType() != VARIANT_TYPE_FLOAT_POINT3)
+                       {
+                               return E_INVALID_ARG;
+                       }
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS)
+                       {
+
+                               __pMesh->SetNormal(index, value.ToFloatPoint3());
+                               return E_SUCCESS;
+                       }
+
+               }
+               else if(pVeMeshPropVertexIndex->Equals(property))
+               {
+                       pKeyString = pVeMeshPropVertexIndex;
+                       PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       if(value.GetType() != VARIANT_TYPE_INT)
+                       {
+                               return E_INVALID_ARG;
+                       }
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS)
+                       {
+
+                               __pMesh->SetIndex(index, value.ToInt());
+                               return E_SUCCESS;
+                       }
+               }
+               else if(pVeMeshPropBoneCount->Equals(property))
+               {
+                       PRINT("SetProperty:%ls\n",property.GetPointer());
+               }
+               else if(pVeMeshPropBone->Equals(property))
+               {
+                       pKeyString = pVeMeshPropBone;
+                       PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       if(value.GetType() != VARIANT_TYPE_FLOAT_POINT3)
+                       {
+                               return E_INVALID_ARG;
+                       }
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               return E_SUCCESS;
+                       }
+               }
+               else if(pVeMeshPropBoneIndex->Equals(property))
+               {
+                       pKeyString = pVeMeshPropBoneIndex;
+                       PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       if(value.GetType() != VARIANT_TYPE_INT)
+                       {
+                               return E_INVALID_ARG;
+                       }
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               return E_SUCCESS;
+                       }
+               }
+               else if(pVeMeshPropBoneWeight->Equals(property))
+               {
+                       pKeyString = pVeMeshPropBoneWeight;
+                       PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       if(value.GetType() != VARIANT_TYPE_INT)
+                       {
+                               return E_INVALID_ARG;
+                       }
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               return E_SUCCESS;
+                       }
+               }
+               else
+               {
+                       return E_INVALID_ARG;
+               }
+       }
+       else if(property.IndexOf(material, 0, index) == E_SUCCESS)
+       {
+
+               if(pVeMaterialDiffuse->Equals(property))
+               {
+                       PRINT("SetProperty:%ls\n",property.GetPointer());
+               }
+               else if(pVeMaterialSpecular->Equals(property))
+               {
+                       PRINT("SetProperty:%ls\n",property.GetPointer());
+               }
+               else if(pVeMaterialAmbient->Equals(property))
+               {
+                       PRINT("SetProperty:%ls\n",property.GetPointer());
+               }
+               else if(pVeMaterialEmissive->Equals(property))
+               {
+                       PRINT("SetProperty:%ls\n",property.GetPointer());
+               }
+               else if(pVeMaterialShiness->Equals(property))
+               {
+                       PRINT("SetProperty:%ls\n",property.GetPointer());
+               }
+               else
+               {
+                       return E_INVALID_ARG;
+               }
+       }
+       else if(property.IndexOf(light, 0, index) == E_SUCCESS)
+       {
+
+               if(pVeLightCount->Equals(property))
+               {
+                       PRINT("SetProperty:%ls\n",property.GetPointer());
+               }
+               else if(pVeLightType->Equals(property))
+               {
+                       pKeyString = pVeLightType;
+                       PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       if(value.GetType() != VARIANT_TYPE_INT)
+                       {
+                               return E_INVALID_ARG;
+                       }
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               return E_SUCCESS;
+                       }
+
+               }
+               else if(pVeLightDiffuse->Equals(property))
+               {
+                       pKeyString = pVeLightDiffuse;
+                       PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       if(value.GetType() != VARIANT_TYPE_INT)
+                       {
+                               return E_INVALID_ARG;
+                       }
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               return E_SUCCESS;
+                       }
+
+               }
+               else if(pVeLightSpecular->Equals(property))
+               {
+                       pKeyString = pVeLightSpecular;
+                       PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
 
+                       if(value.GetType() != VARIANT_TYPE_INT)
+                       {
+                               return E_INVALID_ARG;
+                       }
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               return E_SUCCESS;
+                       }
+
+               }
+               else if(pVeLightAmbient->Equals(property))
+               {
+                       pKeyString = pVeLightAmbient;
+                       PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       if(value.GetType() != VARIANT_TYPE_INT)
+                       {
+                               return E_INVALID_ARG;
+                       }
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               return E_SUCCESS;
+                       }
+
+               }
+               else if(pVeLightPosition->Equals(property))
+               {
+                       pKeyString = pVeLightPosition;
+                       PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       if(value.GetType() != VARIANT_TYPE_INT)
+                       {
+                               return E_INVALID_ARG;
+                       }
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               return E_SUCCESS;
+                       }
+
+               }
+               else if(pVeLightDirection->Equals(property))
+               {
+                       pKeyString = pVeLightDirection;
+                       PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       if(value.GetType() != VARIANT_TYPE_INT)
+                       {
+                               return E_INVALID_ARG;
+                       }
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               return E_SUCCESS;
+                       }
+
+               }
+               else if(pVeLightExponent->Equals(property))
+               {
+                       pKeyString = pVeLightExponent;
+                       PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       if(value.GetType() != VARIANT_TYPE_INT)
+                       {
+                               return E_INVALID_ARG;
+                       }
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               return E_SUCCESS;
+                       }
+
+               }
+               else if(pVeLightCutOff->Equals(property))
+               {
+                       pKeyString = pVeLightCutOff;
+                       PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       if(value.GetType() != VARIANT_TYPE_INT)
+                       {
+                               return E_INVALID_ARG;
+                       }
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS)
+                       {
 
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               return E_SUCCESS;
+                       }
+
+               }
+               else if(pVeLightConstantAttenuation->Equals(property))
+               {
+                       pKeyString = pVeLightConstantAttenuation;
+                       PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       if(value.GetType() != VARIANT_TYPE_INT)
+                       {
+                               return E_INVALID_ARG;
+                       }
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               return E_SUCCESS;
+                       }
+
+               }
+               else if(pVeLightLinearAttenuation->Equals(property))
+               {
+                       pKeyString = pVeLightLinearAttenuation;
+                       PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       if(value.GetType() != VARIANT_TYPE_INT)
+                       {
+                               return E_INVALID_ARG;
+                       }
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               return E_SUCCESS;
+                       }
+
+               }
+               else if(pVeLightQuadraticAttenuation->Equals(property))
+               {
+                       pKeyString = pVeLightQuadraticAttenuation;
+                       PRINT("SetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       if(value.GetType() != VARIANT_TYPE_INT)
+                       {
+                               return E_INVALID_ARG;
+                       }
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               return E_SUCCESS;
+                       }
+               }
+       }
+       return E_OUT_OF_RANGE;
+}
+
+Variant
+_GeometryInfo::GetProperty(const Tizen::Base::String& property) const
+{
+       //TODO : implementation
+       int index = 0;
+       static const String mesh(L"mesh");
+       static const String material(L"material");
+       static const String light(L"light");
+       _DynamicKeyString* pKeyString = null;
+
+       PRINT("property:%ls\n",property.GetPointer());
+
+       // is it needed ?
+
+       if(property.IndexOf(mesh, 0, index) == E_SUCCESS)
+       {
+               if(!__pMesh)
+               {
+                       goto ERROR_RETURN;
+               }
+
+               if(pVeMeshPropVertexCount->Equals(property))
+               {
+                       PRINT("GetProperty:%ls\n",property.GetPointer());
+               }
+               else if(pVeMeshPropVertex->Equals(property))
+               {
+                       pKeyString = pVeMeshPropVertexCount;
+                       PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS)
+                       {
+                               return __pMesh->GetVertex(index);
+                       }
+               }
+               else if(pVeMeshPropColor->Equals(property))
+               {
+                       pKeyString = pVeMeshPropColor;
+                       PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS)
+                       {
+                               return __pMesh->GetColor(index);
+                       }
+               }
+               else if(pVeMeshPropTextureCoord->Equals(property))
+               {
+
+                       pKeyString = pVeMeshPropTextureCoord;
+                       PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS)
+                       {
+                               return __pMesh->GetTextureCoord(index);
+                       }
+               }
+               else if(pVeMeshPropNormal->Equals(property))
+               {
+                       pKeyString = pVeMeshPropNormal;
+                       PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS)
+                       {
+                               return __pMesh->GetNormal(index);
+                       }
+
+               }
+               else if(pVeMeshPropVertexIndex->Equals(property))
+               {
+                       pKeyString = pVeMeshPropVertexIndex;
+                       PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS)
+                       {
+                               return __pMesh->GetIndex(index);
+                       }
+               }
+               else if(pVeMeshPropBoneCount->Equals(property))
+               {
+                       PRINT("GetProperty:%ls\n",property.GetPointer());
+               }
+               else if(pVeMeshPropBone->Equals(property))
+               {
+                       pKeyString = pVeMeshPropBone;
+                       PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               goto ERROR_RETURN;
+                       }
+               }
+               else if(pVeMeshPropBoneIndex->Equals(property))
+               {
+                       pKeyString = pVeMeshPropBoneIndex;
+                       PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               goto ERROR_RETURN;
+                       }
+               }
+               else if(pVeMeshPropBoneWeight->Equals(property))
+               {
+                       pKeyString = pVeMeshPropBoneWeight;
+                       PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"index"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               goto ERROR_RETURN;
+                       }
+               }
+       }
+       else if(property.IndexOf(material, 0, index) == E_SUCCESS)
+       {
+
+               if(pVeMaterialDiffuse->Equals(property))
+               {
+                       PRINT("GetProperty:%ls\n",property.GetPointer());
+               }
+               else if(pVeMaterialSpecular->Equals(property))
+               {
+                       PRINT("GetProperty:%ls\n",property.GetPointer());
+               }
+               else if(pVeMaterialAmbient->Equals(property))
+               {
+                       PRINT("GetProperty:%ls\n",property.GetPointer());
+               }
+               else if(pVeMaterialEmissive->Equals(property))
+               {
+                       PRINT("GetProperty:%ls\n",property.GetPointer());
+               }
+               else if(pVeMaterialShiness->Equals(property))
+               {
+                       PRINT("GetProperty:%ls\n",property.GetPointer());
+               }
+       }
+       else if(property.IndexOf(light, 0, index) == E_SUCCESS)
+       {
+
+               if(pVeLightCount->Equals(property))
+               {
+                       PRINT("GetProperty:%ls\n",property.GetPointer());
+               }
+               else if(pVeLightType->Equals(property))
+               {
+                       pKeyString = pVeLightType;
+                       PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               goto ERROR_RETURN;
+                       }
+
+               }
+               else if(pVeLightDiffuse->Equals(property))
+               {
+                       pKeyString = pVeLightDiffuse;
+                       PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               goto ERROR_RETURN;
+                       }
+
+               }
+               else if(pVeLightSpecular->Equals(property))
+               {
+                       pKeyString = pVeLightSpecular;
+                       PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               goto ERROR_RETURN;
+                       }
+
+               }
+               else if(pVeLightAmbient->Equals(property))
+               {
+                       pKeyString = pVeLightAmbient;
+                       PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               goto ERROR_RETURN;
+                       }
+
+               }
+               else if(pVeLightPosition->Equals(property))
+               {
+                       pKeyString = pVeLightPosition;
+                       PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               goto ERROR_RETURN;
+                       }
+
+               }
+               else if(pVeLightDirection->Equals(property))
+               {
+                       pKeyString = pVeLightDirection;
+                       PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               goto ERROR_RETURN;
+                       }
+
+               }
+               else if(pVeLightExponent->Equals(property))
+               {
+                       pKeyString = pVeLightExponent;
+                       PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               goto ERROR_RETURN;
+                       }
+
+               }
+               else if(pVeLightCutOff->Equals(property))
+               {
+                       pKeyString = pVeLightCutOff;
+                       PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               goto ERROR_RETURN;
+                       }
+
+               }
+               else if(pVeLightConstantAttenuation->Equals(property))
+               {
+                       pKeyString = pVeLightConstantAttenuation;
+                       PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               goto ERROR_RETURN;
+                       }
+
+               }
+               else if(pVeLightLinearAttenuation->Equals(property))
+               {
+                       pKeyString = pVeLightLinearAttenuation;
+                       PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               goto ERROR_RETURN;
+                       }
+
+               }
+               else if(pVeLightQuadraticAttenuation->Equals(property))
+               {
+                       pKeyString = pVeLightQuadraticAttenuation;
+                       PRINT("GetProperty:[%ls] %ls\n", pKeyString->GetKeyString().GetPointer(), property.GetPointer());
+
+                       long index = -1;
+                       _DyanamicPropertyString prop(*pKeyString, property);
+                       if(prop.GetValueToInteger(String(L"name"), index) == E_SUCCESS)
+                       {
+
+                               //__pMesh->SetBone(index, value.ToFloatPoint3());
+                               goto ERROR_RETURN;
+                       }
+               }
+       }
+
+ERROR_RETURN:
+       return Variant();
+}
+#if 0
 result
 _GeometryInfo::SetProperty(const Tizen::Base::String& property, const Variant& value)
 {
        //TODO : implementation
-       //TODO : implementation
        int index = 0;
        static const String mesh(L"mesh");
        static const String material(L"material");
@@ -387,8 +1225,7 @@ _GeometryInfo::GetProperty(const Tizen::Base::String& property) const
                }
        }
        return Variant();
-
 }
-
+#endif
 
 }}} //namespace Tizen { namespace Ui { namespace Animations{
index 4ec68b1..5f67898 100644 (file)
@@ -371,13 +371,16 @@ _GlNode::SyncStatus(VisualElementSurface* pSurface, _VisualElementImpl& element)
                }
                else
                {
-                       // TODO: implement
-                       _MeshImpl* pImpl = _MeshImpl::GetInstance(*pMesh);
-                       _MeshImpl* pOldImpl = _MeshImpl::GetInstance(*__pMesh);
-                       if(pImpl != pOldImpl)
+                       if(element.GetSharedData().geometry.IsMeshUpdated())
                        {
-                               delete __pMesh;
-                               __pMesh = new (std::nothrow) Mesh(*pMesh);
+                               // TODO: implement
+//                             _MeshImpl* pImpl = _MeshImpl::GetInstance(*pMesh);
+//                             _MeshImpl* pOldImpl = _MeshImpl::GetInstance(*__pMesh);
+//                             if(pImpl != pOldImpl)
+                               {
+                                       delete __pMesh;
+                                       __pMesh = new (std::nothrow) Mesh(*pMesh);
+                               }
                        }
                }
 
index 65f2bd7..cbdd51d 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "FUiAnim_VisualElementCoordinateSystem.h"
 #include "FUiAnim_VisualElementImpl.h"
+#include "FUiAnim_DynamicProperty.h"
 #include "FUiAnim_VisualElementEnvironment.h"
 #include "FUiAnim_Mutex.h"
 
@@ -116,15 +117,15 @@ const wchar_t* VePrivPropShowOpacity                                              = L"__showOpacity";
 
 // 3.0 properties
 const wchar_t* VeMeshPropVertexCount                           = L"mesh.vertex.count";                                 //int
-const wchar_t* VeMeshPropVertex                                                = L"mesh.vertex.";                                              //FloatPoint3
-const wchar_t* VeMeshPropColor                                         = L"mesh.color.";                                               //Color ( FloatColor will be needed )
-const wchar_t* VeMeshPropTextureCoord                          = L"mesh.textureCoordinates.";                  //FloatDimension
-const wchar_t* VeMeshPropNormal                                                = L"mesh.normal.";                                              //FloatPoint3
-const wchar_t* VeMeshPropVertexIndex                           = L"mesh.index.";                                               //int
+const wchar_t* VeMeshPropVertex                                                = L"mesh.vertex.#index";                                                //FloatPoint3
+const wchar_t* VeMeshPropColor                                         = L"mesh.color.#index";                                         //Color ( FloatColor will be needed )
+const wchar_t* VeMeshPropTextureCoord                          = L"mesh.textureCoordinates.#index";                    //FloatDimension
+const wchar_t* VeMeshPropNormal                                                = L"mesh.normal.#index";                                                //FloatPoint3
+const wchar_t* VeMeshPropVertexIndex                           = L"mesh.index.#index";                                         //int
 const wchar_t* VeMeshPropBoneCount                                     = L"mesh.bone.count";                                   //int
-const wchar_t* VeMeshPropBone                                          = L"mesh.bone.";                                                //FloatMatrix4
-const wchar_t* VeMeshPropBoneIndex                                     = L"mesh.bone.index.";                                  //int
-const wchar_t* VeMeshPropBoneWeight                                    = L"mesh.bone.weight.";                                 //float
+const wchar_t* VeMeshPropBone                                          = L"mesh.bone.#index";                                          //FloatMatrix4
+const wchar_t* VeMeshPropBoneIndex                                     = L"mesh.bone.index.#index";                                    //int
+const wchar_t* VeMeshPropBoneWeight                                    = L"mesh.bone.weight.#index";                                   //float
 
 const wchar_t* VeMaterialDiffuse                                       = L"material.diffuse";                                  //FloatVector4
 const wchar_t* VeMaterialSpecular                                      = L"material.specular";                                 //FloatVector4
@@ -136,17 +137,17 @@ const wchar_t* VeMaterialShiness                                  = L"material.shiness";                                  //float
 const wchar_t* VeShadowColor                                           = L"shadow.color";                                              //FloatVector4
 
 const wchar_t* VeLightCount                                                    = L"light.count";                                               //int
-const wchar_t* VeLightType                                                     = L"light#.type";                                               //int : LightType
-const wchar_t* VeLightDiffuse                                          = L"light#.diffuse";                                    //FloatVector4
-const wchar_t* VeLightSpecular                                         = L"light#.specular";                                   //FloatVector4
-const wchar_t* VeLightAmbient                                          = L"light#.ambient";                                    //FloatVector4
-const wchar_t* VeLightPosition                                         = L"light#.position";                                   //FloatPoint3
-const wchar_t* VeLightDirection                                                = L"light#.direction";                                  //FloatVector4
-const wchar_t* VeLightExponent                                         = L"light#.exponent";                                   //float
-const wchar_t* VeLightCutOff                                           = L"light#.cutOff";                                             //float
-const wchar_t* VeLightConstantAttenuation                      = L"light#.constantAttenuation";                //float
-const wchar_t* VeLightLinearAttenuation                                = L"light#.linearAttenuation";                  //float
-const wchar_t* VeLightQuadraticAttenuation                     = L"light#.quadraticAttenuation";               //float
+const wchar_t* VeLightType                                                     = L"light.#name.type";                                          //int : LightType
+const wchar_t* VeLightDiffuse                                          = L"light.#name.diffuse";                                       //FloatVector4
+const wchar_t* VeLightSpecular                                         = L"light.#name.specular";                                      //FloatVector4
+const wchar_t* VeLightAmbient                                          = L"light.#name.ambient";                                       //FloatVector4
+const wchar_t* VeLightPosition                                         = L"light.#name.position";                                      //FloatPoint3
+const wchar_t* VeLightDirection                                                = L"light.#name.direction";                                     //FloatVector4
+const wchar_t* VeLightExponent                                         = L"light.#name.exponent";                                      //float
+const wchar_t* VeLightCutOff                                           = L"light.#name.cutOff";                                                //float
+const wchar_t* VeLightConstantAttenuation                      = L"light.#name.constantAttenuation";           //float
+const wchar_t* VeLightLinearAttenuation                                = L"light.#name.linearAttenuation";                     //float
+const wchar_t* VeLightQuadraticAttenuation                     = L"light.#name.quadraticAttenuation";          //float
 
 // need to design
 //const wchar_t* VeShaderUniform                                               = L"Shader#.uniform#.";                                 //...
@@ -231,42 +232,76 @@ String* pVePrivPropShowOpacity                                            = null;
 
 
 
+//// 3.0 properties
+//String* pVeMeshPropVertexCount                               = null;
+//String* pVeMeshPropVertex                                    = null;
+//String* pVeMeshPropColor                                     = null;
+//String* pVeMeshPropTextureCoord                              = null;
+//String* pVeMeshPropNormal                                    = null;
+//String* pVeMeshPropVertexIndex                               = null;
+//String* pVeMeshPropBoneCount                         = null;
+//String* pVeMeshPropBone                                              = null;
+//String* pVeMeshPropBoneIndex                         = null;
+//String* pVeMeshPropBoneWeight                                = null;
+
+//String* pVeMaterialDiffuse                                   = null;
+//String* pVeMaterialSpecular                                  = null;
+//String* pVeMaterialAmbient                                   = null;
+//String* pVeMaterialEmissive                                  = null;
+//String* pVeMaterialShiness                                   = null;
+
+//// is it needed ?
+//String* pVeShadowColor                                               = null;
+
+//String* pVeLightCount                                                = null;
+//String* pVeLightType                                         = null;
+//String* pVeLightDiffuse                                              = null;
+//String* pVeLightSpecular                                     = null;
+//String* pVeLightAmbient                                              = null;
+//String* pVeLightPosition                                     = null;
+//String* pVeLightDirection                                    = null;
+//String* pVeLightExponent                                     = null;
+//String* pVeLightCutOff                                               = null;
+//String* pVeLightConstantAttenuation                  = null;
+//String* pVeLightLinearAttenuation                    = null;
+//String* pVeLightQuadraticAttenuation         = null;
+
+
 // 3.0 properties
-String* pVeMeshPropVertexCount                         = null;
-String* pVeMeshPropVertex                                      = null;
-String* pVeMeshPropColor                                       = null;
-String* pVeMeshPropTextureCoord                                = null;
-String* pVeMeshPropNormal                                      = null;
-String* pVeMeshPropVertexIndex                         = null;
-String* pVeMeshPropBoneCount                           = null;
-String* pVeMeshPropBone                                                = null;
-String* pVeMeshPropBoneIndex                           = null;
-String* pVeMeshPropBoneWeight                          = null;
-
-String* pVeMaterialDiffuse                                     = null;
-String* pVeMaterialSpecular                                    = null;
-String* pVeMaterialAmbient                                     = null;
-String* pVeMaterialEmissive                                    = null;
-String* pVeMaterialShiness                                     = null;
+_DynamicKeyString* pVeMeshPropVertexCount                              = null;
+_DynamicKeyString* pVeMeshPropVertex                                   = null;
+_DynamicKeyString* pVeMeshPropColor                                    = null;
+_DynamicKeyString* pVeMeshPropTextureCoord                             = null;
+_DynamicKeyString* pVeMeshPropNormal                                   = null;
+_DynamicKeyString* pVeMeshPropVertexIndex                              = null;
+_DynamicKeyString* pVeMeshPropBoneCount                                = null;
+_DynamicKeyString* pVeMeshPropBone                                             = null;
+_DynamicKeyString* pVeMeshPropBoneIndex                                = null;
+_DynamicKeyString* pVeMeshPropBoneWeight                               = null;
+
+_DynamicKeyString* pVeMaterialDiffuse                                  = null;
+_DynamicKeyString* pVeMaterialSpecular                                 = null;
+_DynamicKeyString* pVeMaterialAmbient                                  = null;
+_DynamicKeyString* pVeMaterialEmissive                                 = null;
+_DynamicKeyString* pVeMaterialShiness                                  = null;
 
 // is it needed ?
-String* pVeShadowColor                                         = null;
-
-String* pVeLightCount                                          = null;
-String* pVeLightType                                           = null;
-String* pVeLightDiffuse                                                = null;
-String* pVeLightSpecular                                       = null;
-String* pVeLightAmbient                                                = null;
-String* pVeLightPosition                                       = null;
-String* pVeLightDirection                                      = null;
-String* pVeLightExponent                                       = null;
-String* pVeLightCutOff                                         = null;
-String* pVeLightConstantAttenuation                    = null;
-String* pVeLightLinearAttenuation                      = null;
-String* pVeLightQuadraticAttenuation           = null;
-
+_DynamicKeyString* pVeShadowColor                                              = null;
+
+_DynamicKeyString* pVeLightCount                                               = null;
+_DynamicKeyString* pVeLightType                                                = null;
+_DynamicKeyString* pVeLightDiffuse                                             = null;
+_DynamicKeyString* pVeLightSpecular                                    = null;
+_DynamicKeyString* pVeLightAmbient                                             = null;
+_DynamicKeyString* pVeLightPosition                                    = null;
+_DynamicKeyString* pVeLightDirection                                   = null;
+_DynamicKeyString* pVeLightExponent                                    = null;
+_DynamicKeyString* pVeLightCutOff                                              = null;
+_DynamicKeyString* pVeLightConstantAttenuation                 = null;
+_DynamicKeyString* pVeLightLinearAttenuation                   = null;
+_DynamicKeyString* pVeLightQuadraticAttenuation                = null;
 // need to design
-//String* pVeShaderUniform                                     = null;
+//_DynamicKeyString* pVeShaderUniform                                  = null;
 
 
 
@@ -369,40 +404,75 @@ _VisualElementEnvironment::InitializeEnvironment(void)
 
        pVePrivPropShowOpacity                                          = new (std::nothrow) String(VePrivPropShowOpacity);
 
+//     // 3.0 properties
+//     pVeMeshPropVertexCount                          = new (std::nothrow) String(VeMeshPropVertexCount);
+//     pVeMeshPropVertex                                       = new (std::nothrow) String(VeMeshPropVertex);
+//     pVeMeshPropColor                                        = new (std::nothrow) String(VeMeshPropColor);
+//     pVeMeshPropTextureCoord                         = new (std::nothrow) String(VeMeshPropTextureCoord);
+//     pVeMeshPropNormal                                       = new (std::nothrow) String(VeMeshPropNormal);
+//     pVeMeshPropVertexIndex                          = new (std::nothrow) String(VeMeshPropVertexIndex);
+//     pVeMeshPropBoneCount                            = new (std::nothrow) String(VeMeshPropBoneCount);
+//     pVeMeshPropBone                                         = new (std::nothrow) String(VeMeshPropBone);
+//     pVeMeshPropBoneIndex                            = new (std::nothrow) String(VeMeshPropBoneIndex);
+//     pVeMeshPropBoneWeight                           = new (std::nothrow) String(VeMeshPropBoneWeight);
+
+//     pVeMaterialDiffuse                                      = new (std::nothrow) String(VeMaterialDiffuse);
+//     pVeMaterialSpecular                                     = new (std::nothrow) String(VeMaterialSpecular);
+//     pVeMaterialAmbient                                      = new (std::nothrow) String(VeMaterialAmbient);
+//     pVeMaterialEmissive                                     = new (std::nothrow) String(VeMaterialEmissive);
+//     pVeMaterialShiness                                      = new (std::nothrow) String(VeMaterialShiness);
+
+//     // is it needed ?                     / is it needed ?
+//     pVeShadowColor                                          = new (std::nothrow) String(VeShadowColor);
+
+//     pVeLightCount                                           = new (std::nothrow) String(VeLightCount);
+//     pVeLightType                                            = new (std::nothrow) String(VeLightType);
+//     pVeLightDiffuse                                         = new (std::nothrow) String(VeLightDiffuse);
+//     pVeLightSpecular                                        = new (std::nothrow) String(VeLightSpecular);
+//     pVeLightAmbient                                         = new (std::nothrow) String(VeLightAmbient);
+//     pVeLightPosition                                        = new (std::nothrow) String(VeLightPosition);
+//     pVeLightDirection                                       = new (std::nothrow) String(VeLightDirection);
+//     pVeLightExponent                                        = new (std::nothrow) String(VeLightExponent);
+//     pVeLightCutOff                                          = new (std::nothrow) String(VeLightCutOff);
+//     pVeLightConstantAttenuation                     = new (std::nothrow) String(VeLightConstantAttenuation);
+//     pVeLightLinearAttenuation                       = new (std::nothrow) String(VeLightLinearAttenuation);
+//     pVeLightQuadraticAttenuation            = new (std::nothrow) String(VeLightQuadraticAttenuation);
+
+
+
        // 3.0 properties
-       pVeMeshPropVertexCount                          = new (std::nothrow) String(VeMeshPropVertexCount);
-       pVeMeshPropVertex                                       = new (std::nothrow) String(VeMeshPropVertex);
-       pVeMeshPropColor                                        = new (std::nothrow) String(VeMeshPropColor);
-       pVeMeshPropTextureCoord                         = new (std::nothrow) String(VeMeshPropTextureCoord);
-       pVeMeshPropNormal                                       = new (std::nothrow) String(VeMeshPropNormal);
-       pVeMeshPropVertexIndex                          = new (std::nothrow) String(VeMeshPropVertexIndex);
-       pVeMeshPropBoneCount                            = new (std::nothrow) String(VeMeshPropBoneCount);
-       pVeMeshPropBone                                         = new (std::nothrow) String(VeMeshPropBone);
-       pVeMeshPropBoneIndex                            = new (std::nothrow) String(VeMeshPropBoneIndex);
-       pVeMeshPropBoneWeight                           = new (std::nothrow) String(VeMeshPropBoneWeight);
-
-       pVeMaterialDiffuse                                      = new (std::nothrow) String(VeMaterialDiffuse);
-       pVeMaterialSpecular                                     = new (std::nothrow) String(VeMaterialSpecular);
-       pVeMaterialAmbient                                      = new (std::nothrow) String(VeMaterialAmbient);
-       pVeMaterialEmissive                                     = new (std::nothrow) String(VeMaterialEmissive);
-       pVeMaterialShiness                                      = new (std::nothrow) String(VeMaterialShiness);
+       pVeMeshPropVertexCount                          = new (std::nothrow) _DynamicKeyString(VeMeshPropVertexCount);
+       pVeMeshPropVertex                                       = new (std::nothrow) _DynamicKeyString(VeMeshPropVertex);
+       pVeMeshPropColor                                        = new (std::nothrow) _DynamicKeyString(VeMeshPropColor);
+       pVeMeshPropTextureCoord                         = new (std::nothrow) _DynamicKeyString(VeMeshPropTextureCoord);
+       pVeMeshPropNormal                                       = new (std::nothrow) _DynamicKeyString(VeMeshPropNormal);
+       pVeMeshPropVertexIndex                          = new (std::nothrow) _DynamicKeyString(VeMeshPropVertexIndex);
+       pVeMeshPropBoneCount                            = new (std::nothrow) _DynamicKeyString(VeMeshPropBoneCount);
+       pVeMeshPropBone                                         = new (std::nothrow) _DynamicKeyString(VeMeshPropBone);
+       pVeMeshPropBoneIndex                            = new (std::nothrow) _DynamicKeyString(VeMeshPropBoneIndex);
+       pVeMeshPropBoneWeight                           = new (std::nothrow) _DynamicKeyString(VeMeshPropBoneWeight);
+
+       pVeMaterialDiffuse                                      = new (std::nothrow) _DynamicKeyString(VeMaterialDiffuse);
+       pVeMaterialSpecular                                     = new (std::nothrow) _DynamicKeyString(VeMaterialSpecular);
+       pVeMaterialAmbient                                      = new (std::nothrow) _DynamicKeyString(VeMaterialAmbient);
+       pVeMaterialEmissive                                     = new (std::nothrow) _DynamicKeyString(VeMaterialEmissive);
+       pVeMaterialShiness                                      = new (std::nothrow) _DynamicKeyString(VeMaterialShiness);
 
        // is it needed ?                     / is it needed ?
-       pVeShadowColor                                          = new (std::nothrow) String(VeShadowColor);
-
-       pVeLightCount                                           = new (std::nothrow) String(VeLightCount);
-       pVeLightType                                            = new (std::nothrow) String(VeLightType);
-       pVeLightDiffuse                                         = new (std::nothrow) String(VeLightDiffuse);
-       pVeLightSpecular                                        = new (std::nothrow) String(VeLightSpecular);
-       pVeLightAmbient                                         = new (std::nothrow) String(VeLightAmbient);
-       pVeLightPosition                                        = new (std::nothrow) String(VeLightPosition);
-       pVeLightDirection                                       = new (std::nothrow) String(VeLightDirection);
-       pVeLightExponent                                        = new (std::nothrow) String(VeLightExponent);
-       pVeLightCutOff                                          = new (std::nothrow) String(VeLightCutOff);
-       pVeLightConstantAttenuation                     = new (std::nothrow) String(VeLightConstantAttenuation);
-       pVeLightLinearAttenuation                       = new (std::nothrow) String(VeLightLinearAttenuation);
-       pVeLightQuadraticAttenuation            = new (std::nothrow) String(VeLightQuadraticAttenuation);
-
+       pVeShadowColor                                          = new (std::nothrow) _DynamicKeyString(VeShadowColor);
+
+       pVeLightCount                                           = new (std::nothrow) _DynamicKeyString(VeLightCount);
+       pVeLightType                                            = new (std::nothrow) _DynamicKeyString(VeLightType);
+       pVeLightDiffuse                                         = new (std::nothrow) _DynamicKeyString(VeLightDiffuse);
+       pVeLightSpecular                                        = new (std::nothrow) _DynamicKeyString(VeLightSpecular);
+       pVeLightAmbient                                         = new (std::nothrow) _DynamicKeyString(VeLightAmbient);
+       pVeLightPosition                                        = new (std::nothrow) _DynamicKeyString(VeLightPosition);
+       pVeLightDirection                                       = new (std::nothrow) _DynamicKeyString(VeLightDirection);
+       pVeLightExponent                                        = new (std::nothrow) _DynamicKeyString(VeLightExponent);
+       pVeLightCutOff                                          = new (std::nothrow) _DynamicKeyString(VeLightCutOff);
+       pVeLightConstantAttenuation                     = new (std::nothrow) _DynamicKeyString(VeLightConstantAttenuation);
+       pVeLightLinearAttenuation                       = new (std::nothrow) _DynamicKeyString(VeLightLinearAttenuation);
+       pVeLightQuadraticAttenuation            = new (std::nothrow) _DynamicKeyString(VeLightQuadraticAttenuation);
        // need to design                     / need to design
        //pVeShaderUniform                                      = /pVeShaderUniform                     ;
        __pMethodLock = new _Mutex(true);
index 6ca1ec9..2bb91a0 100644 (file)
@@ -53,10 +53,29 @@ public:
 
        result SetShaderProgram(ShaderProgram* pShaderProgram);
        ShaderProgram* GetShaderProgram(void);
-
+       bool IsMeshUpdated() const
+       {
+               return __isMeshUpdated;
+       }
+       bool IsLightUpdated() const
+       {
+               return __isLightUpdated;
+       }
+       bool IsMaterialUpdated() const
+       {
+               return __isMaterialUpdated;
+       }
+       bool IsShaderProgramUpdated() const
+       {
+               return __isShaderProgramUpdated;
+       }
 private:
        Mesh* __pMesh;
        ShaderProgram* __pShaderProgram;
+       bool __isMeshUpdated;
+       bool __isLightUpdated;
+       bool __isMaterialUpdated;
+       bool __isShaderProgramUpdated;
 };
 
 }}} //namespace Tizen { namespace Ui { namespace Animations
index c9e47c9..8f8205c 100644 (file)
@@ -152,6 +152,41 @@ extern const wchar_t* VeSubPropChildrenTransformScaleAnchorXY;
 extern const wchar_t* VePrivPropShowOpacity;
 
 
+// 3.0 properties
+extern const wchar_t* VeMeshPropVertexCount;                           //L"mesh.vertex.count";                                 //int
+extern const wchar_t* VeMeshPropVertex;                                                //L"mesh.vertex.#index";                                                //FloatPoint3
+extern const wchar_t* VeMeshPropColor;                                         //L"mesh.color.#index";                                         //Color ( FloatColor will be needed )
+extern const wchar_t* VeMeshPropTextureCoord;                          //L"mesh.textureCoordinates.#index";                    //FloatDimension
+extern const wchar_t* VeMeshPropNormal;                                                //L"mesh.normal.#index";                                                //FloatPoint3
+extern const wchar_t* VeMeshPropVertexIndex;                           //L"mesh.index.#index";                                         //int
+extern const wchar_t* VeMeshPropBoneCount;                                     //L"mesh.bone.count";                                   //int
+extern const wchar_t* VeMeshPropBone;                                          //L"mesh.bone.#index";                                          //FloatMatrix4
+extern const wchar_t* VeMeshPropBoneIndex;                                     //L"mesh.bone.index.#index";                                    //int
+extern const wchar_t* VeMeshPropBoneWeight;                                    //L"mesh.bone.weight#index.";                                   //float
+
+extern const wchar_t* VeMaterialDiffuse;                                       //L"material.diffuse";                                  //FloatVector4
+extern const wchar_t* VeMaterialSpecular;                                      //L"material.specular";                                 //FloatVector4
+extern const wchar_t* VeMaterialAmbient;                                       //L"material.ambient";                                  //FloatVector4
+extern const wchar_t* VeMaterialEmissive;                                      //L"material.emissive";                                 //FloatVector4
+extern const wchar_t* VeMaterialShiness;                                       //L"material.shiness";                                  //float
+
+// is it needed ?
+extern const wchar_t* VeShadowColor;                                           //L"shadow.color";                                              //FloatVector4
+
+extern const wchar_t* VeLightCount;                                                    //L"light.count";                                               //int
+extern const wchar_t* VeLightType;                                                     //L"light.#name.type";                                          //int : LightType
+extern const wchar_t* VeLightDiffuse;                                          //L"light.#name.diffuse";                                       //FloatVector4
+extern const wchar_t* VeLightSpecular;                                         //L"light.#name.specular";                                      //FloatVector4
+extern const wchar_t* VeLightAmbient;                                          //L"light.#name.ambient";                                       //FloatVector4
+extern const wchar_t* VeLightPosition;                                         //L"light.#name.position";                                      //FloatPoint3
+extern const wchar_t* VeLightDirection;                                                //L"light.#name.direction";                                     //FloatVector4
+extern const wchar_t* VeLightExponent;                                         //L"light.#name.exponent";                                      //float
+extern const wchar_t* VeLightCutOff;                                           //L"light.#name.cutOff";                                                //float
+extern const wchar_t* VeLightConstantAttenuation;                      //L"light.#name.constantAttenuation";           //float
+extern const wchar_t* VeLightLinearAttenuation;                                //L"light.#name.linearAttenuation";                     //float
+extern const wchar_t* VeLightQuadraticAttenuation;                     //L"light.#name.quadraticAttenuation";          //float
+
+
 extern Tizen::Base::String* pVePropBounds;
 extern Tizen::Base::String* pVePropContentBounds;
 extern Tizen::Base::String* pVePropContentOpacity;
@@ -228,39 +263,39 @@ extern Tizen::Base::String* pVeSubPropChildrenTransformScaleAnchorXY;
 
 extern Tizen::Base::String* pVePrivPropShowOpacity;
 
-// 3.0 properties
-extern Tizen::Base::String* pVeMeshPropVertexCount;
-extern Tizen::Base::String* pVeMeshPropVertex;
-extern Tizen::Base::String* pVeMeshPropColor;
-extern Tizen::Base::String* pVeMeshPropTextureCoord;
-extern Tizen::Base::String* pVeMeshPropNormal;
-extern Tizen::Base::String* pVeMeshPropVertexIndex;
-extern Tizen::Base::String* pVeMeshPropBoneCount;
-extern Tizen::Base::String* pVeMeshPropBone;
-extern Tizen::Base::String* pVeMeshPropBoneIndex;
-extern Tizen::Base::String* pVeMeshPropBoneWeight;
-
-extern Tizen::Base::String* pVeMaterialDiffuse;
-extern Tizen::Base::String* pVeMaterialSpecular;
-extern Tizen::Base::String* pVeMaterialAmbient;
-extern Tizen::Base::String* pVeMaterialEmissive;
-extern Tizen::Base::String* pVeMaterialShiness;
-
-// is it needed ?
-extern Tizen::Base::String* pVeShadowColor;
-
-extern Tizen::Base::String* pVeLightCount;
-extern Tizen::Base::String* pVeLightType;
-extern Tizen::Base::String* pVeLightDiffuse;
-extern Tizen::Base::String* pVeLightSpecular;
-extern Tizen::Base::String* pVeLightAmbient;
-extern Tizen::Base::String* pVeLightPosition;
-extern Tizen::Base::String* pVeLightDirection;
-extern Tizen::Base::String* pVeLightExponent;
-extern Tizen::Base::String* pVeLightCutOff;
-extern Tizen::Base::String* pVeLightConstantAttenuation;
-extern Tizen::Base::String* pVeLightLinearAttenuation;
-extern Tizen::Base::String* pVeLightQuadraticAttenuation;
+//// 3.0 properties
+//extern Tizen::Base::String* pVeMeshPropVertexCount;
+//extern Tizen::Base::String* pVeMeshPropVertex;
+//extern Tizen::Base::String* pVeMeshPropColor;
+//extern Tizen::Base::String* pVeMeshPropTextureCoord;
+//extern Tizen::Base::String* pVeMeshPropNormal;
+//extern Tizen::Base::String* pVeMeshPropVertexIndex;
+//extern Tizen::Base::String* pVeMeshPropBoneCount;
+//extern Tizen::Base::String* pVeMeshPropBone;
+//extern Tizen::Base::String* pVeMeshPropBoneIndex;
+//extern Tizen::Base::String* pVeMeshPropBoneWeight;
+
+//extern Tizen::Base::String* pVeMaterialDiffuse;
+//extern Tizen::Base::String* pVeMaterialSpecular;
+//extern Tizen::Base::String* pVeMaterialAmbient;
+//extern Tizen::Base::String* pVeMaterialEmissive;
+//extern Tizen::Base::String* pVeMaterialShiness;
+
+//// is it needed ?
+//extern Tizen::Base::String* pVeShadowColor;
+
+//extern Tizen::Base::String* pVeLightCount;
+//extern Tizen::Base::String* pVeLightType;
+//extern Tizen::Base::String* pVeLightDiffuse;
+//extern Tizen::Base::String* pVeLightSpecular;
+//extern Tizen::Base::String* pVeLightAmbient;
+//extern Tizen::Base::String* pVeLightPosition;
+//extern Tizen::Base::String* pVeLightDirection;
+//extern Tizen::Base::String* pVeLightExponent;
+//extern Tizen::Base::String* pVeLightCutOff;
+//extern Tizen::Base::String* pVeLightConstantAttenuation;
+//extern Tizen::Base::String* pVeLightLinearAttenuation;
+//extern Tizen::Base::String* pVeLightQuadraticAttenuation;
 /**
 * @class       _VisualElementImpl
 * @brief       This class provides methods to control VisualElement.