#pragma once

#include "ofMain.h"

#include "ARToolKitPlus/TrackerSingleMarker.h"
using namespace ARToolKitPlus;

//class MyLogger : public ARToolKitPlus::Logger
//{
//    void artLog(const char* nStr)
//    {
//        printf(nStr);
//    }
//};


//static utils are at the bottom of the cpp file
static void lineEquation(float x1, float y1, float x2, float y2, float &a, float &b, float &c);
static float areaOfAQuad(ofPoint p1, ofPoint p2, ofPoint p3, ofPoint p4);
static void makeMarker(ofPoint p1, ofPoint p2, ofPoint p3, ofPoint p4, ARMarkerInfo * marker);

class arFakeMarker{

	public:
		arFakeMarker();		
		~arFakeMarker();
		
		void setup(int cam_w, int cam_h, int markerSizeMM, bool useRobustPose = false);
		void setMarkerPoints(ofPoint p1, ofPoint p2, ofPoint p3, ofPoint p4);
		
		string getMarkerInfoString();
		bool isMarkerSet();
		
		void loadARMatrix();
		void unloadARMatrix();
		
	protected:
		
		bool isSet; 
		
		ARMarkerInfo * marker_info;
		TrackerSingleMarker *tracker;
		int cameraW;
		int cameraH;
		int markerW;
		bool useBCH;

};
