00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef ARTOOLKIT_H
00016 #define ARTOOLKIT_H
00017
00018 #include "pandabase.h"
00019
00020 #ifdef HAVE_ARTOOLKIT
00021
00022 #include "nodePath.h"
00023 #include "texture.h"
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 class EXPCL_VISION ARToolKit {
00044
00045 PUBLISHED:
00046 static ARToolKit *make(NodePath camera, const Filename ¶mfile, double markersize);
00047 ~ARToolKit();
00048
00049 INLINE void set_threshold(double n);
00050 void attach_pattern(const Filename &pattern, NodePath path);
00051 void detach_patterns();
00052 void analyze(Texture *tex, bool do_flip_texture = true);
00053
00054 private:
00055 static int get_pattern(const Filename &pattern);
00056 ARToolKit();
00057 void cleanup();
00058
00059 typedef pmap<Filename, int> PatternTable;
00060 static PatternTable _pattern_table;
00061
00062 typedef pmap<int, NodePath> Controls;
00063 Controls _controls;
00064
00065 NodePath _camera;
00066 void *_camera_param;
00067 double _threshold;
00068 double _marker_size;
00069 double _prev_conv[3][4];
00070 bool _have_prev_conv;
00071 };
00072
00073 #include "arToolKit.I"
00074
00075 #endif // HAVE_ARTOOLKIT
00076 #endif // ARTOOLKIT_H