-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparticule.cc
More file actions
35 lines (25 loc) · 750 Bytes
/
particule.cc
File metadata and controls
35 lines (25 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "particule.h"
bool Particule::check_d_min(){
if (getD() < d_particule_min) {
cout << message::particle_too_small(getX(), getY(), getD());
return true;
}
return false;
}
bool Particule::check_inside_domain(){
if ((abs(getX())+getD()/2 > dmax) or (abs(getY())+getD()/2 > dmax)){
cout << message::particle_outside(getX(), getY(), getD());
return true;
}
return false;
}
bool Particule::check_superpos(Particule p2){
if (collision_carres(getSquare(), p2.getSquare(), false)){
cout << message::particle_superposition(getX(), getY(), p2.getX(), p2.getY());
return true;
}
return false;
}
void Particule::draw_particle(){
draw_particle_(getSquare());
}