![]() |
ARX
1.0
The next-generation open source augmented reality toolkit.
|
#include <ARX/AR/ar.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ARX/AR2/coord.h>
#include <ARX/AR2/featureSet.h>
#include <ARX/AR2/template.h>
#include <ARX/AR2/tracking.h>
#include <ARX/AR2/util.h>
Functions | |
AR2SurfaceSetT * | ar2ReadSurfaceSet (const char *filename, const char *ext, ARPattHandle *pattHandle) |
int | ar2FreeSurfaceSet (AR2SurfaceSetT **surfaceSet) |
int | ar2SetInitTrans (AR2SurfaceSetT *surfaceSet, float trans[3][4]) |
int ar2FreeSurfaceSet | ( | AR2SurfaceSetT ** | surfaceSet | ) |
Finalise and dispose of an NFT texture tracking surface set. Once a surface set (read by ar2ReadSurfaceSet()) is no longer required, it should be disposed of by calling ar2FreeSurfaceSet().
surfaceSet | Pointer to a location pointing to an AR2SurfaceSetT. On return, this pointer will be set to NULL. |
AR2SurfaceSetT * ar2ReadSurfaceSet | ( | const char * | filename, |
const char * | ext, | ||
ARPattHandle * | pattHandle | ||
) |
Read an NFT texture tracking surface set from file. Allocates, initialises and reads the contents of a surface set from storage. The surface set is usually generated by the genTexData utility, or equivalent.
Once the surface set is no longer required, it should be disposed of by calling ar2FreeSurfaceSet().
filename | Pathname of the surface set to be loaded, less any filename extension. |
ext | Filename extension of the surface set to be loaded. Ususally this will be "fset". |
pattHandle | If the surface set includes, template markers, a valid ARPattHandle is required to be passed in this parameter. Otherwise, NULL may be passed. |
int ar2SetInitTrans | ( | AR2SurfaceSetT * | surfaceSet, |
float | trans[3][4] | ||
) |
Sets initial transform for subsequent NFT texture tracking. Before the first call to ar2Tracking(), this function must be called to set the initial tracking transform. The initial transform may be obtained from NFT KPM tracking, or via a fiducial marker embedded in the NFT image. The initial transform must also be set after each loss of tracking (i.e. after each instance when ar2Tracking() does not return 0.
surfaceSet | |
trans | Pointer to a float[3][4] array from which the initial transform will be copied. |