 
        
        
          Добавил:
          
          
        
        
    
            korayakov
            
            
            
            
            
            Опубликованный материал нарушает ваши авторские права? Сообщите нам.
          
          Вуз:
          Предмет:
          Файл:Лабы / С++Builder / Laba3 / Task2 / Ball
.h//---------------------------------------------------------------------------
#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;
};
