Implicit surface operator should be centered in 0.
This commit is contained in:
parent
9c37ead65d
commit
2861734258
1 changed files with 3 additions and 3 deletions
|
@ -68,7 +68,7 @@ void Spheroid::check_perlin_collision(PerlinNoise perlin) {
|
||||||
|
|
||||||
|
|
||||||
double Spheroid::operator() (double _x, double _y, double _z) const {
|
double Spheroid::operator() (double _x, double _y, double _z) const {
|
||||||
return (pow(_x - center.x, 2) / pow(q, 2)
|
return (pow(_x, 2) / pow(q, 2)
|
||||||
+ pow(_y - center.y, 2) / pow(q, 2)
|
+ pow(_y, 2) / pow(q, 2)
|
||||||
+ pow(_z - center.z, 2) / pow(p, 2) -1);
|
+ pow(_z, 2) / pow(p, 2) -1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue