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_ARTOOLKITPLUS
00023
00024 #ifndef ARIDE_ARTOOLKITPLUSHANDLERS_H
00025 #define ARIDE_ARTOOLKITPLUSHANDLERS_H
00026
00027 #include "cm_objecthandler.h"
00028 #include "cm_parameter.h"
00029 #include <ardev/artoolkitplus.h>
00030
00031 void RegisterARToolKitPlusObjectHandlers();
00032
00033
00034 class ARToolKitPlusPreProcessHandler : public FrameProcessObjectHandler
00035 {
00036 public:
00037 ARToolKitPlusPreProcessHandler();
00038 ~ARToolKitPlusPreProcessHandler();
00039
00040 ARToolKitPlusPreProcess & GetObject();
00041 void RemoveObject();
00042
00043 static ObjectHandler * CreateHandler() {return reinterpret_cast<ObjectHandler * > (new ARToolKitPlusPreProcessHandler);};
00044 protected:
00045 ARToolKitPlusPreProcess * Obj;
00046
00047 CameraObjectParameter Cam;
00048 };
00049
00050
00051 class ARToolKitPlusPreProcessParameter : public ARObjectParameterBase
00052 {
00053 public:
00054 ARToolKitPlusPreProcessParameter(QString _Name, QString _Description, QString _DefaultValue="") : ARObjectParameterBase(_Name,_Description,_DefaultValue) {Type="ARToolKitPlusPreProcess";};
00055 virtual ~ARToolKitPlusPreProcessParameter() {};
00056
00057 ARToolKitPlusPreProcessHandler * GetClass()
00058 {
00059 if (Value == "")
00060 throw aride_exception(ARDEV_CLASS_NOT_FOUND, __FILE__, __LINE__);
00061 aride_object * temp = CurrentProject->GetObjectByGUID(Value);
00062 if (temp == NULL)
00063 throw aride_exception(ARDEV_CLASS_NOT_FOUND, __FILE__, __LINE__);
00064 if (temp->Section == ARIDE_PREPROCESS && temp->Type == "ARToolKitPlusPreProcess")
00065 return reinterpret_cast<ARToolKitPlusPreProcessHandler *> (temp->Handler);
00066 throw aride_exception(ARDEV_CLASS_NOT_FOUND, __FILE__, __LINE__);
00067 };
00068 };
00069
00070 class ARToolKitPlusPositionHandler : public PositionObjectHandler
00071 {
00072 public:
00073 ARToolKitPlusPositionHandler();
00074 ~ARToolKitPlusPositionHandler();
00075
00076 PositionObject & GetObject();
00077 void RemoveObject();
00078
00079 static ObjectHandler * CreateHandler() {return static_cast<ObjectHandler * > (new ARToolKitPlusPositionHandler);};
00080 protected:
00081 ARToolKitPlusPosition * Obj;
00082
00083 IntParameter MarkerID;
00084 DoubleParameter Height;
00085 ARToolKitPlusPreProcessParameter Pre;
00086 };
00087
00088 #endif
00089 #endif