[artoolkit-commits] artoolkit/include/AR ar.h, 1.9, 1.10 config.h.in, 1.11, 1.12
Optical marker tracking and overlay for augmented reality.
Brought to you by:
philip_lamb
From: Philip L. <phi...@us...> - 2006-09-27 23:31:37
|
Update of /cvsroot/artoolkit/artoolkit/include/AR In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv30152 Modified Files: ar.h config.h.in Log Message: Add version checking support. Index: ar.h =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/include/AR/ar.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ar.h 25 May 2006 04:08:19 -0000 1.9 --- ar.h 27 Sep 2006 23:31:35 -0000 1.10 *************** *** 271,274 **** --- 271,317 ---- /** + * \brief Get the ARToolKit version information in numberic and string format. + * + * As of version 2.72, ARToolKit now allows querying of the version number + * of the toolkit available at runtime. It is highly recommended that + * any calling program that depends on features in a certain + * ARToolKit version, check at runtime that it is linked to a version + * of ARToolKit that can supply those features. It is NOT sufficient + * to check the ARToolKit SDK header versions, since with ARToolKit implemented + * in dynamically-loaded libraries, there is no guarantee that the + * version of ARToolKit installed on the machine at run-time will as + * recent as the version of the ARToolKit SDK which the host + * program was compiled against. + * The version information is reported in binary-coded decimal format, + * and optionally in an ASCII string. See the config.h header + * for more discussion of the definition of major, minor, tiny and build + * version numbers. + * + * \param versionStringRef + * If non-NULL, the location pointed to will be filled + * with a pointer to a string containing the version information. + * Fields in the version string are separated by spaces. As of version + * 2.72.0, there is only one field implemented, and this field + * contains the major, minor and tiny version numbers + * in dotted-decimal format. The string is guaranteed to contain + * at least this field in all future versions of the toolkit. + * Later versions of the toolkit may add other fields to this string + * to report other types of version information. The storage for the + * string is malloc'ed inside the function. The caller is responsible + * for free'ing the string. + * + * \return Returns the full version number of the ARToolKit in + * binary coded decimal (BCD) format. + * BCD format allows simple tests of version number in the caller + * e.g. if ((arGetVersion(NULL) >> 16) > 0x0272) printf("This release is later than 2.72\n"); + * The major version number is encoded in the most-significant byte + * (bits 31-24), the minor version number in the second-most-significant + * byte (bits 23-16), the tiny version number in the third-most-significant + * byte (bits 15-8), and the build version number in the least-significant + * byte (bits 7-0). + */ + ARUint32 arGetVersion(char **versionStringRef); + + /** * \brief initialize camera parameters. * *************** *** 594,600 **** /** ! * \brief return a normalized pattern from a video image. * ! * This function return a normalized pattern from a video image. The * format is a table with AR_PATT_SIZE_X by AR_PATT_SIZE_Y * \param image video input image --- 637,643 ---- /** ! * \brief Get a normalized pattern from a video image. * ! * This function returns a normalized pattern from a video image. The * format is a table with AR_PATT_SIZE_X by AR_PATT_SIZE_Y * \param image video input image Index: config.h.in =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/include/AR/config.h.in,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** config.h.in 27 Sep 2006 21:47:46 -0000 1.11 --- config.h.in 27 Sep 2006 23:31:35 -0000 1.12 *************** *** 2,5 **** --- 2,51 ---- #define AR_CONFIG_H + // + // As of version 2.72, ARToolKit supports an OpenGL-like + // versioning system, with both header versions (for the version + // of the ARToolKit SDK installed) and runtime version reporting + // via arGetVersion(). + // + + // The MAJOR version number defines non-backwards compatible + // changes in the ARToolKit API. Range: [0-99]. + #define AR_HEADER_VERSION_MAJOR 2 + + // The MINOR version number defines additions to the ARToolKit + // API, or (occsasionally) other significant backwards-compatible + // changes in runtime functionality. Range: [0-99]. + #define AR_HEADER_VERSION_MINOR 72 + + // The TINY version number defines bug-fixes to existing + // functionality. Range: [0-99]. + #define AR_HEADER_VERSION_TINY 0 + + // The BUILD version number will always be zero in releases, + // but may be non-zero in internal builds or in version-control + // repository-sourced code. Range: [0-99]. + #define AR_HEADER_VERSION_BUILD 0 + + // The string representation below must match the major, minor + // and tiny release numbers. + #define AR_HEADER_VERSION_STRING "2.72.0" + + // The macros below are convenience macros to enable use + // of certain ARToolKit header functionality by the release + // version in which it appeared. + // Each time the major version number is incremented, all + // existing macros must be removed, and just one new one + // added for the new major version. + // Each time the minor version number is incremented, a new + // AR_HAVE_HEADER_VERSION_ macro definition must be added. + // Tiny version numbers (being bug-fix releases, by definition) + // are NOT included in the AR_HAVE_HEADER_VERSION_ system. + #define AR_HAVE_HEADER_VERSION_2 + #define AR_HAVE_HEADER_VERSION_2_72 + + // + // End version definitions. + // + #define AR_PIXEL_FORMAT_RGB 1 #define AR_PIXEL_FORMAT_BGR 2 |