Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
13
Добавлен:
17.04.2013
Размер:
812 б
Скачать
//---------------------------------------------------------------------------
#ifndef BallH
#define BallH
//---------------------------------------------------------------------------
#endif

#include <math.h>
#define pi      3,14159

class CSupport
{
  private:
   int x1,y1, x2,y2;
   TImage* Img;
   void Hide();
   int xc,yc;
  public:
   void Draw(double dA);
   void Check(int x);
   CSupport (TImage* _Img);
   double CurAngle;
   short int R;
};

class CBall
{
  private:
   int x,y,xc,yc;
   TImage* Img;

  public:
   CBall(CSupport *lin);
   int ComputeBallY(int x,double AA);
   void MoveToXY(int X, int Y);
   int GetX(){return x-xc;}
   int GetY(){return -y+yc;}
   Extended GetAngle() {return atan2(-y+yc,x-xc);}
   CBall (TImage* _Img);
   short int R;
};
Соседние файлы в папке Task2