Revert "[Tizen] Implement partial update"
[platform/core/uifw/dali-core.git] / dali / internal / update / manager / update-manager-debug.cpp
index 19f4168..093f779 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
@@ -30,6 +30,8 @@
 #include <dali/public-api/math/radian.h>
 #include <dali/public-api/math/vector2.h>
 
+#ifdef DALI_PRINT_UPDATE_INFO
+
 namespace Dali
 {
 
@@ -48,15 +50,13 @@ static Debug::Filter* gNodeLogFilter = Debug::Filter::New(Debug::Verbose, false,
  */
 void PrintNodes( const Node& node, BufferIndex updateBufferIndex, int level )
 {
-#if defined(DEBUG_ENABLED)
   const Vector3& position = node.GetPosition(updateBufferIndex);
   const Vector3& scale = node.GetScale(updateBufferIndex);
   const Vector3& fullPos = node.GetWorldPosition(updateBufferIndex);
-  const Quaternion& rotation = node.GetRotation(updateBufferIndex);
+  const Quaternion& rotation = node.GetOrientation(updateBufferIndex);
   Vector3 axis;
-  float angle;
+  Radian angle;
   rotation.ToAxisAngle(axis, angle);
-  angle = angle * 180.0f / Math::PI;
 
   std::string nodeName= DALI_LOG_GET_OBJECT_STRING((&node));
 
@@ -68,13 +68,13 @@ void PrintNodes( const Node& node, BufferIndex updateBufferIndex, int level )
     oss << std::setprecision(2) << std::setiosflags(mask)
         << std::setw(level*2) << std::setfill(' ') << "";
     oss << "Node "  << nodeName << " " << &node
-        << "  Pos (" << position.x << ", " << position.y << ", " << position.z << ")"
-        << "  FullPos (" << fullPos.x << ", " << fullPos.y << ", " << fullPos.z << ")"
-        << "  Rot (" << angle << "deg <" << axis.x << ", " << axis.y << ", " << axis.z << ">)"
+        << "  Position (" << position.x << ", " << position.y << ", " << position.z << ")"
+        << "  WorldPosition (" << fullPos.x << ", " << fullPos.y << ", " << fullPos.z << ")"
+        << "  Orientation (" << Degree(angle).degree << "degrees <" << axis.x << ", " << axis.y << ", " << axis.z << ">)"
         << "  Scale (" << scale.x << ", " << scale.y << ", " << scale.z << ")"
         << std::endl;
 
-    DALI_LOG_INFO(gNodeLogFilter, Debug::Verbose, "%s", oss.str().c_str());
+    DALI_LOG_INFO(gNodeLogFilter, Debug::Verbose, "%s\n", oss.str().c_str());
   }
 
   {
@@ -86,7 +86,7 @@ void PrintNodes( const Node& node, BufferIndex updateBufferIndex, int level )
         << std::setw(level*2) << std::setfill(' ') << "";
 
     std::string trafoMatrix = Debug::MatrixToString(node.GetWorldMatrix(updateBufferIndex), 2, level*2);
-    DALI_LOG_INFO(gNodeLogFilter, Debug::Verbose, "%s", trafoMatrix.c_str());
+    DALI_LOG_INFO(gNodeLogFilter, Debug::Verbose, "%s\n", trafoMatrix.c_str());
   }
 
   ++level;
@@ -95,25 +95,22 @@ void PrintNodes( const Node& node, BufferIndex updateBufferIndex, int level )
   {
     PrintNodes(**iter, updateBufferIndex, level);
   }
-#endif // DEBUG_ENABLED
 }
 
 void PrintNodeTree( const Node& node, BufferIndex bufferIndex, std::string indentation )
 {
-#if defined(DEBUG_ENABLED)
-
   std::cout << "Node " << &node
             << " \"" << node.mDebugString << "\""
             << " Origin: "       << node.GetParentOrigin()
             << " Anchor: "       << node.GetAnchorPoint()
             << " Size: "         << node.GetSize(bufferIndex)
             << " Pos: "          << node.GetPosition(bufferIndex)
-            << " Rot: "          << node.GetRotation(bufferIndex)
+            << " Ori: "          << node.GetOrientation(bufferIndex)
             << " Scale: "        << node.GetScale(bufferIndex)
             << " Color: "        << node.GetColor(bufferIndex)
             << " Visible: "      << node.IsVisible(bufferIndex)
             << " World Pos: "    << node.GetWorldPosition(bufferIndex)
-            << " World Rot: "    << node.GetWorldRotation(bufferIndex)
+            << " World Ori: "    << node.GetWorldOrientation(bufferIndex)
             << " World Scale: "  << node.GetWorldScale(bufferIndex)
             << " World Color: "  << node.GetWorldColor(bufferIndex)
             << " World Matrix: " << node.GetWorldMatrix(bufferIndex)
@@ -136,8 +133,6 @@ void PrintNodeTree( const Node& node, BufferIndex bufferIndex, std::string inden
 
     PrintNodeTree(**iter, bufferIndex, nextIndent);
   }
-
-#endif // DEBUG_ENABLED
 }
 
 } // SceneGraph
@@ -145,3 +140,5 @@ void PrintNodeTree( const Node& node, BufferIndex bufferIndex, std::string inden
 } // Internal
 
 } // Dali
+
+#endif