diff --git a/GeoLib/BoundingSphere.cpp b/GeoLib/BoundingSphere.cpp index db4dddb39087062e3a921a19baf2f15f4c799948..4067c805dc8c2d43a542c4aa68c8881fd0fd110f 100644 --- a/GeoLib/BoundingSphere.cpp +++ b/GeoLib/BoundingSphere.cpp @@ -140,7 +140,7 @@ double BoundingSphere::sqrPointDist(const GeoLib::Point pnt) const return MathLib::sqrDist(_center.getCoords(), pnt.getCoords())-(_radius*_radius); } -std::vector<GeoLib::Point*>* BoundingSphere::getSpherePoints(std::size_t n_points) const +std::vector<GeoLib::Point*>* BoundingSphere::getRandomSpherePoints(std::size_t n_points) const { std::vector<GeoLib::Point*> *pnts = new std::vector<GeoLib::Point*>; pnts->reserve(n_points); diff --git a/GeoLib/BoundingSphere.h b/GeoLib/BoundingSphere.h index 2650edff4a6ef19c94ec9e843bb5fd699ead70af..4163a16e1decd761870c8fb1b899411f93e05a03 100644 --- a/GeoLib/BoundingSphere.h +++ b/GeoLib/BoundingSphere.h @@ -54,7 +54,8 @@ public: /// Returns the squared distance of a point from the sphere (for points within the sphere distance is negative) double sqrPointDist(const GeoLib::Point pnt) const; - std::vector<GeoLib::Point*>* getSpherePoints(std::size_t n_points) const; + /// Creates n_points random points located on the surface of the sphere (useful for visualisation) + std::vector<GeoLib::Point*>* getRandomSpherePoints(std::size_t n_points) const; private: /**