00001
00022 #ifndef __ARTOOLKITPLUS_HULL_HEADERFILE__
00023 #define __ARTOOLKITPLUS_HULL_HEADERFILE__
00024
00025 #include <ARToolKitPlus/config.h>
00026
00027 namespace ARToolKitPlus {
00028
00029 const int MAX_HULL_POINTS = 64;
00030
00031
00032 struct AR_EXPORT MarkerPoint {
00033 typedef int coord_type;
00034
00035 coord_type x, y;
00036 unsigned short markerIdx, cornerIdx;
00037 };
00038
00039 inline int iabs(int nValue) {
00040 return nValue >= 0 ? nValue : -nValue;
00041 }
00042
00043 AR_EXPORT int nearHull_2D(const MarkerPoint* P, int n, int k, MarkerPoint* H);
00044
00045 AR_EXPORT void findLongestDiameter(const MarkerPoint* nPoints, int nNumPoints, int &nIdx0, int &nIdx1);
00046
00047 AR_EXPORT void findFurthestAway(const MarkerPoint* nPoints, int nNumPoints, int nIdx0, int nIdx1, int& nIdxFarthest);
00048
00049 AR_EXPORT void maximizeArea(const MarkerPoint* nPoints, int nNumPoints, int nIdx0, int nIdx1, int nIdx2, int& nIdxMax);
00050
00051 AR_EXPORT void sortIntegers(int& nIdx0, int& nIdx1, int& nIdx2);
00052
00053 AR_EXPORT void sortInLastInteger(int& nIdx0, int& nIdx1, int& nIdx2, int &nIdx3);
00054
00055 }
00056
00057
00058 #endif //__ARTOOLKITPLUS_HULL_HEADERFILE__