diff --git a/GeoLib/Surface.cpp b/GeoLib/Surface.cpp index 1e839f699089fb2d0019ec7e5bb4307b9cce4bd2..ae8e6316a6e71f4a74b7f1596e53cb38c789eb90 100644 --- a/GeoLib/Surface.cpp +++ b/GeoLib/Surface.cpp @@ -29,14 +29,14 @@ namespace GeoLib { Surface::Surface (const std::vector<Point*> &pnt_vec) : - GeoObject(), _sfc_pnts(pnt_vec), _bv(nullptr) + GeoObject(), _sfc_pnts(pnt_vec), _bounding_volume(nullptr) {} Surface::~Surface () { for (std::size_t k(0); k < _sfc_triangles.size(); k++) delete _sfc_triangles[k]; - delete _bv; + delete _bounding_volume; } void Surface::addTriangle (std::size_t pnt_a, std::size_t pnt_b, std::size_t pnt_c) @@ -48,16 +48,16 @@ void Surface::addTriangle (std::size_t pnt_a, std::size_t pnt_b, std::size_t pnt return; _sfc_triangles.push_back (new Triangle(_sfc_pnts, pnt_a, pnt_b, pnt_c)); - if (!_bv) { + if (!_bounding_volume) { std::vector<size_t> ids(3); ids[0] = pnt_a; ids[1] = pnt_b; ids[2] = pnt_c; - _bv = new AABB<Point>(_sfc_pnts, ids); + _bounding_volume = new AABB<Point>(_sfc_pnts, ids); } else { - _bv->update (*_sfc_pnts[pnt_a]); - _bv->update (*_sfc_pnts[pnt_b]); - _bv->update (*_sfc_pnts[pnt_c]); + _bounding_volume->update (*_sfc_pnts[pnt_a]); + _bounding_volume->update (*_sfc_pnts[pnt_b]); + _bounding_volume->update (*_sfc_pnts[pnt_c]); } } @@ -112,9 +112,9 @@ const Triangle* Surface::operator[] (std::size_t i) const return _sfc_triangles[i]; } -bool Surface::isPntInBV (const double *pnt) const +bool Surface::isPntInBoundingVolume(const double *pnt) const { - return _bv->containsPoint (pnt); + return _bounding_volume->containsPoint (pnt); } bool Surface::isPntInSfc (const double *pnt) const diff --git a/GeoLib/Surface.h b/GeoLib/Surface.h index b3aef6af265449d61303f6714b537740fb171f11..abd3ae012f1939d7e95d6843952742f5e4f3522b 100644 --- a/GeoLib/Surface.h +++ b/GeoLib/Surface.h @@ -58,7 +58,7 @@ public: /** * is the given point in the bounding volume of the surface */ - bool isPntInBV (const double *pnt) const; + bool isPntInBoundingVolume(const double *pnt) const; /** * is the given point pnt located in the surface @@ -73,7 +73,7 @@ public: * method allows access to the internal axis aligned bounding box * @return axis aligned bounding box */ - AABB<GeoLib::Point> const& getAABB () const { return *_bv; } + AABB<GeoLib::Point> const& getAABB () const { return *_bounding_volume; } protected: /** a vector of pointers to Points */ @@ -81,7 +81,7 @@ protected: /** position of pointers to the geometric points */ std::vector<Triangle*> _sfc_triangles; /** bounding volume is an axis aligned bounding box */ - AABB<GeoLib::Point> *_bv; + AABB<GeoLib::Point> *_bounding_volume; }; }