namespace sari2
{
-
class ImageFeatureManager;
+class Database;
/// Holds all required information about one object on scene.
class ImageRecognitionInfo
/// \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.
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;
};
}