#pragma once

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


//------------
class vectorField {
  
  public: 
  
  
	int FIELD_SIZE;
	int       fieldw;
	int       fieldh;
	float     scalew;
	float     scaleh;
	float **   field;
	

  
  	//------------
  	vectorField(int _fieldw, int _fieldh, float _scalew, float _scaleh);
	void clear();
	void fadeField(float fadeAmount);
	void ltValToVal(float ltVal, float val);
	void randomizeField(float scale);

	void draw();
	void getVelFromPos(float xpos, float ypos, ofVec3f & v);
	void erodePos(float xpos, float ypos);
	void addToFieldAnInwardCircleShape(float x, float y, float radius, float strength);
	void addToFieldAnOutwardCircleShape(float x, float y, float radius, float strength);
	void addToFieldASpecialCircleShape(float x, float y, float vx, float vy, float radius, float strength);

	int counter ;
	void setBlinn();
	
	void addToFieldALine(float x1, float y1, 
							float x2, float y2,
							float vx, float vy, float radius, float strength);
	void Bresenham(int x1, int y1, int x2, int y2, float vx, float vy, float radius, float strength, bool bOutward);
   	
};
