Move operator in .cpp file

This commit is contained in:
Rémi Oudin 2018-02-12 14:15:30 +01:00
parent 1be55612d4
commit 61f50c2861
2 changed files with 8 additions and 5 deletions

View file

@ -51,3 +51,10 @@ void Spheroid::check_vertical_plan_collision(double& abscissa) {
}
}
}
double Spheroid::operator() (double _x, double _y, double _z) const {
return (pow(_x - center.x, 2) / pow(q, 2)
+ pow(_y - center.y, 2) / pow(q, 2)
+ pow(_z - center.z, 2) / pow(p, 2) -1);
}

View file

@ -19,11 +19,7 @@ class Spheroid : public ImplicitSurface {
void set_stiffness(size_t _stiffness);
void check_horizontal_plan_collision(double& height);
void check_vertical_plan_collision(double& abscissa);
double operator() (double _x, double _y, double _z) const {
return (pow(_x - center.x, 2) / pow(q, 2)
+ pow(_y - center.y, 2) / pow(q, 2)
+ pow(_z - center.z, 2) / pow(p, 2) -1);
}
double operator() (double _x, double _y, double _z) const;
private:
/**
* p corresponds to the half-height of the ball,