[╯°□°]╯︵┻━┻
Goldberg Simulator 20000
 All Classes Functions Variables
Ball.h
00001 #ifndef PRJ_BALL_H
00002 #define PRJ_BALL_H
00003 
00004 #include "Obj.h"
00005 #include "Force.h"
00006 
00007 using namespace std;
00008 
00009 
00010 class Ball: virtual public Obj{
00011 protected:
00012         double r;//rayon
00013 
00014 public:
00015         void setR(double const& newR,bool const& conservMassV=false);
00016         void setM(double const& newM,bool const& conservMassV=false);
00017 
00018         double getR() const;
00019         double getMv() const;
00020         double getVolume() const;
00021 
00022         virtual Vect supportPoint (Vect const& direction);
00023 
00024         void merge(Ball const& b);
00027 
00028         virtual ostream& cdisp(ostream& out);
00029         virtual void disp(vector<bool> options);
00030         virtual ~Ball(){}
00031         //CONSTR---
00032         //Ball(size_t const& dim=0,double const& rayon=0,double const& masse=0.1);
00033         Ball(Vect const& x,double const& rayon,double const& masse,Vect const& dx=Vect(0));
00034 };
00035 
00036 class BallCG: public Ball, public ObjCG {
00037 public:
00038         BallCG(set<Obj*> & tabObj,set<ObjC*> & tabCharg,Vect const& pos,double const& mass,double const& rayon,double const& charg=0, Vect const& dx=Vect(3));
00039         virtual void disp(vector<bool> options);
00040         virtual ostream& cdisp(ostream& out);
00041         virtual ~BallCG(){}
00042         Ball::supportPoint;
00043 };
00044 
00045 #endif //PRJ_BALL_H