00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <ardev/ardevconfig.h>
00022 #ifdef HAVE_LIBAR
00023
00024 #ifndef ARIDE_ARTOOLKITHANDLERS_H
00025 #define ARIDE_ARTOOLKITHANDLERS_H
00026
00027 #include "cm_objecthandler.h"
00028 #include "cm_parameter.h"
00029 #include <ardev/artoolkit.h>
00030
00031 void RegisterARToolKitObjectHandlers();
00032
00033
00034 class ARToolKitPreProcessHandler : public PreProcessObjectHandler
00035 {
00036 public:
00037 ARToolKitPreProcessHandler();
00038 ~ARToolKitPreProcessHandler();
00039
00040 ARToolKitPreProcess & GetObject();
00041 void RemoveObject();
00042
00043 static ObjectHandler * CreateHandler() {return static_cast<ObjectHandler * > (new ARToolKitPreProcessHandler);};
00044 protected:
00045 ARToolKitPreProcess * Obj;
00046
00047 IntParameter Threshold;
00048 CameraObjectParameter Cam;
00049 };
00050
00051
00052 class ARToolKitPreProcessParameter : public StringParameter
00053 {
00054 public:
00055 ARToolKitPreProcessParameter(QString _Name, QString _Description, QString _DefaultValue="") : StringParameter(_Name,_Description,_DefaultValue) {Type="ARToolKitPreProcess";};
00056 virtual ~ARToolKitPreProcessParameter() {};
00057
00058 ARToolKitPreProcessHandler * GetClass()
00059 {
00060 if (Value == "")
00061 throw aride_exception(ARIDE_CLASS_NOT_FOUND, __FILE__, __LINE__);
00062 aride_object * temp = theMainWindow->GetObjectByName(Value);
00063 if (temp == NULL)
00064 throw aride_exception(ARIDE_CLASS_NOT_FOUND, __FILE__, __LINE__);
00065 if (temp->Section == ARIDE_PREPROCESS && temp->Type == "ARToolKitPreProcess")
00066 return reinterpret_cast<ARToolKitPreProcessHandler *> (temp->Handler);
00067 throw aride_exception(ARIDE_CLASS_NOT_FOUND, __FILE__, __LINE__);
00068 };
00069 };
00070
00071 class ARToolKitPositionHandler : public PositionObjectHandler
00072 {
00073 public:
00074 ARToolKitPositionHandler();
00075 ~ARToolKitPositionHandler();
00076
00077 PositionObject & GetObject();
00078 void RemoveObject();
00079
00080 static ObjectHandler * CreateHandler() {return static_cast<ObjectHandler * > (new ARToolKitPositionHandler);};
00081 protected:
00082 ARToolKitPosition * Obj;
00083
00084 DoubleParameter PattWidth;
00085 StringParameter PattFile;
00086 ARToolKitPreProcessParameter Pre;
00087 };
00088
00089 #endif
00090 #endif