merge with develop repeated.
authorDmytro Vasiliev <d.vasiliev@samsung.com>
Wed, 10 Apr 2013 16:43:24 +0000 (19:43 +0300)
committerDmytro Vasiliev <d.vasiliev@samsung.com>
Wed, 10 Apr 2013 16:43:24 +0000 (19:43 +0300)
Change-Id: I64f1378e84599b33372fbb936a3bea898d666b25

lib/armv7-a/libarengine.so
lib/x86/libarengine.so
src/ImageRecognitionInfo.h [changed mode: 0644->0755]

index d5576c6..240c8cb 100755 (executable)
Binary files a/lib/armv7-a/libarengine.so and b/lib/armv7-a/libarengine.so differ
index cd52b03..7a96a29 100755 (executable)
Binary files a/lib/x86/libarengine.so and b/lib/x86/libarengine.so differ
old mode 100644 (file)
new mode 100755 (executable)
index a23e55c..124d6cd
@@ -20,8 +20,8 @@
 
 namespace sari2
 {
-
 class ImageFeatureManager;
+class Database;
 
 /// Holds all required information about one object on scene.
 class ImageRecognitionInfo
@@ -51,7 +51,15 @@ public:
     /// \return OpenGL transformation matrix for object position.
     inline const float* transform(void) const { return mTransform; }
 
-    inline const float aspect(void) const {return mAspect; }
+    inline const float aspect(void) const { int w = imageWidth(); return w > 0 ? imageHeight() / (float) w : 0.f; }
+
+    /// \brief Width of image of corresponding object from the database.
+    /// \return Image width.
+    int imageWidth(void) const;
+
+    /// \brief Height of image of corresponding object from the database.
+    /// \return Image height.
+    int imageHeight(void) const;
 
     /// \brief Calculates homogeneous coordinates of reference image rectangle
     /// verteces projections on current view.
@@ -64,8 +72,7 @@ private:
     int mIndex; ///< Unique ID of object on scene.
     int mTypeId; ///< ID of object type.
     float mTransform[16]; ///< OpenGL transformation matrix for object position.
-    float mAspect; ///< Object's aspect ratio.
-    const float *mLeft, *mRight;
+    const Database*     mDatabase;
 };
 
 }