#ifndef _LOOP_MODULE
#define _LOOP_MODULE

#include "ofMain.h"
#include "ofVec3f.h"
#include "graphicsModuleBase.h"

#define MAX_LENGTH 8000

class loopModule : public graphicsModuleBase {
	
	public:
		
		loopModule();
		
		void 		setup();
		void 		reset();
	 	void 		update();
		void 		draw();
		bool 		bAmIdone();
		
		ofVec3f		getStartPosition();
		float		getStartAngle();
		
		bool		startLoop;
		float 		pct;
		float		speed;
		float		loopSize;		
		float		distToLoop;		
		float		counter;	
		float		offSet;	
		int			exitAngle;
		float		startAngle;
		int			radius;
		ofVec3f		startPos;
		ofVec3f		beginPos;
		ofVec3f 	pos;
		ofVec3f		dst;
		ofVec3f		vel;
		ofVec3f		angle;
		
		int 		framecount;	// so we don't do a new point every frame...
		bool 		bNewPos;
		int			whichSide;
		
		ofVec3f		trail[8000];
};

#endif	