![]() |
ARX
1.0
The next-generation open source augmented reality toolkit.
|
#include <stdio.h>#include <math.h>#include <ARX/AR/ar.h>#include <string.h>#include <ARX/ARUtil/file_utils.h>Functions | |
| int | arPattLoadFromBuffer (ARPattHandle *pattHandle, const char *buffer) |
| int | arPattLoad (ARPattHandle *pattHandle, const char *filename) |
| Load a pattern file into a pattern handle. More... | |
| int | arPattFree (ARPattHandle *pattHandle, int patno) |
| Frees (unloads) a pattern file from memory. More... | |
| int | arPattActivate (ARPattHandle *pattHandle, int patno) |
| Activate a previously deactivated pattern. More... | |
| int | arPattDeactivate (ARPattHandle *pattHandle, int patno) |
| Deactivate a previously activated pattern. More... | |
| int arPattActivate | ( | ARPattHandle * | pattHandle, |
| int | patno | ||
| ) |
Activate a previously deactivated pattern.
When a pattern is activated, is becomes available for recognition in a scene. This is the default state for a loaded pattern.
| pattHandle | The handle holding the loaded pattern which is to be reactivated. |
| patno | The index into the pattern handle's array of patterns to the pattern to be reactivated. |
| int arPattDeactivate | ( | ARPattHandle * | pattHandle, |
| int | patno | ||
| ) |
Deactivate a previously activated pattern.
When a pattern is activated, is becomes unavailable for recognition in a scene. Deactivating unused patterns can speed up recognition time and accuracy when there are multiple patterns in a scene, and it is also useful for controlling interactivity in a scene.
| pattHandle | The handle holding the loaded pattern which is to be deactivated. |
| patno | The index into the pattern handle's array of patterns to the pattern to be deactivated. |
| int arPattFree | ( | ARPattHandle * | pattHandle, |
| int | patno | ||
| ) |
Frees (unloads) a pattern file from memory.
Unloads a pattern from a pattern handle, freeing that slot for another pattern to be loaded, if necessary.
| pattHandle | The pattern handle to unload from. |
| patno | The index into the pattern handle's array of patterns to the pattern to be unloaded. |
| int arPattLoad | ( | ARPattHandle * | pattHandle, |
| const char * | filename | ||
| ) |
Load a pattern file into a pattern handle.
This function loads a pattern template from a file on disk, and attaches it to the given ARPattHandle so making it available for future pattern-matching. Additional patterns can be loaded by calling again with the same ARPattHandle (however no more than AR_PATT_NUM_MAX patterns can be attached to a single ARPattHandle). Patterns are initially loaded in an active state.
Note that matrix-code (2D barcode) markers do not have any associated pattern file and do not need to be loaded.
| pattHandle | Pattern handle, as generated by arPattCreateHandle(), into which the pattern file infomation will be loaded. |
| filename | Pathname of pattern file to load. The pattern file is typically generated by the make_patt program. The pathname is relative to the current working directory, which is operating system- specific. |
| int arPattLoadFromBuffer | ( | ARPattHandle * | pattHandle, |
| const char * | buffer | ||
| ) |
1.9.5