added some Mesh APIs, remove warning
authorDae Young Ryu <karzia@samsung.com>
Tue, 25 Mar 2014 06:23:55 +0000 (15:23 +0900)
committerDae Young Ryu <karzia@samsung.com>
Tue, 25 Mar 2014 06:23:55 +0000 (15:23 +0900)
Change-Id: Ic46ff0b78dc8114b24072245afbc001f020d5bdc
Signed-off-by: Dae Young Ryu <karzia@samsung.com>
18 files changed:
inc/FUiAnimMesh.h
src/ui/animations/FUiAnimMesh.cpp
src/ui/animations/FUiAnim_AnimationManager.cpp
src/ui/animations/FUiAnim_GlCompositor.cpp
src/ui/animations/FUiAnim_GlNode.cpp
src/ui/animations/FUiAnim_GlRenderManager.cpp
src/ui/animations/FUiAnim_GlVisualElementSurfaceImpl.cpp
src/ui/animations/FUiAnim_MeshGeneratorImpl.cpp
src/ui/animations/FUiAnim_MeshGeneratorImpl.h
src/ui/animations/FUiAnim_MeshImpl.cpp
src/ui/animations/FUiAnim_MeshImportSample.cpp
src/ui/animations/FUiAnim_ModelImporterImpl.cpp
src/ui/animations/FUiAnim_TransactionNode.cpp
src/ui/animations/math/FUiAnim_MathCommon.cpp
src/ui/animations/math/FUiAnim_MathCommon.h
src/ui/animations/math/FUiAnim_MathMatrix4.cpp
src/ui/animations/platform/FUiAnim_EcoreXLooper.cpp
src/ui/inc/FUiAnim_MeshImpl.h

index 8713529..f9e8571 100644 (file)
@@ -125,11 +125,33 @@ public:
         *                                                                      - The arrayIndex is bigger then count of allocated vertices;
         *                                                                      - The arrayIndex is minus value.
         * @remarks             Can only increase bounding volume size, call AdjustBoundingVolume() to readjust.
-        * @see                 GetVertex(), AdjustBoundingVolume()
+        * @see                 GetVertex()
+        * @see                 SetVertices()
+        * @see                 AdjustBoundingVolume()
         */
        result SetVertex(int arrayIndex, const Tizen::Graphics::FloatPoint3& point);
 
        /**
+        * Replaces the vertex with the specified @c pVertiecs.
+        *
+        * @since               3.0
+        *
+        * @return              An error code
+        * @param[in]   pVertiecs                       The vertex array, a each vertex has x,y,z value
+        * @param[in]   size                            The size of the @c pVertices array
+        * @exception   E_SUCCESS                       The method is successful
+        * @exception   E_INVALID_STATE         Vertices haven't been allocated yet
+        * @exception   E_OUT_OF_RANGE          Invalid position of the vertices array. Either of the following conditions has occurred:
+        *                                                                      - The arrayIndex is bigger then count of allocated vertices;
+        *                                                                      - The arrayIndex is minus value.
+        * @remarks             Can only increase bounding volume size, call AdjustBoundingVolume() to readjust.
+        * @see                 GetVertex()
+        * @see                 SetVertex()
+        * @see                 AdjustBoundingVolume()
+        */
+       result SetVertices(float* pVertiecs, int size);
+
+       /**
         * Gets the vertex at the specified @c arrayIndex of the vertices array.
         *
         * @since               3.0
@@ -141,6 +163,7 @@ public:
         *                                                                      - The arrayIndex is bigger then count of allocated vertices;
         *                                                                      - The arrayIndex is minus value.
         * @see                 SetVertex()
+        * @see                 SetVertices()
         */
        Tizen::Graphics::FloatPoint3 GetVertex(int arrayIndex) const;
 
@@ -152,6 +175,7 @@ public:
         * @return              Vertex count
         * @see                 SetVertex()
         * @see                 GetVertex()
+        * @see                 SetVertices()
         */
        int GetVertexCount(void) const;
 
@@ -169,9 +193,29 @@ public:
         * @exception   E_OUT_OF_RANGE          Invalid position of the texture coordinates array. Either of the following conditions has occurred:
         *                                                                      - The arrayIndex is bigger then count of allocated vertices;
         *                                                                      - The arrayIndex is minus value.
-        * @see                 GetTextureCoord()
+        * @see                 GetTextureCoordinate()
+        * @see                 SetTextureCoordinates()
         */
-       result SetTextureCoord(int arrayIndex, const Tizen::Graphics::FloatPoint& textureCoord);
+       result SetTextureCoordinate(int arrayIndex, const Tizen::Graphics::FloatPoint& textureCoord);
+
+       /**
+        * Replaces the texture coordinate with the specified @c pTextureCoords.
+        *
+        * @since               3.0
+        *
+        * @return              An error code
+        * @param[in]   pTextureCoords          The texture coordinates array, a each texture coordinates has u,v value
+        * @param[in]   size                            The size of the pTextureCoords array
+        * @exception   E_SUCCESS                       The method is successful
+        * @exception   E_OUT_OF_MEMORY         Insufficient memory for allocating texture coordinates
+        * @exception   E_INVALID_STATE         Texture coordinates haven't been allocated
+        * @exception   E_OUT_OF_RANGE          Invalid position of the texture coordinates array. Either of the following conditions has occurred:
+        *                                                                      - The arrayIndex is bigger then count of allocated vertices;
+        *                                                                      - The arrayIndex is minus value.
+        * @see                 SetTextureCoordinate()
+        * @see                 GetTextureCoordinate()
+        */
+       result SetTextureCoordinates(float* pTextureCoords, int size);
 
        /**
         * Gets the texture coordinate at the specified @c arrayIndex of the texture coordinates array.
@@ -184,9 +228,10 @@ public:
         * @exception   E_INVALID_ARG           Invalid position of the texture coordinates array. Either of the following conditions has occurred:
         *                                                                      - The arrayIndex is bigger then count of allocated vertices;
         *                                                                      - The arrayIndex is minus value.
-        * @see                 SetTextureCoord()
+        * @see                 SetTextureCoordinate()
+        * @see                 SetTextureCoordinates()
         */
-       Tizen::Graphics::FloatPoint GetTextureCoord(int arrayIndex) const;
+       Tizen::Graphics::FloatPoint GetTextureCoordinate(int arrayIndex) const;
 
        /**
         * Replaces the normal vector at the specified @c index with the specified value.
@@ -202,10 +247,29 @@ public:
         *                                                                      - The arrayIndex is bigger then count of allocated vertices;
         *                                                                      - The arrayIndex is minus value.
         * @see                 GetNormal()
+        * @see                 SetNormals()
         */
        result SetNormal(int arrayIndex, const Tizen::Graphics::FloatPoint3& normal);
 
        /**
+        * Replaces the normal vectorswith the specified @c pNormals.
+        *
+        * @since               3.0
+        *
+        * @return              An error code
+        * @param[in]   pNormals                        The normal vector array, a each normal vector has x,y,z value
+        * @param[in]   size                            The size of the pNormals array
+        * @exception   E_SUCCESS                       The method is successful
+        * @exception   E_OUT_OF_MEMORY         Insufficient memory for allocating normals
+        * @exception   E_OUT_OF_RANGE          Invalid position of the normals array. Either of the following conditions has occurred:
+        *                                                                      - The arrayIndex is bigger then count of allocated vertices;
+        *                                                                      - The arrayIndex is minus value.
+        * @see                 GetNormal()
+        * @see                 SetNormal()
+        */
+       result SetNormals(float* pNormals, int size);
+
+       /**
         * Gets the normal vector at the specified @c arrayIndex of the normal vectors array.
         *
         * @since               3.0
@@ -216,7 +280,8 @@ public:
         * @exception   E_INVALID_ARG           Invalid position of the normals array. Either of the following conditions has occurred:
         *                                                                      - The arrayIndex is bigger then count of allocated vertices;
         *                                                                      - The arrayIndex is minus value.
-        * @see                 SetTextureCoord()
+        * @see                 SetNormal()
+        * @see                 SetNormals()
         */
        Tizen::Graphics::FloatPoint3 GetNormal(int arrayIndex) const;
 
@@ -234,10 +299,29 @@ public:
         *                                                                      - The arrayIndex is bigger then count of allocated vertices;
         *                                                                      - The arrayIndex is minus value.
         * @see                 GetColor()
+        * @see                 SetColors()
         */
        result SetColor(int arrayIndex, const Tizen::Graphics::Color& color);
 
        /**
+        * Replaces the colors with the specified @ pColors.
+        *
+        * @since               3.0
+        *
+        * @return              An error code
+        * @param[in]   pColors                         The color array, a value range is 0.0 to 1.0 and each color has r,g,b,a value
+        * @param[in]   size                            The size of the @c pColors array
+        * @exception   E_SUCCESS                       The method is successful
+        * @exception   E_OUT_OF_MEMORY         Insufficient memory for allocating colors
+        * @exception   E_OUT_OF_RANGE          Invalid position of the colors. Either of the following conditions has occurred:
+        *                                                                      - The arrayIndex is bigger then count of allocated vertices;
+        *                                                                      - The arrayIndex is minus value.
+        * @see                 GetColor()
+        * @see                 SetColor()
+        */
+       result SetColors(float* pColors, int size);
+
+       /**
         * Gets the color at the specified @c arrayIndex of the colors array.
         *
         * @since               3.0
@@ -249,11 +333,12 @@ public:
         *                                                                      - The arrayIndex is bigger then count of allocated vertices;
         *                                                                      - The arrayIndex is minus value.
         * @see                 SetColor()
+        * @see                 SetColors()
         */
        Tizen::Graphics::Color GetColor(int arrayIndex) const;
 
        /**
-        * Replaces the vertexIndex at the specified @c index with the specified value.
+        * Replaces the index of the vertex index array at the specified @c arrayIndex with the @c vertexIndex.
         *
         * @since               3.0
         *
@@ -266,10 +351,29 @@ public:
         *                                                                      - The arrayIndex is bigger then count of allocated vertices;
         *                                                                      - The arrayIndex is minus value.
         * @see                 GetIndex()
+        * @see                 SetIndices()
         */
        result SetIndex(int arrayIndex, int vertexIndex);
 
        /**
+        * Replaces the vertex array indices with the specified @c pIndices.
+        *
+        * @since               3.0
+        *
+        * @return              An error code
+        * @param[in]   pIndices                        The vertex index array
+        * @param[in]   size                            The size of the @c pIndices array
+        * @exception   E_SUCCESS                       The method is successful
+        * @exception   E_INVALID_STATE         Indices haven't been allocated
+        * @exception   E_OUT_OF_RANGE          Invalid position of the indices. Either of the following conditions has occurred:
+        *                                                                      - The arrayIndex is bigger then count of allocated vertices;
+        *                                                                      - The arrayIndex is minus value.
+        * @see                 GetIndex()
+        * @see                 SetIndex()
+        */
+       result SetIndices(int* pIndices, int size);
+
+       /**
         * Gets the index at the specified @c arrayIndex of the indices array.
         *
         * @since               3.0
@@ -281,6 +385,7 @@ public:
         *                                                                      - The arrayIndex is bigger then count of allocated indices;
         *                                                                      - The arrayIndex is minus value.
         * @see                 SetIndex()
+        * @see                 SetIndices()
         */
        int GetIndex(int arrayIndex) const;
 
@@ -292,6 +397,7 @@ public:
         * @return              An index count
         * @remarks             The specific error code can be accessed using the GetLastResult() method.
         * @see                 SetIndex()
+        * @see                 SetIndices()
         * @see                 GetIndex()
         */
        int GetIndexCount(void) const;
@@ -455,7 +561,6 @@ public:
         *
         * @return              Mesh's name
         */
-       Tizen::Base::String GetName(void);
        Tizen::Base::String GetName(void) const;
 
        //--------------------------------------------------TEMP
index 1eff41d..bd69bed 100644 (file)
@@ -77,13 +77,28 @@ Mesh::SetVertex(int arrayIndex, const Tizen::Graphics::FloatPoint3& point)
     CHECK_CONSTRUCTED;
     return __pMeshImpl->SetVertex(arrayIndex, point);
 }
+result
+Mesh::SetVertices(float* pVertiecs, int size)
+{
+       SetLastResult(E_SUCCESS);
+       CHECK_CONSTRUCTED;
+       return __pMeshImpl->SetVertices(pVertiecs, size);
+}
 
 result
-Mesh::SetTextureCoord(int arrayIndex, const Tizen::Graphics::FloatPoint& textureCoord)
+Mesh::SetTextureCoordinate(int arrayIndex, const Tizen::Graphics::FloatPoint& textureCoord)
 {
        SetLastResult(E_SUCCESS);
     CHECK_CONSTRUCTED;
-    return __pMeshImpl->SetTextureCoord(arrayIndex, textureCoord);
+       return __pMeshImpl->SetTextureCoord(arrayIndex, textureCoord);
+}
+
+result
+Mesh::SetTextureCoordinates(float* pTextureCoords, int size)
+{
+       SetLastResult(E_SUCCESS);
+       CHECK_CONSTRUCTED;
+       return __pMeshImpl->SetTextureCoords(pTextureCoords, size);
 }
 
 result
@@ -95,6 +110,14 @@ Mesh::SetNormal(int arrayIndex, const Tizen::Graphics::FloatPoint3& normal)
 }
 
 result
+Mesh::SetNormals(float* pNormals, int size)
+{
+       SetLastResult(E_SUCCESS);
+       CHECK_CONSTRUCTED;
+       return __pMeshImpl->SetNormals(pNormals, size);
+}
+
+result
 Mesh::SetColor(int arrayIndex, const Tizen::Graphics::Color& color)
 {
        SetLastResult(E_SUCCESS);
@@ -103,6 +126,14 @@ Mesh::SetColor(int arrayIndex, const Tizen::Graphics::Color& color)
 }
 
 result
+Mesh::SetColors(float* pColors, int size)
+{
+       SetLastResult(E_SUCCESS);
+       CHECK_CONSTRUCTED;
+       return __pMeshImpl->SetColors(pColors, size);
+}
+
+result
 Mesh::SetIndex(int arrayIndex, int vertexIndex)
 {
        SetLastResult(E_SUCCESS);
@@ -110,6 +141,14 @@ Mesh::SetIndex(int arrayIndex, int vertexIndex)
     return __pMeshImpl->SetIndex(arrayIndex, vertexIndex);
 }
 
+result
+Mesh::SetIndices(int* pIndices, int size)
+{
+       SetLastResult(E_SUCCESS);
+       CHECK_CONSTRUCTED;
+       return __pMeshImpl->SetIndices(pIndices, size);
+}
+
 Tizen::Graphics::FloatPoint3
 Mesh::GetVertex(int arrayIndex) const
 {
@@ -119,7 +158,7 @@ Mesh::GetVertex(int arrayIndex) const
 }
 
 Tizen::Graphics::FloatPoint
-Mesh::GetTextureCoord(int arrayIndex) const
+Mesh::GetTextureCoordinate(int arrayIndex) const
 {
        SetLastResult(E_SUCCESS);
     CHECK_CONSTRUCTED;
@@ -300,13 +339,6 @@ Mesh::SetName(Tizen::Base::String name)
 }
 
 Tizen::Base::String
-Mesh::GetName(void)
-{
-       SetLastResult(E_SUCCESS);
-       return Tizen::Base::String(__pMeshImpl->GetName().c_str());
-}
-
-Tizen::Base::String
 Mesh::GetName() const
 {
        return Tizen::Base::String(__pMeshImpl->GetName().c_str());
index a248f2b..27861dc 100644 (file)
@@ -103,7 +103,7 @@ _TransactionEventListener::OnAnimationTransactionStarted(int transactionId)
 {
        if (__pEventListener)
     {
-        SysAssertf(_GlRenderManager::GetInstance()->IsInRenderThread() == false, "Invalid thread");
+               SysAssertf(_GlRenderManager::GetInstance()->GetCompositor()->IsInCompositorThread() == false, "Invalid thread");
 
         __pEventListener->OnAnimationTransactionStarted(transactionId);
        }
@@ -114,7 +114,7 @@ _TransactionEventListener::OnAnimationTransactionStopped(int transactionId)
 {
        if (__pEventListener)
     {
-        SysAssertf(_GlRenderManager::GetInstance()->IsInRenderThread() == false, "Invalid thread");
+               SysAssertf(_GlRenderManager::GetInstance()->GetCompositor()->IsInCompositorThread() == false, "Invalid thread");
 
         __pEventListener->OnAnimationTransactionStopped(transactionId);
        }
@@ -125,7 +125,7 @@ _TransactionEventListener::OnAnimationTransactionFinished(int transactionId)
 {
        if (__pEventListener)
     {
-        SysAssertf(_GlRenderManager::GetInstance()->IsInRenderThread() == false, "Invalid thread");
+               SysAssertf(_GlRenderManager::GetInstance()->GetCompositor()->IsInCompositorThread() == false, "Invalid thread");
 
         __pEventListener->OnAnimationTransactionFinished(transactionId);
        }
index 61c73fb..ac22da5 100644 (file)
@@ -732,10 +732,11 @@ _GlCompositor::CompositeLayer(_GlLayer* pLayer)
                return;
        }
 
+       _AutoMutex renderLock(*_VisualElementEnvironment::GetTreeLock());
+
 //     __needClear = true;
        __pRenderManager->GetRenderQueue()->SetClear();
 
-       _AutoMutex renderLock(*_VisualElementEnvironment::GetTreeLock());
        bool isUpdated = pLayer->UpdateNativeNodes();
 
 
@@ -758,17 +759,16 @@ _GlCompositor::CompositeLayer(_GlLayer* pLayer)
                __pTempNode->__pVertices[15] = bounds.width;
                __pTempNode->__pVertices[16] = bounds.height;
 
-#if 0
-#ifdef VE_USE_GL_MULTI_CONTEXT
-               __pGlContext = (_GlContext*)pLayer->GetContext();
-               __pGlContext->MakeCurrent();
-#else
-               __pGlContext->MakeCurrent(pLayer->GetNativeSurface());
-#endif
-#else
+
+//#ifdef VE_USE_GL_MULTI_CONTEXT
+//             __pGlContext = (_GlContext*)pLayer->GetContext();
+//             __pGlContext->MakeCurrent();
+//#else
+//             __pGlContext->MakeCurrent(pLayer->GetNativeSurface());
+//#endif
                __pRenderManager->GetRenderQueue()->SetLayer(pLayer);
 //             __pGlLayerForFlush = pLayer;
-#endif
+
 
                int count  = pLayer->GetViewCount();
 
@@ -811,6 +811,7 @@ _GlCompositor::CommandHandlerComposite(_GlLayer* pGlLayer)
 
        _DisplayManager* pDisplayManager = _DisplayManager::GetInstance();
 
+
        if (pGlLayer && pGlLayer->IsMapped())
        {
                CompositeLayer(pGlLayer);
@@ -862,85 +863,6 @@ _GlCompositor::Animate(void)
        return true;
 }
 
-
-#if 0
-
-void*
-_GlCompositor::CompositeProc(void* pData)
-{
-       _GlCompositor* pThis = reinterpret_cast< _GlCompositor* >(pData);
-
-       _DisplayManager* pDisplayManager = _DisplayManager::GetInstance();
-
-       pThis->__pAnimationManager = _AnimationManager::GetInstance();
-
-       for (;;)
-       {
-               _GlLayer* pGlLayer = null;
-               bool needFullComposite = false;
-               {
-                       _AutoMutex commandLock(pThis->__commandLock);
-                       pThis->__commandRequest.WaitForSignal(&pThis->__commandLock,pThis->__pAnimationManager->GetTimeout(false));
-                       pGlLayer = pThis->__commandArg.__pCommandGlLayer;
-                       pThis->__commandArg.__pCommandGlLayer = null;
-                       if( pGlLayer == null)
-                       {
-                               needFullComposite = true;
-                       }
-               }
-
-               RPRINT(">> CommandHandlerComposite() COMMAND_COMPOSITE - start \n");
-               needFullComposite = pThis->Animate();
-
-//             _AutoMutex treeLock(*_VisualElementEnvironment::GetTreeLock());
-
-               if(needFullComposite)
-               {
-                       int count = pDisplayManager->GetLayerCount();
-
-                       for (int i = 0; i < count; i++)
-                       {
-                               _GlLayer* pGlLayer = dynamic_cast<_GlLayer*>(pDisplayManager->GetLayer(i));
-       #ifdef LINUX
-                               if (!pGlLayer || !pGlLayer->IsMapped())
-                               {
-                                       continue;
-                               }
-       #elif _WIN32
-                               if (!pGlLayer)
-                               {
-                                       continue;
-                               }
-       #endif
-
-                               pThis->CompositeLayer(pGlLayer);
-                       }
-
-               }
-               else if (pGlLayer && pGlLayer->IsMapped())
-               {
-                       pThis->CompositeLayer(pGlLayer);
-               }
-
-
-
-               RPRINT(">> CommandHandlerComposite() COMMAND_COMPOSITE - end \n");
-
-//             else
-//             {
-
-
-//                     if (commandArg.__pCommandGlLayer)
-//                     {
-//                             pThis->CommandHandlerComposite(commandArg.__pCommandGlLayer);
-//                     }
-//                     RPRINT("pThis->Animate() skipped \n");
-//             }
-       }
-       return null;
-}
-
-#endif
 void*
 _GlCompositor::CompositeProc(void* pData)
 {
@@ -994,6 +916,7 @@ _GlCompositor::CompositeProc(void* pData)
 
                case COMMAND_COMPOSITE:
                        RPRINT(">> CommandHandlerComposite() COMMAND_COMPOSITE - start \n");
+               {
                        if (pThis->Animate())
                        {
                                pThis->CommandHandlerComposite(null);
@@ -1009,6 +932,7 @@ _GlCompositor::CompositeProc(void* pData)
                        needReply = false;
 
                        RPRINT(">> CommandHandlerComposite() COMMAND_COMPOSITE - end \n");
+               }
                        break;
                        //continue; // WARNING: reply already done
 
index 2e3fec7..ec6c3ab 100644 (file)
@@ -40,6 +40,7 @@
 
 #include "FUiAnim_GlVisualElementSurfaceImpl.h"
 #include "FUiAnim_VisualElementSurfaceManager.h"
+#include "FUiAnim_GlCompositor.h"
 #include "FUiAnim_GlRenderManager.h"
 
 #include "FUiAnimMesh.h"
@@ -248,7 +249,7 @@ result
 _GlNode::SyncStatus(VisualElementSurface* pSurface, _VisualElementImpl& element)
 {
        _VisualElementSurfaceImpl* pSurfaceImpl = null;
-//    SysAssertf(_GlRenderManager::GetInstance()->IsInRenderThread() == true, "Invalid thread GL reconfigure");
+       SysAssertf(_GlRenderManager::GetInstance()->GetCompositor()->IsInCompositorThread() == true, "Invalid thread GL reconfigure");
 
        if (!__syncNeeded)
        {
index 1edb604..17a5bae 100644 (file)
@@ -862,8 +862,8 @@ _GlRenderQueue::SetRenderTarget(_GlVisualElementSurfaceImpl* pRenderTarget)
        }
        if(pRenderTarget)
        {
+               pRenderTarget->AddRef();
                __pRenderTarget = pRenderTarget;
-               __pRenderTarget->AddRef();
        }
 }
 
index 308dc9e..2ed38f8 100644 (file)
@@ -371,8 +371,12 @@ _GlVisualElementSurfaceImpl::Invalidate(bool invalidate)
 //     if (__textureInfo.updated != invalidate)
        {
                __textureInfo.updated = invalidate;
-
        }
+//     if(__textureInfo.updated && __textureInfo.type == TEXTURE_NORMAL)
+//     {
+//             _VisualElementSurfaceManager::GetInstance()->InvalidateTexture(&__textureInfo);
+//             __textureInfo.updated = false;
+//     }
 }
 
 const _GlLayer*
index 85615c1..b66410d 100755 (executable)
@@ -31,9 +31,9 @@ const int _MeshGeneratorImpl::Square::SQUARE_INDEX_COUNT = FACE_COUNT * TRIANGLE
 
 _MeshGeneratorImpl::Square::Square(float sideLength):
                pSquareVertex(null),
-               pSquareIndex(null),
                pSquareNormal(null),
-               pSquareTexCoord(null)
+               pSquareTexCoord(null),
+               pSquareIndex(null)
 {
        pSquareVertex = new (std::nothrow) float[SQUARE_VERTEX_COUNT*3];
        SysTryReturnVoidResult(NID_UI_ANIM, pSquareVertex != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
@@ -139,9 +139,9 @@ const int _MeshGeneratorImpl::Triangle::TRIANGLE_INDEX_COUNT = FACE_COUNT * INDE
 
 _MeshGeneratorImpl::Triangle::Triangle(float sideLength):
                pTriangleVertex(null),
-               pTriangleIndex(null),
                pTriangleNormal(null),
-               pTriangleTexCoord(null)
+               pTriangleTexCoord(null),
+               pTriangleIndex(null)
 {
        pTriangleVertex = new (std::nothrow) float[TRIANGLE_VERTEX_COUNT*3];
        SysTryReturnVoidResult(NID_UI_ANIM, pTriangleVertex != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
@@ -240,9 +240,9 @@ const int _MeshGeneratorImpl::Cube::CUBE_INDEX_COUNT = FACE_COUNT * TRIANGLES_PE
 
 _MeshGeneratorImpl::Cube::Cube(float sideLength):
                pCubeVertex(null),
-               pCubeIndex(null),
                pCubeNormal(null),
-               pCubeTexCoord(null)
+               pCubeTexCoord(null),
+               pCubeIndex(null)
 {
        pCubeVertex = new (std::nothrow) float[CUBE_VERTEX_COUNT*3];
        SysTryReturnVoidResult(NID_UI_ANIM, pCubeVertex != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
@@ -542,9 +542,9 @@ const int _MeshGeneratorImpl::Pyramid::PYRAMID_INDEX_COUNT = TRIANGLE_FACE_COUNT
 
 _MeshGeneratorImpl::Pyramid::Pyramid(float height, float downSideLength):
                pPyramidVertex(null),
-               pPyramidIndex(null),
                pPyramidNormal(null),
-               pPyramidTexCoord(null)
+               pPyramidTexCoord(null),
+               pPyramidIndex(null)
 {
        pPyramidVertex = new (std::nothrow) float[PYRAMID_VERTEX_COUNT*3];
        SysTryReturnVoidResult(NID_UI_ANIM, pPyramidVertex != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
@@ -728,9 +728,9 @@ const int _MeshGeneratorImpl::TruncatedPyramid::TRUNC_PYRAMID_INDEX_COUNT = FACE
 
 _MeshGeneratorImpl::TruncatedPyramid::TruncatedPyramid(float upLength, float downLength):
                pTruncatedPyramidVertex(null),
-               pTruncatedPyramidIndeces(null),
                pTruncatedPyramidNormals(null),
-               pTruncatedPyramidTexCoords(null)
+               pTruncatedPyramidTexCoords(null),
+               pTruncatedPyramidIndeces(null)
 {
        pTruncatedPyramidVertex = new (std::nothrow) float[TRUNC_PYRAMID_VERTEX_COUNT*3];
        SysTryReturnVoidResult(NID_UI_ANIM, pTruncatedPyramidVertex != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
@@ -1031,9 +1031,9 @@ const float _MeshGeneratorImpl::Cylinder::CYLINDER_RADIANS_ANGLE = CYLINDER_ANGL
 
 _MeshGeneratorImpl::Cylinder::Cylinder(float height, float radius):
                pCylinderVertex(null),
-               pCylinderIndex(null),
                pCylinderNormal(null),
-               pCylinderTexCoord(null)
+               pCylinderTexCoord(null),
+               pCylinderIndex(null)
 {
        pCylinderVertex = new (std::nothrow) float[CYLINDER_VERTEX_COUNT*3];
        SysTryReturnVoidResult(NID_UI_ANIM, pCylinderVertex != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
@@ -1222,9 +1222,9 @@ const float _MeshGeneratorImpl::Coniform::CONIFORM_RADIANS_ANGLE = CONIFORM_ANGL
 
 _MeshGeneratorImpl::Coniform::Coniform(float height, float radius):
                pConiformVertex(null),
-               pConiformIndex(null),
                pConiformNormal(null),
-               pConiformTexCoord(null)
+               pConiformTexCoord(null),
+               pConiformIndex(null)
 {
        pConiformVertex = new (std::nothrow) float[CONIFORM_VERTEX_COUNT*3];
        SysTryReturnVoidResult(NID_UI_ANIM, pConiformVertex != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
@@ -1361,6 +1361,7 @@ const float _MeshGeneratorImpl::Sphere::SPHERE_LONGTITUDE_DELTA = Tizen::Ui::Ani
 
 _MeshGeneratorImpl::Sphere::Sphere(float radius):
                pSphereVertex(null),
+               pSphereNormal(null),
                pSphereTexCoord(null)
 {
                pSphereVertex = new (std::nothrow) float[SPHERE_VERTEX_COUNT*3];
index 72f8675..b37b959 100755 (executable)
@@ -48,8 +48,8 @@ private:
        public:
                float* pSquareVertex;
                float* pSquareNormal;
-               Tizen::Ui::Animations::_MeshImpl::IndexType* pSquareIndex;
                float* pSquareTexCoord;
+               Tizen::Ui::Animations::_MeshImpl::IndexType* pSquareIndex;
                static const int SQUARE_VERTEX_COUNT;
                static const int SQUARE_INDEX_COUNT;
                static const int SQUARE_TEX_COORD_COUNT;
@@ -76,8 +76,8 @@ private:
        public:
                float* pTriangleVertex;
                float* pTriangleNormal;
-               Tizen::Ui::Animations::_MeshImpl::IndexType* pTriangleIndex;
                float* pTriangleTexCoord;
+               Tizen::Ui::Animations::_MeshImpl::IndexType* pTriangleIndex;
                static const int TRIANGLE_VERTEX_COUNT;
                static const int TRIANGLE_INDEX_COUNT;
                static const int TRIANGLE_TEX_COORD_COUNT;
@@ -103,8 +103,9 @@ private:
        public:
                float* pCubeVertex;
                float* pCubeNormal;
-               Tizen::Ui::Animations::_MeshImpl::IndexType* pCubeIndex;
                float* pCubeTexCoord;
+               Tizen::Ui::Animations::_MeshImpl::IndexType* pCubeIndex;
+
                static const int CUBE_VERTEX_COUNT;
                static const int CUBE_INDEX_COUNT;
                static const int CUBE_TEX_COORD_COUNT;
@@ -131,8 +132,9 @@ private:
        public:
                float* pPyramidVertex;
                float* pPyramidNormal;
-               Tizen::Ui::Animations::_MeshImpl::IndexType* pPyramidIndex;
                float* pPyramidTexCoord;
+               Tizen::Ui::Animations::_MeshImpl::IndexType* pPyramidIndex;
+
                static const int PYRAMID_VERTEX_COUNT;
                static const int PYRAMID_INDEX_COUNT;
                static const int PYRAMID_TEX_COORD_COUNT;
@@ -161,8 +163,9 @@ private:
        public:
                float* pTruncatedPyramidVertex;
                float* pTruncatedPyramidNormals;
-               Tizen::Ui::Animations::_MeshImpl::IndexType*    pTruncatedPyramidIndeces;
                float* pTruncatedPyramidTexCoords;
+               Tizen::Ui::Animations::_MeshImpl::IndexType*    pTruncatedPyramidIndeces;
+
                static const int TRUNC_PYRAMID_VERTEX_COUNT;
                static const int TRUNC_PYRAMID_INDEX_COUNT;
                static const int TRUNC_PYRAMID_TEX_COORD_COUNT;
@@ -189,8 +192,9 @@ private:
        public:
                float* pCylinderVertex;
                float* pCylinderNormal;
-               Tizen::Ui::Animations::_MeshImpl::IndexType* pCylinderIndex;
                float* pCylinderTexCoord;
+               Tizen::Ui::Animations::_MeshImpl::IndexType* pCylinderIndex;
+
                static const int CYLINDER_VERTEX_COUNT;
                static const int CYLINDER_INDEX_COUNT;
                static const int CYLINDER_TEX_COORD_COUNT;
@@ -219,8 +223,9 @@ private:
        public:
                float* pConiformVertex;
                float* pConiformNormal;
-               Tizen::Ui::Animations::_MeshImpl::IndexType* pConiformIndex;
                float* pConiformTexCoord;
+               Tizen::Ui::Animations::_MeshImpl::IndexType* pConiformIndex;
+
                static const int CONIFORM_VERTEX_COUNT;
                static const int CONIFORM_INDEX_COUNT;
                static const int CONIFORM_TEX_COORD_COUNT;
index 4e0e913..b620a1c 100644 (file)
@@ -271,6 +271,29 @@ _MeshImpl::AllocIndices(int count)
 }
 
 result
+_MeshImpl::SetVertices(float* pVertices, int size)
+{
+       MESH_LOCK();
+
+       int arrayIndex = size/APPROPRIATE_COUNT_VERTICES;
+
+       SysTryReturnResult(NID_UI_ANIM, __pVertices != null, E_INVALID_STATE, " Vertices haven't been allocated yet");
+       SysTryReturnResult(NID_UI_ANIM, ((size % APPROPRIATE_COUNT_VERTICES) == 0), E_INVALID_ARG, " size is not invalid, it should be divided with %d", APPROPRIATE_COUNT_VERTICES);
+       bool arrayIndexState = ((arrayIndex < __countOfAllocatedVertex) && (arrayIndex >= 0));
+       SysTryReturnResult(NID_UI_ANIM, arrayIndexState, E_OUT_OF_RANGE, " arrayIndex is big in order to SetVertex (%d, %d)", arrayIndex, __countOfAllocatedVertex);
+
+       memcpy(__pVertices, pVertices, size);
+
+       if (__countOfVertex <= arrayIndex)
+       {
+               __countOfVertex = arrayIndex + 1;
+       }
+       AdjustBoundingVolume();
+       return E_SUCCESS;
+}
+
+
+result
 _MeshImpl::SetVertex(int arrayIndex, const FloatPoint3& vertex)
 {
        MESH_LOCK();
@@ -295,6 +318,31 @@ _MeshImpl::SetVertex(int arrayIndex, const FloatPoint3& vertex)
 }
 
 result
+_MeshImpl::SetTextureCoords(float* pTextureCoords, int size)
+{
+       result r;
+       MESH_LOCK();
+
+       if(__pTexCoordinates == null)
+       {
+               r = AllocTextureCoordinates();
+               SysTryReturnResult(NID_UI_ANIM, r != E_OUT_OF_MEMORY, r, " Memory allocation failed due to out of memory");
+       }
+
+       SysTryReturnResult(NID_UI_ANIM, __pTexCoordinates, E_INVALID_STATE, " TexCoordinates haven't been allocated");
+
+       int arrayIndex = size/APPROPRIATE_COUNT_TEXTCOORDINATES;
+
+       bool arrayIndexState = ((arrayIndex < __countOfAllocatedVertex) && (arrayIndex >= 0));
+       SysTryReturnResult(NID_UI_ANIM, ((size % APPROPRIATE_COUNT_TEXTCOORDINATES) == 0), E_INVALID_ARG, "The size is not invalid, it should be divided with %d",APPROPRIATE_COUNT_TEXTCOORDINATES);
+       SysTryReturnResult(NID_UI_ANIM, arrayIndexState, E_OUT_OF_RANGE, " arrayIndex is big in order to set TextureCoord(%d, %d)", arrayIndex, __countOfAllocatedVertex);
+
+       memcpy(__pTexCoordinates, pTextureCoords, size);
+
+       return E_SUCCESS;
+}
+
+result
 _MeshImpl::SetTextureCoord(int arrayIndex, const FloatPoint& textureCoord)
 {
        result r;
@@ -320,6 +368,29 @@ _MeshImpl::SetTextureCoord(int arrayIndex, const FloatPoint& textureCoord)
 }
 
 result
+_MeshImpl::SetNormals(float* pNormals, int size)
+{
+       result r;
+       MESH_LOCK();
+
+       if(__pNormals == null)
+       {
+               r = AllocNormals();
+               SysTryReturnResult(NID_UI_ANIM, r != E_OUT_OF_MEMORY, r, " Memory allocation failed due to out of memory");
+       }
+       int arrayIndex = size/APPROPRIATE_COUNT_NORMALS;
+
+       bool arrayIndexState = ((arrayIndex < __countOfAllocatedVertex) && (arrayIndex >= 0));
+       SysTryReturnResult(NID_UI_ANIM, ((size % APPROPRIATE_COUNT_NORMALS) == 0), E_INVALID_ARG, "The size is not invalid, it should be divided with %d", APPROPRIATE_COUNT_NORMALS);
+       SysTryReturnResult(NID_UI_ANIM, arrayIndexState, E_OUT_OF_RANGE, " arrayIndex is big in order to set Normal(%d, %d)", arrayIndex, __countOfAllocatedVertex);
+
+       memcpy(__pNormals, pNormals, size);
+
+       return E_SUCCESS;
+}
+
+
+result
 _MeshImpl::SetNormal(int arrayIndex, const FloatPoint3& normal)
 {
        result r;
@@ -344,6 +415,28 @@ _MeshImpl::SetNormal(int arrayIndex, const FloatPoint3& normal)
 }
 
 result
+_MeshImpl::SetColors(float* pColors, int size)
+{
+       result r;
+       MESH_LOCK();
+
+       if(__pColors == null)
+       {
+          r = AllocColors();
+          SysTryReturnResult(NID_UI_ANIM, r != E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, " Memory allocation failed due to out of memory");
+       }
+       int arrayIndex = size/APPROPRIATE_COUNT_COLORS;
+
+       bool arrayIndexState = ((arrayIndex < __countOfAllocatedVertex) && (arrayIndex >= 0));
+       SysTryReturnResult(NID_UI_ANIM, ((size % APPROPRIATE_COUNT_COLORS) == 0), E_INVALID_ARG, "The size is not invalid, it should be divided with %d", APPROPRIATE_COUNT_COLORS);
+       SysTryReturnResult(NID_UI_ANIM, arrayIndexState, E_OUT_OF_RANGE, " arrayIndex is big in order to set Color(%d, %d)", arrayIndex, __countOfAllocatedVertex);
+
+       memcpy(__pColors, pColors, size);
+
+       return E_SUCCESS;
+}
+
+result
 _MeshImpl::SetColor(int arrayIndex, const Color& color)
 {
        result r;
@@ -367,6 +460,28 @@ _MeshImpl::SetColor(int arrayIndex, const Color& color)
 }
 
 result
+_MeshImpl::SetIndices(int* pIndices, int size)
+{
+       MESH_LOCK();
+
+       SysTryReturnResult(NID_UI_ANIM, __pIndices != null, E_INVALID_STATE, " Indices haven't been allocated yet");
+
+       int arrayIndex = size;
+
+       bool arrayIndexState = ((arrayIndex < __countOfAllocatedIndex) && (arrayIndex >= 0));
+       SysTryReturnResult(NID_UI_ANIM, arrayIndexState, E_OUT_OF_RANGE, " arrayIndex is big in order to set Indices(%d, %d)", arrayIndex, __countOfAllocatedIndex);
+
+       memcpy(__pIndices, pIndices,size);
+
+       if(__countOfIndex <= arrayIndex)
+       {
+               __countOfIndex = arrayIndex + 1;
+       }
+       return E_SUCCESS;
+}
+
+
+result
 _MeshImpl::SetIndex(int arrayIndex, int vertexIndex)
 {
        MESH_LOCK();
index c0bbde9..f2d0d4e 100644 (file)
@@ -531,7 +531,7 @@ bool _MeshImportSample::Parsing(char* pStrAse)
                                                                        tmpIdx[0] = tIndex = atoi(pCur);
                                                                        texCoord.x = (__uvMode & UV_U_REVERSE)?(1 - MESH_TVERTLIST[tIndex*2]):(MESH_TVERTLIST[tIndex*2]);
                                                                        texCoord.y =  (__uvMode & UV_V_REVERSE)?(1 - MESH_TVERTLIST[tIndex*2 + 1]):(MESH_TVERTLIST[tIndex*2 + 1]);
-                                                                       pMesh->SetTextureCoord(j++, texCoord);
+                                                                       pMesh->SetTextureCoordinate(j++, texCoord);
                                                                        //tIndex = pMesh->MESH_TFACELIST[j++] = atoi(pCur);
 //                                                                     pMesh->MESH_TFACELIST_REAL[k++] = (__uvMode & UV_U_REVERSE)?(1 - pMesh->MESH_TVERTLIST[tIndex*2]):(pMesh->MESH_TVERTLIST[tIndex*2]);
 //                                                                     pMesh->MESH_TFACELIST_REAL[k++] = (__uvMode & UV_V_REVERSE)?(1 - pMesh->MESH_TVERTLIST[tIndex*2 + 1]):(pMesh->MESH_TVERTLIST[tIndex*2 + 1]);
@@ -540,7 +540,7 @@ bool _MeshImportSample::Parsing(char* pStrAse)
                                                                        tmpIdx[1] = tIndex = atoi(pCur);
                                                                        texCoord.x = (__uvMode & UV_U_REVERSE)?(1 - MESH_TVERTLIST[tIndex*2]):(MESH_TVERTLIST[tIndex*2]);
                                                                        texCoord.y =  (__uvMode & UV_V_REVERSE)?(1 - MESH_TVERTLIST[tIndex*2 + 1]):(MESH_TVERTLIST[tIndex*2 + 1]);
-                                                                       pMesh->SetTextureCoord(j++, texCoord);
+                                                                       pMesh->SetTextureCoordinate(j++, texCoord);
 //                                                                     tIndex = pMesh->MESH_TFACELIST[j++] = atoi(pCur);
 //                                                                     pMesh->MESH_TFACELIST_REAL[k++] = (__uvMode & UV_U_REVERSE)?(1 - pMesh->MESH_TVERTLIST[tIndex*2]):(pMesh->MESH_TVERTLIST[tIndex*2]);
 //                                                                     pMesh->MESH_TFACELIST_REAL[k++] = (__uvMode & UV_V_REVERSE)?(1 - pMesh->MESH_TVERTLIST[tIndex*2 + 1]):(pMesh->MESH_TVERTLIST[tIndex*2 + 1]);
@@ -549,7 +549,7 @@ bool _MeshImportSample::Parsing(char* pStrAse)
                                                                        tmpIdx[2] = tIndex = atoi(pCur);
                                                                        texCoord.x = (__uvMode & UV_U_REVERSE)?(1 - MESH_TVERTLIST[tIndex*2]):(MESH_TVERTLIST[tIndex*2]);
                                                                        texCoord.y =  (__uvMode & UV_V_REVERSE)?(1 - MESH_TVERTLIST[tIndex*2 + 1]):(MESH_TVERTLIST[tIndex*2 + 1]);
-                                                                       pMesh->SetTextureCoord(j++, texCoord);
+                                                                       pMesh->SetTextureCoordinate(j++, texCoord);
 //                                                                     tIndex = pMesh->MESH_TFACELIST[j++] = atoi(pCur);
 //                                                                     pMesh->MESH_TFACELIST_REAL[k++] = (__uvMode & UV_U_REVERSE)?(1 - pMesh->MESH_TVERTLIST[tIndex*2]):(pMesh->MESH_TVERTLIST[tIndex*2]);
 //                                                                     pMesh->MESH_TFACELIST_REAL[k++] = (__uvMode & UV_V_REVERSE)?(1 - pMesh->MESH_TVERTLIST[tIndex*2 + 1]):(pMesh->MESH_TVERTLIST[tIndex*2 + 1]);
index e1a2af5..a05b99c 100644 (file)
@@ -530,7 +530,7 @@ _ModelImporterImpl::LoadMesh(Mesh& pMesh, GeometryMesh::Indexes& VertexIndices,
        {
                pMesh.SetVertex(index, i->pos);
                pMesh.SetNormal(index, i->norm);
-               pMesh.SetTextureCoord(index, i->texC);
+               pMesh.SetTextureCoordinate(index, i->texC);
        }
 
        //indices
index 1fd2aff..67ce90a 100644 (file)
@@ -52,7 +52,7 @@
 #ifndef BUILD_UI_CORE
 #include "FUiAnim_Looper.h"
 #endif
-
+#include "FUiAnim_GlCompositor.h"
 #include "FUiAnim_GlRenderManager.h"
 #endif
 
@@ -571,7 +571,7 @@ _AnimationData::NotifyAnimationStarted(void)
                        return;
                }
 
-               SysAssertf(_GlRenderManager::GetInstance()->IsInRenderThread() == false, "Invalid thread");
+               SysAssertf(_GlRenderManager::GetInstance()->GetCompositor()->IsInCompositorThread()== false, "Invalid thread");
 
                switch (__status)
                {
@@ -595,7 +595,7 @@ _AnimationData::NotifyAnimationStarted(void)
                        return;
                }
 
-               SysAssertf(_GlRenderManager::GetInstance()->IsInRenderThread() == false, "Invalid thread");
+               SysAssertf(_GlRenderManager::GetInstance()->GetCompositor()->IsInCompositorThread() == false, "Invalid thread");
 
                switch (__status)
                {
@@ -636,7 +636,7 @@ _AnimationData::NotifyAnimationFinished(bool completed)
                        return;
                }
 
-               SysAssertf(_GlRenderManager::GetInstance()->IsInRenderThread() == false, "Invalid thread");
+               SysAssertf(_GlRenderManager::GetInstance()->GetCompositor()->IsInCompositorThread() == false, "Invalid thread");
 
                pListener->OnVisualElementAnimationFinished(__animation, __name, static_cast< VisualElement& >(pAnimationImpl->GetEventTarget()), completed);
        }
@@ -648,7 +648,7 @@ _AnimationData::NotifyAnimationFinished(bool completed)
                        return;
                }
 
-               SysAssertf(_GlRenderManager::GetInstance()->IsInRenderThread() == false, "Invalid thread");
+               SysAssertf(_GlRenderManager::GetInstance()->GetCompositor()->IsInCompositorThread() == false, "Invalid thread");
 
                pListener->OnObjectAnimationFinished(__animation, __name, pAnimationImpl->GetEventTarget(), completed);
        }
@@ -676,7 +676,7 @@ _AnimationData::OnTickOccurred(Tizen::Base::Object& target, const Tizen::Ui::Var
 
                        if (pTickListener != null)
                        {
-                               SysAssertf(_GlRenderManager::GetInstance()->IsInRenderThread() == false, "Invalid thread");
+                               SysAssertf(_GlRenderManager::GetInstance()->GetCompositor()->IsInCompositorThread() == false, "Invalid thread");
 
                                pTickListener->OnTickOccurred(*pValueAnimation, __name, static_cast< VisualElement& >(pValueAnimationImpl->GetEventTarget()), currentValue);
                        }
@@ -687,7 +687,7 @@ _AnimationData::OnTickOccurred(Tizen::Base::Object& target, const Tizen::Ui::Var
 
                        if (pTickListener != null)
                        {
-                               SysAssertf(_GlRenderManager::GetInstance()->IsInRenderThread() == false, "Invalid thread");
+                               SysAssertf(_GlRenderManager::GetInstance()->GetCompositor()->IsInCompositorThread() == false, "Invalid thread");
 
                                pTickListener->OnTickOccurred(*pValueAnimation, __name, pValueAnimationImpl->GetEventTarget(), currentValue);
                        }
@@ -1911,7 +1911,7 @@ _TransactionNode::ProcessAnimationTick(unsigned int tick)
                                rawEvent.data.transaction.pNode = this;
                                rawEvent.data.transaction.pChild = pChild;
                                rawEvent.data.transaction.completed = true;
-                               rawEvent.data.transaction.mainThread = !_GlRenderManager::GetInstance()->IsInRenderThread();
+                               rawEvent.data.transaction.mainThread = !_GlRenderManager::GetInstance()->GetCompositor()->IsInCompositorThread();
 
                                _Looper::GetInstance()->PostRawEvent(rawEvent, false);
 #endif
@@ -1967,7 +1967,8 @@ _TransactionNode::OnAnimationTick(unsigned int tick)
                        if (pAnimationData->GetStatus() == _AnimationData::_STATUS_START)
                        {
 //                             __pRoot->RemoveAnimationByDuplicatedProperty(*pAnimationData);
-                               _AnimationManager::GetInstance()->RemoveAnimationByDuplicatedProperty(*pAnimationData, !_GlRenderManager::GetInstance()->IsInRenderThread());
+//                             _AnimationManager::GetInstance()->RemoveAnimationByDuplicatedProperty(*pAnimationData, !_GlCompositor::GetInstance()->IsInRenderThread());
+                               _AnimationManager::GetInstance()->RemoveAnimationByDuplicatedProperty(*pAnimationData, !_GlRenderManager::GetInstance()->GetCompositor()->IsInCompositorThread());
                        }
 
                        // Send start, repeat notification
index 60b8bab..520fb58 100644 (file)
 
 namespace Tizen { namespace Ui { namespace Animations { namespace _Math {
 
+const float    fEPS = std::numeric_limits<float>::epsilon();
+const float    fMAX = std::numeric_limits<float>::max();
+const float    fMIN = std::numeric_limits<float>::min();
+
+const float fPI_2 = 6.283185307179586232f;
+const float fPI  = fPI_2 * 0.5f;
+//const float PI        = 3.141592654f;
+
+const float fDEG2RADCoeff = fPI / 180.0f;
+const float fRAD2DEGCoeff = 180.0f / fPI;
+
 float
 FDegrees2Radians(float aDEG)
 {
index 9d2712b..0b249b3 100644 (file)
 
 namespace Tizen { namespace Ui { namespace Animations { namespace _Math {
 
-const float    fEPS = std::numeric_limits<float>::epsilon();
-const float    fMAX = std::numeric_limits<float>::max();
-const float    fMIN = std::numeric_limits<float>::min();
+extern const float     fEPS;
+extern const float     fMAX;
+extern const float     fMIN;
 
-const float fPI_2 = 6.283185307179586232f;
-const float fPI  = fPI_2 * 0.5f;
+extern const float fPI_2;
+extern const float fPI;
 //const float PI        = 3.141592654f;
 
-const float fDEG2RADCoeff = fPI / 180.0f;
-const float fRAD2DEGCoeff = 180.0f / fPI;
+extern const float fDEG2RADCoeff;
+extern const float fRAD2DEGCoeff;
 
 float FDegrees2Radians(float aDEG);
 float FRadians2Degrees(float aRAD);
index 8c62fd5..d01cf61 100644 (file)
@@ -2191,9 +2191,9 @@ Matrix4::CreateSegmentTransformation(const Vector3& positionPrevious1, const Vec
                if (Equal(axe.Length(), 0.f, 1e-5))
                {
 //                     ASSERT(!Equal(prev.x, 0.f) || !Equal(prev.y, 0.f) || !Equal(prev.z, 0.f));
-                       float x;
-                       float y;
-                       float z;
+                       float x = 0.0f;
+                       float y = 0.0f;
+                       float z = 0.0f;
                        if (!Equal(prev.z, 0.f))
                        {
                                x = 1.f;
index f69798d..36e1a1f 100644 (file)
@@ -32,6 +32,7 @@
 #include "FUiAnim_NativeLayer.h"
 #include "FUiAnim_RootVisualElement.h"
 #include "FUiAnim_VisualElementImpl.h"
+#include "FUiAnim_VisualElementEnvironment.h"
 #include "FUiAnim_AnimationManager.h"
 #include "FUiAnim_DisplayManager.h"
 #include "FUiAnim_EcoreXLooper.h"
index 8147c69..30a9b06 100644 (file)
@@ -81,10 +81,15 @@ public:
        static Mesh* LoadMeshN(const Tizen::Base::String& fileName, bool loadWithoutController);
 
        result SetVertex(int arrayIndex, const Tizen::Graphics::FloatPoint3& point);
+       result SetVertices(float* pVertiecs, int size);
        result SetTextureCoord(int arrayIndex, const Tizen::Graphics::FloatPoint& textureCoord);
+       result SetTextureCoords(float* pTextureCoords, int size);
        result SetNormal(int arrayIndex, const Tizen::Graphics::FloatPoint3& normal);
+       result SetNormals(float* pNormals, int size);
        result SetColor(int arrayIndex, const Tizen::Graphics::Color& color);
+       result SetColors(float* pColors, int size);
        result SetIndex(int arrayIndex, int vertexIndex);
+       result SetIndices(int* pIndices, int size);
 
        Tizen::Graphics::FloatPoint3 GetVertex(int arrayIndex) const;
        Tizen::Graphics::FloatPoint GetTextureCoord(int arrayIndex) const;