/**************************************************
 *   File:     Object.h
 *   Author:   Dr. Dalton R. Hunkins     
 *   Date:     September 2008
**************************************************/
#ifndef _OBJECT_H
#define _OBJECT_H

class Object {
   public :
      #define SQUARE    900
      #define DISK      901
      #define TRIANGLE  902
      
      Object();
      Object( float color[3], 
              double scaleFactor,
              double translateX,
              double translateY);
           
      void setTranslation(double x, double y);
      void incrementScale(double amount);
      void setColor(float color[3]);
      void setAsCurrentObject(bool value);
      void reset();
      
      virtual void draw();
      
      virtual bool isOver(double x, double y);
      
      
   protected :
      double initialScaleFactor;
      double initialTranslateX;
      double initialTranslateY;
      float  initialColor[3];
      
      double currentScale;
      double currentTranslateX;
      double currentTranslateY;
      float  currentColor[3];
      bool   isCurrentObject;
};

class Square : public Object {
	public:
	  Square(float color[3], 
           double scaleFactor,
           double translateX,
           double translateY);
      virtual void draw();
      virtual bool isOver(double x, double y);
};

class Disk : public Object {
	public:
	  Disk(float color[3], 
           double scaleFactor,
           double translateX,
           double translateY);
      virtual void draw();
      virtual bool isOver(double x, double y);
};

class Triangle : public Object {
	public:
	  Triangle(float color[3], 
           double scaleFactor,
           double translateX,
           double translateY);
      virtual void draw();
      virtual bool isOver(double x, double y);
}; 
#endif