Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 204 | chris | 1 | /******************************************************* |
| 2 | * |
||
| 3 | * Author: Hirokazu Kato |
||
| 4 | * |
||
| 5 | * kato@sys.im.hiroshima-cu.ac.jp |
||
| 6 | * |
||
| 7 | * Revision: 1.0 |
||
| 8 | * Date: 01/12/08 |
||
| 9 | * |
||
| 10 | *******************************************************/ |
||
| 11 | #include <stdio.h> |
||
| 12 | #include <stdlib.h> |
||
| 13 | #include <math.h> |
||
| 14 | #include <AR/ar.h> |
||
| 15 | #include <AR/matrix.h> |
||
| 16 | #include <AR/arMulti.h> |
||
| 17 | |||
| 18 | int arMultiActivate(ARMultiMarkerInfoT *config) |
||
| 19 | { |
||
| 20 | int i; |
||
| 21 | |||
| 22 | config->prevF = 0; |
||
| 23 | |||
| 24 | for(i = 0; i < config->marker_num; i++) { |
||
| 25 | if (arActivatePatt(config->marker[i].patt_id) != 1) return (-1); |
||
| 26 | } |
||
| 27 | |||
| 28 | return 0; |
||
| 29 | } |
||
| 30 | |||
| 31 | int arMultiDeactivate(ARMultiMarkerInfoT *config) |
||
| 32 | { |
||
| 33 | int i; |
||
| 34 | |||
| 35 | config->prevF = 0; |
||
| 36 | |||
| 37 | for(i = 0; i < config->marker_num; i++) { |
||
| 38 | if (arDeactivatePatt(config->marker[i].patt_id)) return (-1); |
||
| 39 | } |
||
| 40 | |||
| 41 | return 0; |
||
| 42 | } |
||
| 43 | |||
| 44 | int arMultiFreeConfig(ARMultiMarkerInfoT *config) |
||
| 45 | { |
||
| 46 | int i; |
||
| 47 | |||
| 48 | for(i = 0; i < config->marker_num; i++) { |
||
| 49 | if (arFreePatt(config->marker[i].patt_id) != 1) return (-1); |
||
| 50 | } |
||
| 51 | free(config->marker); |
||
| 52 | free(config); |
||
| 53 | config = NULL; |
||
| 54 | |||
| 55 | return 0; |
||
| 56 | } |