diff --git a/GeoLib/AxisAlignedBoundingBox.cpp b/GeoLib/AxisAlignedBoundingBox.cpp index 2049e77f0302188ee8d2273aee72e8c4a6f4ae44..b61a7c86d54f8611afffe3dc3c356150bf040537 100644 --- a/GeoLib/AxisAlignedBoundingBox.cpp +++ b/GeoLib/AxisAlignedBoundingBox.cpp @@ -10,7 +10,7 @@ #include <cmath> #include "AxisAlignedBoundingBox.h" -namespace GEOLIB { +namespace GeoLib { AABB::AABB () { @@ -20,7 +20,7 @@ AABB::AABB () } } -AABB::AABB ( const std::vector<GEOLIB::Point*> *points ) +AABB::AABB ( const std::vector<GeoLib::Point*> *points ) { size_t nPoints (points->size()); for (size_t i=0; i<nPoints; i++) @@ -29,7 +29,7 @@ AABB::AABB ( const std::vector<GEOLIB::Point*> *points ) } } -void AABB::update (GEOLIB::Point const & pnt) +void AABB::update (GeoLib::Point const & pnt) { update (pnt[0], pnt[1], pnt[2]); } @@ -44,7 +44,7 @@ void AABB::update (double x, double y, double z) if (_max_pnt[2] < z) _max_pnt[2] = z; } -bool AABB::containsPoint (GEOLIB::Point const & pnt, double eps) const +bool AABB::containsPoint (GeoLib::Point const & pnt, double eps) const { return containsPoint (pnt[0], pnt[1], pnt[2], eps); } diff --git a/GeoLib/AxisAlignedBoundingBox.h b/GeoLib/AxisAlignedBoundingBox.h index 8f457b3007bd308dd566e57541ea068789d238dd..1c0996fa4019f24d46b660853b35592b0a345917 100644 --- a/GeoLib/AxisAlignedBoundingBox.h +++ b/GeoLib/AxisAlignedBoundingBox.h @@ -12,11 +12,11 @@ #include <vector> #include <limits> -namespace GEOLIB { +namespace GeoLib { /** * - * \ingroup GEOLIB + * \ingroup GeoLib * * \brief Class AABB is a bounding box around a given geometric entity * */ @@ -31,9 +31,9 @@ public: /** * construction of object using vector of points * */ - AABB ( const std::vector<GEOLIB::Point*> *points ); + AABB ( const std::vector<GeoLib::Point*> *points ); - void update (GEOLIB::Point const & pnt); + void update (GeoLib::Point const & pnt); /** * update axis aligned bounding box */ @@ -51,10 +51,10 @@ public: * check if point is in the axis aligned bounding box * (employing containsPoint (double x, double y, double z)) */ - bool containsPoint (GEOLIB::Point const & pnt, double eps = std::numeric_limits<double>::epsilon()) const; + bool containsPoint (GeoLib::Point const & pnt, double eps = std::numeric_limits<double>::epsilon()) const; /** - * wrapper for GEOLIB::Point + * wrapper for GeoLib::Point */ bool containsPoint (const double *pnt, double eps = std::numeric_limits<double>::epsilon()) const; @@ -64,12 +64,12 @@ public: */ bool containsPoint (double x, double y, double z, double eps = std::numeric_limits<double>::epsilon()) const; - GEOLIB::Point getMinPoint () const { return _min_pnt; } - GEOLIB::Point getMaxPoint () const { return _max_pnt; } + GeoLib::Point getMinPoint () const { return _min_pnt; } + GeoLib::Point getMaxPoint () const { return _max_pnt; } private: - GEOLIB::Point _min_pnt; - GEOLIB::Point _max_pnt; + GeoLib::Point _min_pnt; + GeoLib::Point _max_pnt; }; } // end namespace diff --git a/GeoLib/BruteForceClosestPair.cpp b/GeoLib/BruteForceClosestPair.cpp index d047edf0e43200706348a65daa946675fca7fdcd..73d46d105ed29da53935b782c36351ff08f1dfc4 100644 --- a/GeoLib/BruteForceClosestPair.cpp +++ b/GeoLib/BruteForceClosestPair.cpp @@ -8,10 +8,10 @@ #include "BruteForceClosestPair.h" #include "MathTools.h" -namespace GEOLIB { +namespace GeoLib { BruteForceClosestPair::BruteForceClosestPair( - std::vector<GEOLIB::Point*> const & pnts, size_t& id0, size_t& id1) : + std::vector<GeoLib::Point*> const & pnts, size_t& id0, size_t& id1) : ClosestPair (pnts, id0, id1) { double sqr_shortest_dist (MathLib::sqrDist (_pnts[0], _pnts[1])); @@ -31,4 +31,4 @@ BruteForceClosestPair::BruteForceClosestPair( id1 = _id1; } -} // end namespace GEOLIB +} // end namespace GeoLib diff --git a/GeoLib/BruteForceClosestPair.h b/GeoLib/BruteForceClosestPair.h index 8de5d88ff42b581b3d9e668cf2a4dca28ed0a369..9682da6a30be6ecc65d948e2e57b5d51031b76b8 100644 --- a/GeoLib/BruteForceClosestPair.h +++ b/GeoLib/BruteForceClosestPair.h @@ -10,13 +10,13 @@ #include "ClosestPair.h" -namespace GEOLIB { +namespace GeoLib { class BruteForceClosestPair : public ClosestPair { public: - BruteForceClosestPair(std::vector<GEOLIB::Point*> const & pnts, size_t& id0, size_t& id1); + BruteForceClosestPair(std::vector<GeoLib::Point*> const & pnts, size_t& id0, size_t& id1); }; -} // end namespace GEOLIB +} // end namespace GeoLib #endif /* BRUTEFORCECLOSESTPAIR_H_ */ diff --git a/GeoLib/ClosestPair.h b/GeoLib/ClosestPair.h index d2b1d3af0f6fe6cc01bfd8e9c2947fbcd735d025..b8d7e822ccb17086d6281dce1f7bdc65891096f0 100644 --- a/GeoLib/ClosestPair.h +++ b/GeoLib/ClosestPair.h @@ -11,24 +11,24 @@ // STL #include <vector> -// GEOLIB +// GeoLib #include "Point.h" -namespace GEOLIB { +namespace GeoLib { class ClosestPair { public: - ClosestPair (std::vector<GEOLIB::Point*> const & pnts, size_t id0, size_t id1) : + ClosestPair (std::vector<GeoLib::Point*> const & pnts, size_t id0, size_t id1) : _pnts (pnts), _id0 (id0), _id1 (id1) {} protected: - std::vector<GEOLIB::Point*> const & _pnts; + std::vector<GeoLib::Point*> const & _pnts; size_t _id0; size_t _id1; }; -} // end namespace GEOLIB +} // end namespace GeoLib #endif /* CLOSESTPAIR_H_ */ diff --git a/GeoLib/Color.cpp b/GeoLib/Color.cpp index fd54503680e14fb63add54c47b625b56c52a0284..0387f08c2828ed414ef8f41fb92f61d3797fd289 100644 --- a/GeoLib/Color.cpp +++ b/GeoLib/Color.cpp @@ -12,7 +12,7 @@ #include "Color.h" #include "StringTools.h" -namespace GEOLIB { +namespace GeoLib { Color* getRandomColor() { @@ -66,7 +66,7 @@ const Color* getColor(const std::string &id, std::map<std::string, Color*> &colo return c; } -const Color* getColor(double id, std::map<std::string, GEOLIB::Color*> &colors) +const Color* getColor(double id, std::map<std::string, GeoLib::Color*> &colors) { std::ostringstream stream; stream << id; diff --git a/GeoLib/Color.h b/GeoLib/Color.h index f2843833f1162a92389051cf3b1abafff81db5da..3ac1419fc64f265cea377bb24828bb50211d5175 100644 --- a/GeoLib/Color.h +++ b/GeoLib/Color.h @@ -15,7 +15,7 @@ #include <map> #include <list> -namespace GEOLIB { +namespace GeoLib { typedef TemplatePoint<unsigned char> Color; @@ -23,14 +23,14 @@ typedef TemplatePoint<unsigned char> Color; Color* getRandomColor(); /// Reads a color-lookup-table from a file and writes it to a map. -int readColorLookupTable(std::map<std::string, GEOLIB::Color*> &colors, const std::string &filename); +int readColorLookupTable(std::map<std::string, GeoLib::Color*> &colors, const std::string &filename); /// Uses a color-lookup-table (in form of a map) to return a colour for a specified name. If the name is not /// in the colortable a new entry is created with the new name and a random colour. -const Color* getColor(const std::string &id, std::map<std::string, GEOLIB::Color*> &colors); +const Color* getColor(const std::string &id, std::map<std::string, GeoLib::Color*> &colors); /// Convenience function to use the getColor method with numbers as identifiers. -const Color* getColor(double id, std::map<std::string, GEOLIB::Color*> &colors); +const Color* getColor(double id, std::map<std::string, GeoLib::Color*> &colors); } // namespace diff --git a/GeoLib/GEOObjects.cpp b/GeoLib/GEOObjects.cpp index 6a1dd20d08caac9e37cc6cc19f4cf149ba84ac99..7fd5776431e0decf2f0f9765f40a9382d5691a81 100644 --- a/GeoLib/GEOObjects.cpp +++ b/GeoLib/GEOObjects.cpp @@ -10,7 +10,7 @@ #include <fstream> -namespace GEOLIB { +namespace GeoLib { GEOObjects::GEOObjects() { @@ -367,16 +367,16 @@ void GEOObjects::mergeGeometries (std::vector<std::string> const & geo_names, st std::vector<size_t> pnt_offsets(geo_names.size(), 0); // *** merge points - std::vector<GEOLIB::Point*>* merged_points (new std::vector<GEOLIB::Point*>); + std::vector<GeoLib::Point*>* merged_points (new std::vector<GeoLib::Point*>); for (size_t j(0); j<geo_names.size(); j++) { - const std::vector<GEOLIB::Point*>* pnts (this->getPointVec(geo_names[j])); + const std::vector<GeoLib::Point*>* pnts (this->getPointVec(geo_names[j])); if (pnts) { size_t nPoints(0); // do not consider stations - if (dynamic_cast<GEOLIB::Station*>((*pnts)[0]) == NULL) { + if (dynamic_cast<GeoLib::Station*>((*pnts)[0]) == NULL) { nPoints = pnts->size(); for (size_t k(0); k<nPoints; k++) { - merged_points->push_back (new GEOLIB::Point (((*pnts)[k])->getCoords())); + merged_points->push_back (new GeoLib::Point (((*pnts)[k])->getCoords())); } } if (geo_names.size()-1 > j) @@ -388,13 +388,13 @@ void GEOObjects::mergeGeometries (std::vector<std::string> const & geo_names, st std::vector<size_t> const& id_map (this->getPointVecObj(merged_geo_name)->getIDMap ()); // *** merge polylines - std::vector<GEOLIB::Polyline*> *merged_polylines (new std::vector<GEOLIB::Polyline*>); + std::vector<GeoLib::Polyline*> *merged_polylines (new std::vector<GeoLib::Polyline*>); for (size_t j(0); j<geo_names.size(); j++) { - const std::vector<GEOLIB::Polyline*>* plys (this->getPolylineVec(geo_names[j])); + const std::vector<GeoLib::Polyline*>* plys (this->getPolylineVec(geo_names[j])); if (plys) { for (size_t k(0); k<plys->size(); k++) { - GEOLIB::Polyline* kth_ply_new(new GEOLIB::Polyline (*merged_points)); - GEOLIB::Polyline const*const kth_ply_old ((*plys)[k]); + GeoLib::Polyline* kth_ply_new(new GeoLib::Polyline (*merged_points)); + GeoLib::Polyline const*const kth_ply_old ((*plys)[k]); const size_t size_of_kth_ply (kth_ply_old->getNumberOfPoints()); // copy point ids from old ply to new ply (considering the offset) for (size_t i(0); i<size_of_kth_ply; i++) { @@ -408,17 +408,17 @@ void GEOObjects::mergeGeometries (std::vector<std::string> const & geo_names, st // *** merge surfaces - std::vector<GEOLIB::Surface*> *merged_sfcs (new std::vector<GEOLIB::Surface*>); + std::vector<GeoLib::Surface*> *merged_sfcs (new std::vector<GeoLib::Surface*>); for (size_t j(0); j<geo_names.size(); j++) { - const std::vector<GEOLIB::Surface*>* sfcs (this->getSurfaceVec(geo_names[j])); + const std::vector<GeoLib::Surface*>* sfcs (this->getSurfaceVec(geo_names[j])); if (sfcs) { for (size_t k(0); k<sfcs->size(); k++) { - GEOLIB::Surface* kth_sfc_new(new GEOLIB::Surface (*merged_points)); - GEOLIB::Surface const*const kth_sfc_old ((*sfcs)[k]); + GeoLib::Surface* kth_sfc_new(new GeoLib::Surface (*merged_points)); + GeoLib::Surface const*const kth_sfc_old ((*sfcs)[k]); const size_t size_of_kth_sfc (kth_sfc_old->getNTriangles()); // copy point ids from old ply to new ply (considering the offset) for (size_t i(0); i<size_of_kth_sfc; i++) { - const GEOLIB::Triangle* tri ((*kth_sfc_old)[i]); + const GeoLib::Triangle* tri ((*kth_sfc_old)[i]); const size_t id0 (id_map[pnt_offsets[j]+(*tri)[0]]); const size_t id1 (id_map[pnt_offsets[j]+(*tri)[1]]); const size_t id2 (id_map[pnt_offsets[j]+(*tri)[2]]); diff --git a/GeoLib/GEOObjects.h b/GeoLib/GEOObjects.h index 9eae16b0e8771813cb7c88ff0a60f756c15bb30a..bf0d8f1305b1354a4dfd81e738d054be0bb99e0c 100644 --- a/GeoLib/GEOObjects.h +++ b/GeoLib/GEOObjects.h @@ -22,11 +22,11 @@ #include "Color.h" #include "Station.h" -namespace GEOLIB { +namespace GeoLib { /// /** - * \defgroup GEOLIB This module consists of classes governing geometric objects + * \defgroup GeoLib This module consists of classes governing geometric objects * and related algorithms. */ diff --git a/GeoLib/GeoObject.h b/GeoLib/GeoObject.h index d3bc2fbb5273f9677f92f150c18875b85e23054e..bacb696fd90c1a13c47a5734e9d25878da9bbf6d 100644 --- a/GeoLib/GeoObject.h +++ b/GeoLib/GeoObject.h @@ -8,10 +8,10 @@ #ifndef GEOOBJECT_H_ #define GEOOBJECT_H_ -namespace GEOLIB { +namespace GeoLib { /** - * \ingroup GEOLIB + * \ingroup GeoLib * * \brief Base class for classes Point, Polyline, Surface. */ @@ -22,6 +22,6 @@ public: virtual ~GeoObject() {}; }; -} // end namespace GEOLIB +} // end namespace GeoLib #endif /* GEOOBJECT_H_ */ diff --git a/GeoLib/GeoType.cpp b/GeoLib/GeoType.cpp index 79a13cb251ef5f658723f4a4a84fac4ef1558534..4e06f10741a665aae54781ba1b8d760bdca6848e 100644 --- a/GeoLib/GeoType.cpp +++ b/GeoLib/GeoType.cpp @@ -7,7 +7,7 @@ #include "GeoType.h" -namespace GEOLIB { +namespace GeoLib { GEOTYPE convertGeoType (const std::string& geo_type_str) { @@ -29,4 +29,4 @@ std::string convertGeoTypeToString (GEOTYPE geo_type) return "INVALID"; } -} // end namespace GEOLIB +} // end namespace GeoLib diff --git a/GeoLib/GeoType.h b/GeoLib/GeoType.h index 6f7f2bb7cddfe08673367287dcc4da135ec3f2aa..cd39a0bb8d0c559d8a373db3d42e4a64a18bb0c3 100644 --- a/GeoLib/GeoType.h +++ b/GeoLib/GeoType.h @@ -10,10 +10,10 @@ #include <string> -namespace GEOLIB { +namespace GeoLib { /** - * \ingroup GEOLIB + * \ingroup GeoLib */ enum GEOTYPE { @@ -30,6 +30,6 @@ GEOTYPE convertGeoType (const std::string& geo_type_str); std::string convertGeoTypeToString (GEOTYPE geo_type); -} // end namespace GEOLIB +} // end namespace GeoLib #endif /* GEOTYPE_H_ */ diff --git a/GeoLib/Point.cpp b/GeoLib/Point.cpp index 4ebe2072d237066eb9cffee96ca55c0190d28675..f6796bf8550c0c17c98978750c9a0599a1053594 100644 --- a/GeoLib/Point.cpp +++ b/GeoLib/Point.cpp @@ -11,7 +11,7 @@ #include "Point.h" -bool operator<= (const GEOLIB::Point& p0, const GEOLIB::Point& p1) +bool operator<= (const GeoLib::Point& p0, const GeoLib::Point& p1) { double tol (sqrt (std::numeric_limits<double>::min())); @@ -31,25 +31,25 @@ bool operator<= (const GEOLIB::Point& p0, const GEOLIB::Point& p1) } } -namespace GEOLIB { +namespace GeoLib { -bool lessX (GEOLIB::Point const & p0, GEOLIB::Point const & p1) +bool lessX (GeoLib::Point const & p0, GeoLib::Point const & p1) { if (p0[0] <= p1[0]) return true; return false; } -bool lessY (GEOLIB::Point const & p0, GEOLIB::Point const & p1) +bool lessY (GeoLib::Point const & p0, GeoLib::Point const & p1) { if (p0[1] <= p1[1]) return true; return false; } -bool lessZ (GEOLIB::Point const & p0, GEOLIB::Point const & p1) +bool lessZ (GeoLib::Point const & p0, GeoLib::Point const & p1) { if (p0[2] <= p1[2]) return true; return false; } -} // end namespace GEOLIB +} // end namespace GeoLib diff --git a/GeoLib/Point.h b/GeoLib/Point.h index a89a7e7d12be10c30f4687feecd25f70a27bf308..10b66d7d4e0be1966b7b3f7b38cb1b2bdc0b9e1b 100644 --- a/GeoLib/Point.h +++ b/GeoLib/Point.h @@ -9,10 +9,10 @@ #include "TemplatePoint.h" -namespace GEOLIB { +namespace GeoLib { /** - * \ingroup GEOLIB + * \ingroup GeoLib */ typedef TemplatePoint<double> Point; @@ -46,6 +46,6 @@ bool lessZ (Point const & p0, Point const & p1); /** * lexicographic comparison of points */ -bool operator<= (GEOLIB::Point const & p0, GEOLIB::Point const & p1); +bool operator<= (GeoLib::Point const & p0, GeoLib::Point const & p1); #endif /* POINT_H_ */ diff --git a/GeoLib/PointVec.cpp b/GeoLib/PointVec.cpp index fa966cbea6976e5076c574447b42ac2503ea7af0..e9a50bf93d1181b720000028ec30351b6c9ba811 100644 --- a/GeoLib/PointVec.cpp +++ b/GeoLib/PointVec.cpp @@ -8,7 +8,7 @@ #include "PointVec.h" #include "BruteForceClosestPair.h" -namespace GEOLIB { +namespace GeoLib { PointVec::PointVec (const std::string& name, std::vector<Point*>* points, std::map<std::string, size_t>* name_id_map, PointType type) : @@ -145,7 +145,7 @@ double PointVec::getShortestPointDistance () const return sqrt (_sqr_shortest_dist); } -void PointVec::makePntsUnique (std::vector<GEOLIB::Point*>* pnt_vec, std::vector<size_t> &pnt_id_map) +void PointVec::makePntsUnique (std::vector<GeoLib::Point*>* pnt_vec, std::vector<size_t> &pnt_id_map) { size_t n_pnts_in_file (pnt_vec->size()); std::vector<size_t> perm; @@ -156,7 +156,7 @@ void PointVec::makePntsUnique (std::vector<GEOLIB::Point*>* pnt_vec, std::vector } // sort the points - BaseLib::Quicksort<GEOLIB::Point*> (*pnt_vec, 0, n_pnts_in_file, perm); + BaseLib::Quicksort<GeoLib::Point*> (*pnt_vec, 0, n_pnts_in_file, perm); // unfortunately quicksort is not stable - // sort identical points by id - to make sorting stable @@ -199,7 +199,7 @@ void PointVec::makePntsUnique (std::vector<GEOLIB::Point*>* pnt_vec, std::vector } // reverse permutation - BaseLib::Quicksort<GEOLIB::Point*> (perm, 0, n_pnts_in_file, *pnt_vec); + BaseLib::Quicksort<GeoLib::Point*> (perm, 0, n_pnts_in_file, *pnt_vec); // remove the second, third, ... occurrence from vector for (size_t k(0); k<n_pnts_in_file; k++) { @@ -209,7 +209,7 @@ void PointVec::makePntsUnique (std::vector<GEOLIB::Point*>* pnt_vec, std::vector } } // remove NULL-ptr from vector - for (std::vector<GEOLIB::Point*>::iterator it(pnt_vec->begin()); it != pnt_vec->end(); ) { + for (std::vector<GeoLib::Point*>::iterator it(pnt_vec->begin()); it != pnt_vec->end(); ) { if (*it == NULL) { it = pnt_vec->erase (it); } diff --git a/GeoLib/PointVec.h b/GeoLib/PointVec.h index fa54cd5bf3db505c6abd8fcfebc425c7b57de193..6e7282882b426314e6ef6a96dfd5b4cb53f3d1df 100644 --- a/GeoLib/PointVec.h +++ b/GeoLib/PointVec.h @@ -6,7 +6,7 @@ */ -// GEOLIB +// GeoLib #include "Point.h" #include "Station.h" #include "AxisAlignedBoundingBox.h" @@ -22,10 +22,10 @@ #ifndef POINTVEC_H_ #define POINTVEC_H_ -namespace GEOLIB { +namespace GeoLib { /** - * \ingroup GEOLIB + * \ingroup GeoLib * * \brief This class manages pointers to Points in a std::vector along with a name. * It also handles the deleting of points. Additionally, each vector of points is identified by @@ -48,7 +48,7 @@ public: * pointer the vector of names of the points * and sets the type of PointVec. * @param name the name of the point group - * @param points pointer to a vector of GEOLIB::Pointers - + * @param points pointer to a vector of GeoLib::Pointers - * PointVec will take the ownership of the vector, * i.e. delete the points and the vector itself * @param name_id_map the names to the points - @@ -143,10 +143,10 @@ public: const std::vector<size_t>& getIDMap () const { return _pnt_id_map; } double getShortestPointDistance () const; - const GEOLIB::AABB& getAxisAlignedBoundingBox () const; + const GeoLib::AABB& getAxisAlignedBoundingBox () const; private: - void makePntsUnique (std::vector<GEOLIB::Point*>* pnt_vec, std::vector<size_t> &pnt_id_map); + void makePntsUnique (std::vector<GeoLib::Point*>* pnt_vec, std::vector<size_t> &pnt_id_map); /** copy constructor doesn't have an implementation */ // compiler does not create a (possible unwanted) copy constructor @@ -164,7 +164,7 @@ private: /** * pointer to a vector of pointers to Points * - * The destructor of PointVec will delete all GEOLIB::Points + * The destructor of PointVec will delete all GeoLib::Points * inside the vector. */ std::vector<Point*> *_pnt_vec; diff --git a/GeoLib/PointWithID.h b/GeoLib/PointWithID.h index 530830411f7b10e24b49c42c7af797b54cb8a5f7..e0a0fd085454b4158e5493cf82f527c12fa2004f 100644 --- a/GeoLib/PointWithID.h +++ b/GeoLib/PointWithID.h @@ -10,7 +10,7 @@ #include "Point.h" -namespace GEOLIB { +namespace GeoLib { /** * class PointWithID is derived from class Point in * order to extend the class Point with an ID. @@ -32,6 +32,6 @@ public: protected: size_t _id; }; -} // end namespace GEOLIB +} // end namespace GeoLib #endif /* POINTWITHID_H_ */ diff --git a/GeoLib/Polygon.cpp b/GeoLib/Polygon.cpp index e769a71dae28547f631e448ccecd96a047c0d56a..d55def1ceadbae269d821148ff292823b0c1e91e 100644 --- a/GeoLib/Polygon.cpp +++ b/GeoLib/Polygon.cpp @@ -23,7 +23,7 @@ #include "quicksort.h" #include "swap.h" -namespace GEOLIB { +namespace GeoLib { Polygon::Polygon(const Polyline &ply, bool init) : Polyline (ply) @@ -59,16 +59,16 @@ bool Polygon::initialise () } } -bool Polygon::isPntInPolygon (GEOLIB::Point const & pnt) const +bool Polygon::isPntInPolygon (GeoLib::Point const & pnt) const { - GEOLIB::Point min_aabb_pnt (_aabb.getMinPoint()); - GEOLIB::Point max_aabb_pnt (_aabb.getMaxPoint()); + GeoLib::Point min_aabb_pnt (_aabb.getMinPoint()); + GeoLib::Point max_aabb_pnt (_aabb.getMaxPoint()); if (pnt[0] < min_aabb_pnt[0] || max_aabb_pnt[0] < pnt[0] || pnt[1] < min_aabb_pnt[1] || max_aabb_pnt[1] < pnt[1]) return false; size_t n_intersections (0); - GEOLIB::Point s; + GeoLib::Point s; if (_simple_polygon_list.empty ()) { const size_t n_nodes (getNumberOfPoints()-1); @@ -102,7 +102,7 @@ bool Polygon::isPntInPolygon (GEOLIB::Point const & pnt) const bool Polygon::isPntInPolygon (double x, double y, double z) const { - const GEOLIB::Point pnt(x,y,z); + const GeoLib::Point pnt(x,y,z); return isPntInPolygon (pnt); } @@ -119,9 +119,9 @@ bool Polygon::isPolylineInPolygon (const Polyline& ply) const return false; } -GEOLIB::Point* Polygon::getIntersectionPointPolygonLine (GEOLIB::Point const & a, GEOLIB::Point const & b) const +GeoLib::Point* Polygon::getIntersectionPointPolygonLine (GeoLib::Point const & a, GeoLib::Point const & b) const { - GEOLIB::Point* s (new GEOLIB::Point (0,0,0)); + GeoLib::Point* s (new GeoLib::Point (0,0,0)); if (_simple_polygon_list.empty ()) { const size_t n_nodes (getNumberOfPoints()-1); @@ -168,19 +168,19 @@ void Polygon::computeListOfSimplePolygons () } } -EdgeType::value Polygon::getEdgeType (size_t k, GEOLIB::Point const & pnt) const +EdgeType::value Polygon::getEdgeType (size_t k, GeoLib::Point const & pnt) const { switch (getLocationOfPoint(k, pnt)) { case Location::LEFT: { - const GEOLIB::Point & v (*(getPoint(k))); - const GEOLIB::Point & w (*(getPoint(k+1))); + const GeoLib::Point & v (*(getPoint(k))); + const GeoLib::Point & w (*(getPoint(k+1))); if (v[1] < pnt[1] && pnt[1] <= w[1]) return EdgeType::CROSSING; else return EdgeType::INESSENTIAL; break; } case Location::RIGHT: { - const GEOLIB::Point & v (*(getPoint(k))); - const GEOLIB::Point & w (*(getPoint(k+1))); + const GeoLib::Point & v (*(getPoint(k))); + const GeoLib::Point & w (*(getPoint(k+1))); if (w[1] < pnt[1] && pnt[1] <= v[1]) return EdgeType::CROSSING; else return EdgeType::INESSENTIAL; break; @@ -207,9 +207,9 @@ void Polygon::ensureCWOrientation () // *** pre processing: rotate points to xy-plan // *** copy points to vector - last point is identical to the first size_t n_pnts (this->getNumberOfPoints()-1); - std::vector<GEOLIB::Point*> tmp_polygon_pnts; + std::vector<GeoLib::Point*> tmp_polygon_pnts; for (size_t k(0); k < n_pnts; k++) { - tmp_polygon_pnts.push_back (new GEOLIB::Point (*(this->getPoint(k)))); + tmp_polygon_pnts.push_back (new GeoLib::Point (*(this->getPoint(k)))); } // *** calculate supporting plane (plane normal and @@ -280,7 +280,7 @@ void Polygon::splitPolygonAtIntersection (std::list<Polygon*>::iterator polygon_ { size_t idx0 (0), idx1 (0); while (polygon_it != _simple_polygon_list.end()) { - GEOLIB::Point *intersection_pnt (new GEOLIB::Point); + GeoLib::Point *intersection_pnt (new GeoLib::Point); bool is_simple (!MathLib::lineSegmentsIntersect (*polygon_it, idx0, idx1, *intersection_pnt)); if (!is_simple) { // adding intersection point to pnt_vec @@ -290,7 +290,7 @@ void Polygon::splitPolygonAtIntersection (std::list<Polygon*>::iterator polygon_ // split Polygon if (idx0 > idx1) BaseLib::swap (idx0, idx1); - GEOLIB::Polygon* polygon0 (new GEOLIB::Polygon((*polygon_it)->getPointsVec(), false)); + GeoLib::Polygon* polygon0 (new GeoLib::Polygon((*polygon_it)->getPointsVec(), false)); for (size_t k(0); k<=idx0; k++) polygon0->addPoint ((*polygon_it)->getPointID (k)); polygon0->addPoint (intersection_pnt_id); for (size_t k(idx1+1); k<(*polygon_it)->getNumberOfPoints(); k++) @@ -300,7 +300,7 @@ void Polygon::splitPolygonAtIntersection (std::list<Polygon*>::iterator polygon_ exit (1); } - GEOLIB::Polygon* polygon1 (new GEOLIB::Polygon((*polygon_it)->getPointsVec(), false)); + GeoLib::Polygon* polygon1 (new GeoLib::Polygon((*polygon_it)->getPointsVec(), false)); polygon1->addPoint (intersection_pnt_id); for (size_t k(idx0+1); k<=idx1; k++) polygon1->addPoint ((*polygon_it)->getPointID (k)); @@ -311,7 +311,7 @@ void Polygon::splitPolygonAtIntersection (std::list<Polygon*>::iterator polygon_ } // remove original polyline and add two new polylines - std::list<GEOLIB::Polygon*>::iterator polygon0_it, polygon1_it; + std::list<GeoLib::Polygon*>::iterator polygon0_it, polygon1_it; polygon_it = _simple_polygon_list.erase (polygon_it); polygon1_it = _simple_polygon_list.insert (polygon_it, polygon1); polygon0_it = _simple_polygon_list.insert (polygon1_it, polygon0); @@ -325,7 +325,7 @@ void Polygon::splitPolygonAtIntersection (std::list<Polygon*>::iterator polygon_ } } -void Polygon::splitPolygonAtPoint (std::list<GEOLIB::Polygon*>::iterator polygon_it) +void Polygon::splitPolygonAtPoint (std::list<GeoLib::Polygon*>::iterator polygon_it) { size_t n ((*polygon_it)->getNumberOfPoints()-1), idx0 (0), idx1(0); size_t *id_vec (new size_t[n]), *perm (new size_t[n]); @@ -346,20 +346,20 @@ void Polygon::splitPolygonAtPoint (std::list<GEOLIB::Polygon*>::iterator polygon if (idx0 > idx1) BaseLib::swap (idx0, idx1); // create two closed polylines - GEOLIB::Polygon* polygon0 (new GEOLIB::Polygon((*polygon_it)->getPointsVec())); + GeoLib::Polygon* polygon0 (new GeoLib::Polygon((*polygon_it)->getPointsVec())); for (size_t k(0); k<=idx0; k++) polygon0->addPoint ((*polygon_it)->getPointID (k)); for (size_t k(idx1+1); k<(*polygon_it)->getNumberOfPoints(); k++) polygon0->addPoint ((*polygon_it)->getPointID (k)); polygon0->initialise(); - GEOLIB::Polygon* polygon1 (new GEOLIB::Polygon((*polygon_it)->getPointsVec())); + GeoLib::Polygon* polygon1 (new GeoLib::Polygon((*polygon_it)->getPointsVec())); for (size_t k(idx0); k<=idx1; k++) polygon1->addPoint ((*polygon_it)->getPointID (k)); polygon1->initialise(); // remove original polygon and add two new polygons - std::list<GEOLIB::Polygon*>::iterator polygon0_it, polygon1_it; + std::list<GeoLib::Polygon*>::iterator polygon0_it, polygon1_it; polygon1_it = _simple_polygon_list.insert (_simple_polygon_list.erase (polygon_it), polygon1); polygon0_it = _simple_polygon_list.insert (polygon1_it, polygon0); @@ -373,21 +373,21 @@ void Polygon::splitPolygonAtPoint (std::list<GEOLIB::Polygon*>::iterator polygon delete [] id_vec; } -GEOLIB::Polygon* createPolygonFromCircle (GEOLIB::Point const& middle_pnt, double radius, - std::vector<GEOLIB::Point*> & pnts, size_t resolution) +GeoLib::Polygon* createPolygonFromCircle (GeoLib::Point const& middle_pnt, double radius, + std::vector<GeoLib::Point*> & pnts, size_t resolution) { const size_t off_set (pnts.size()); // create points double angle (2.0 * M_PI / resolution); for (size_t k(0); k<resolution; k++) { - GEOLIB::Point *pnt (new GEOLIB::Point(middle_pnt.getCoords())); + GeoLib::Point *pnt (new GeoLib::Point(middle_pnt.getCoords())); (*pnt)[0] += radius * cos (k*angle); (*pnt)[1] += radius * sin (k*angle); pnts.push_back (pnt); } // create polygon - GEOLIB::Polygon* polygon (new GEOLIB::Polygon (pnts, false)); + GeoLib::Polygon* polygon (new GeoLib::Polygon (pnts, false)); for (size_t k(0); k<resolution; k++) { polygon->addPoint (k+off_set); } @@ -397,4 +397,4 @@ GEOLIB::Polygon* createPolygonFromCircle (GEOLIB::Point const& middle_pnt, doubl } -} // end namespace GEOLIB +} // end namespace GeoLib diff --git a/GeoLib/Polygon.h b/GeoLib/Polygon.h index f341407183972c50bc478a83118f722b3972af64..7c01a4c06ddb65179aad4330150302dad5980b61 100644 --- a/GeoLib/Polygon.h +++ b/GeoLib/Polygon.h @@ -11,14 +11,14 @@ // STL #include <list> -// GEOLIB +// GeoLib #include "AxisAlignedBoundingBox.h" #include "Polyline.h" -namespace GEOLIB { +namespace GeoLib { /** - * \ingroup GEOLIB + * \ingroup GeoLib */ /** @@ -64,9 +64,9 @@ public: * @param pnt the Point * @return if point is inside the polygon true, else false */ - bool isPntInPolygon (const GEOLIB::Point& pnt) const; + bool isPntInPolygon (const GeoLib::Point& pnt) const; /** - * wrapper for method isPntInPolygon (const GEOLIB::Point&) + * wrapper for method isPntInPolygon (const GeoLib::Point&) * @param x x coordinate of point * @param y y coordinate of point * @param z z coordinate of point @@ -74,7 +74,7 @@ public: */ bool isPntInPolygon (double x, double y, double z) const; bool isPolylineInPolygon (const Polyline& ply) const; - GEOLIB::Point* getIntersectionPointPolygonLine (GEOLIB::Point const & a, GEOLIB::Point const & b) const; + GeoLib::Point* getIntersectionPointPolygonLine (GeoLib::Point const & a, GeoLib::Point const & b) const; void computeListOfSimplePolygons (); const std::list<Polygon*>& getListOfSimplePolygons (); @@ -85,7 +85,7 @@ private: * @param pnt point that is edge type computed for * @return a value of enum EdgeType */ - EdgeType::value getEdgeType (size_t k, GEOLIB::Point const & pnt) const; + EdgeType::value getEdgeType (size_t k, GeoLib::Point const & pnt) const; void calculateAxisAlignedBoundingBox (); void ensureCWOrientation (); @@ -96,9 +96,9 @@ private: AABB _aabb; }; -GEOLIB::Polygon* createPolygonFromCircle (GEOLIB::Point const& middle_pnt, double radius, - std::vector<GEOLIB::Point*> & pnts, size_t resolution = 12); +GeoLib::Polygon* createPolygonFromCircle (GeoLib::Point const& middle_pnt, double radius, + std::vector<GeoLib::Point*> & pnts, size_t resolution = 12); -} // end namespace GEOLIB +} // end namespace GeoLib #endif /* POLYGON_H_ */ diff --git a/GeoLib/Polyline.cpp b/GeoLib/Polyline.cpp index 7d40cb35c68a1723d1bb6fae6f4602de07d7cebc..5b4e3dda14b1699ee40ca368eb6306cf1d799827 100644 --- a/GeoLib/Polyline.cpp +++ b/GeoLib/Polyline.cpp @@ -10,7 +10,7 @@ #include "Polyline.h" -namespace GEOLIB { +namespace GeoLib { Polyline::Polyline(const std::vector<Point*>& pnt_vec) : GeoObject(), _ply_pnts(pnt_vec) @@ -115,7 +115,7 @@ Polyline* Polyline::constructPolylineFromSegments(const std::vector<Polyline*> & size_t nLines = ply_vec.size(); Polyline* new_ply = new Polyline(*ply_vec[0]); - std::vector<GEOLIB::Point*> pnt_vec(new_ply->getPointsVec()); + std::vector<GeoLib::Point*> pnt_vec(new_ply->getPointsVec()); std::vector<Polyline*> local_ply_vec; for (size_t i = 1; i < nLines; i++) { @@ -210,14 +210,14 @@ Polyline* Polyline::closePolyline(const Polyline& ply) return NULL; } -Location::type Polyline::getLocationOfPoint (size_t k, GEOLIB::Point const & pnt) const +Location::type Polyline::getLocationOfPoint (size_t k, GeoLib::Point const & pnt) const { assert (k<_ply_pnt_ids.size()-1); - GEOLIB::Point const& source (*(_ply_pnts[_ply_pnt_ids[k]])); - GEOLIB::Point const& dest (*(_ply_pnts[_ply_pnt_ids[k+1]])); - GEOLIB::Point a (dest[0]-source[0], dest[1]-source[1], dest[2]-source[2]); // vector - GEOLIB::Point b (pnt[0]-source[0], pnt[1]-source[1], pnt[2]-source[2]); // vector + GeoLib::Point const& source (*(_ply_pnts[_ply_pnt_ids[k]])); + GeoLib::Point const& dest (*(_ply_pnts[_ply_pnt_ids[k+1]])); + GeoLib::Point a (dest[0]-source[0], dest[1]-source[1], dest[2]-source[2]); // vector + GeoLib::Point b (pnt[0]-source[0], pnt[1]-source[1], pnt[2]-source[2]); // vector double det_2x2 (a[0]*b[1] - a[1]*b[0]); @@ -258,4 +258,4 @@ bool containsEdge (const Polyline& ply, size_t id0, size_t id1) } -} // end namespace GEOLIB +} // end namespace GeoLib diff --git a/GeoLib/Polyline.h b/GeoLib/Polyline.h index 6862c22ff7b30fa5e8ad87d8501e163f6c3b9d67..2cfdeefeb1dacc3fa2ceac7aaa7f3de5292a3a8e 100644 --- a/GeoLib/Polyline.h +++ b/GeoLib/Polyline.h @@ -8,7 +8,7 @@ #ifndef POLYLINE_H_ #define POLYLINE_H_ -// GEOLIB +// GeoLib #include "GeoObject.h" #include "Point.h" @@ -18,7 +18,7 @@ #include <vector> #include <cmath> -namespace GEOLIB { +namespace GeoLib { class Location { public: @@ -34,7 +34,7 @@ public: }; /** - * \ingroup GEOLIB + * \ingroup GeoLib * * \brief Class Polyline consists mainly of a reference to a point vector and * a vector that stores the indices in the point vector. @@ -130,7 +130,7 @@ protected: * @param pnt the point * @return a value of enum LOCATION */ - Location::type getLocationOfPoint (size_t k, GEOLIB::Point const & pnt) const; + Location::type getLocationOfPoint (size_t k, GeoLib::Point const & pnt) const; static bool pointsAreIdentical(const std::vector<Point*> &pnt_vec, size_t i, size_t j, double prox); diff --git a/GeoLib/PolylineVec.h b/GeoLib/PolylineVec.h index bb97c68c5ca583c55f7ad24d61546e9aa985e6c9..23ad584a3e9eee566af1e969d37509d3bfb31fed 100644 --- a/GeoLib/PolylineVec.h +++ b/GeoLib/PolylineVec.h @@ -11,10 +11,10 @@ #include "TemplateVec.h" #include "Polyline.h" -namespace GEOLIB { +namespace GeoLib { /** - * \ingroup GEOLIB + * \ingroup GeoLib * * \brief class PolylineVec encapsulate a std::vector of Polylines * additional one can give the vector of polylines a name diff --git a/GeoLib/QuadTree.h b/GeoLib/QuadTree.h index 83b5eb319e16775d25e612634db0a3c0cd057ded..f6b2c7222af4945befbda4f71d3380e39e278727 100644 --- a/GeoLib/QuadTree.h +++ b/GeoLib/QuadTree.h @@ -8,7 +8,7 @@ #ifndef QUADTREE_H_ #define QUADTREE_H_ -namespace GEOLIB { +namespace GeoLib { /** * A quadtree is a rooted tree in which every internal @@ -222,7 +222,7 @@ public: } } - void getQuadTree (std::vector<POINT*>& pnts, std::vector<GEOLIB::Polyline*>& plys) const + void getQuadTree (std::vector<POINT*>& pnts, std::vector<GeoLib::Polyline*>& plys) const { size_t pnt_pos (pnts.size()); pnts.push_back (new POINT (_ll)); diff --git a/GeoLib/Raster.cpp b/GeoLib/Raster.cpp index ddf5005444ee498329fa5a94ac30bd66b9c45e6e..53b90dfd6c1c5407fc45bc7877e394fc24241a4a 100644 --- a/GeoLib/Raster.cpp +++ b/GeoLib/Raster.cpp @@ -7,7 +7,7 @@ #include "Raster.h" -namespace GEOLIB { +namespace GeoLib { Raster::Raster(double cell_size, double no_data_val) : _cell_size(cell_size), _no_data_val(no_data_val) @@ -46,7 +46,7 @@ double* Raster::getRasterFromSurface(Surface const& sfc, size_t &n_x_pnts, size_ Triangle const * const tri (sfc[k]); // compute coefficients c0, c1, c2 for the plane f(x,y) = c0 x + c1 y + c2 double coeff[3] = {0.0, 0.0, 0.0}; - GEOLIB::getPlaneCoefficients(*tri, coeff); + GeoLib::getPlaneCoefficients(*tri, coeff); z_vals[r*n_y_pnts+c] = coeff[0] * test_pnt[0] + coeff[1] * test_pnt[1] + coeff[2]; break; } diff --git a/GeoLib/Raster.h b/GeoLib/Raster.h index a330638ca4a22c2ab0d023fcd5a569ab1ca4f7d7..829584d42d830ce14da519af2f736f7a801fc79e 100644 --- a/GeoLib/Raster.h +++ b/GeoLib/Raster.h @@ -10,7 +10,7 @@ #include "Surface.h" -namespace GEOLIB { +namespace GeoLib { class Raster { public: diff --git a/GeoLib/SimplePolygonTree.cpp b/GeoLib/SimplePolygonTree.cpp index c3454ac9a29ad31f7cf2ce87d5c3f8cefb366ddc..6c0cd25e927e698ae2f715b6b0b2b2f108a45c7c 100644 --- a/GeoLib/SimplePolygonTree.cpp +++ b/GeoLib/SimplePolygonTree.cpp @@ -7,7 +7,7 @@ #include "SimplePolygonTree.h" -namespace GEOLIB { +namespace GeoLib { SimplePolygonTree::SimplePolygonTree(const Polygon* polygon, SimplePolygonTree* parent) : _node (polygon), _parent (parent) @@ -180,4 +180,4 @@ void createPolygonTree (std::list<SimplePolygonTree*>& list_of_simple_polygon_hi } -} // end namespace GEOLIB +} // end namespace GeoLib diff --git a/GeoLib/SimplePolygonTree.h b/GeoLib/SimplePolygonTree.h index 44c500fc65723af75c6169ae2753f3183f569dcf..d88c42f936ead181089146124a6f5a81334153eb 100644 --- a/GeoLib/SimplePolygonTree.h +++ b/GeoLib/SimplePolygonTree.h @@ -11,7 +11,7 @@ #include "Polygon.h" // FileIO -namespace GEOLIB { +namespace GeoLib { /** * \brief This class computes and stores the topological relations between diff --git a/GeoLib/Station.cpp b/GeoLib/Station.cpp index 7736cf477dd6eb7b48ed1aad1801088cca2605d8..3a6bb42d6b4c741e5a50d25b07d50bcedb605f4c 100644 --- a/GeoLib/Station.cpp +++ b/GeoLib/Station.cpp @@ -10,11 +10,11 @@ // Base #include "StringTools.h" #include "DateTools.h" -// GEOLIB +// GeoLib #include "Station.h" -namespace GEOLIB { +namespace GeoLib { Station::Station(double x, double y, double z, std::string name, Color* const color) : Point (x,y,z), _name(name), _type(Station::STATION), _color(color) diff --git a/GeoLib/Station.h b/GeoLib/Station.h index 5a6943398eeb90699f37bc83d7cac77f4903652d..991a4e81e8de47bf38f4edb51636b4bea003321c 100644 --- a/GeoLib/Station.h +++ b/GeoLib/Station.h @@ -17,10 +17,10 @@ #include "PropertyBounds.h" -namespace GEOLIB { +namespace GeoLib { /** - * \ingroup GEOLIB + * \ingroup GeoLib * * \brief An observation station as a geometric object (i.e. basically a Point with some additional information. * diff --git a/GeoLib/Surface.cpp b/GeoLib/Surface.cpp index 066df2a2d572aa5fa8305dfd3d7162c84831d793..82e9b93330841ed1bed2b84a56434bbcd4829348 100644 --- a/GeoLib/Surface.cpp +++ b/GeoLib/Surface.cpp @@ -7,7 +7,7 @@ #include <list> -// GEOLIB +// GeoLib #include "Surface.h" #include "AxisAlignedBoundingBox.h" #include "Polygon.h" @@ -16,7 +16,7 @@ #include "AnalyticalGeometry.h" #include "EarClippingTriangulation.h" -namespace GEOLIB { +namespace GeoLib { Surface::Surface (const std::vector<Point*> &pnt_vec) : GeoObject(), _sfc_pnts(pnt_vec), _bv() @@ -52,17 +52,17 @@ Surface* Surface::createSurface(const Polyline &ply) polygon->computeListOfSimplePolygons (); // create surfaces from simple polygons - const std::list<GEOLIB::Polygon*>& list_of_simple_polygons (polygon->getListOfSimplePolygons()); - for (std::list<GEOLIB::Polygon*>::const_iterator simple_polygon_it (list_of_simple_polygons.begin()); + const std::list<GeoLib::Polygon*>& list_of_simple_polygons (polygon->getListOfSimplePolygons()); + for (std::list<GeoLib::Polygon*>::const_iterator simple_polygon_it (list_of_simple_polygons.begin()); simple_polygon_it != list_of_simple_polygons.end(); ++simple_polygon_it) { - std::list<GEOLIB::Triangle> triangles; + std::list<GeoLib::Triangle> triangles; std::cout << "triangulation of surface: ... " << std::flush; MathLib::EarClippingTriangulation(*simple_polygon_it, triangles); std::cout << "done - " << triangles.size () << " triangles " << std::endl; // add Triangles to Surface - std::list<GEOLIB::Triangle>::const_iterator it (triangles.begin()); + std::list<GeoLib::Triangle>::const_iterator it (triangles.begin()); while (it != triangles.end()) { sfc->addTriangle ((*it)[0], (*it)[1], (*it)[2]); it++; diff --git a/GeoLib/Surface.h b/GeoLib/Surface.h index 7bf36f273bd77f716dd5d50e82a15da4ae27f9c9..2f5991624ffdd8546c9b269349ecbdb2ac6f34c1 100644 --- a/GeoLib/Surface.h +++ b/GeoLib/Surface.h @@ -16,10 +16,10 @@ #include "Triangle.h" #include "AxisAlignedBoundingBox.h" -namespace GEOLIB { +namespace GeoLib { /** - * \ingroup GEOLIB + * \ingroup GeoLib * * \brief A Surface is represented by Triangles. It consists of a reference * to a vector of (pointers to) points (m_sfc_pnts) and a vector that stores diff --git a/GeoLib/SurfaceVec.h b/GeoLib/SurfaceVec.h index 7554f27d593253614e88614c1cd8d789bb151086..e69604693b59e96fee643bdb36b7d308d3b1be3e 100644 --- a/GeoLib/SurfaceVec.h +++ b/GeoLib/SurfaceVec.h @@ -12,7 +12,7 @@ #include "TemplateVec.h" #include "Surface.h" -namespace GEOLIB { +namespace GeoLib { /** * Class SurfaceVec encapsulate a std::vector of Surfaces diff --git a/GeoLib/TemplatePoint.h b/GeoLib/TemplatePoint.h index dd8ff541103b440912bc5e4267bbca5c1811b99b..c63b72d20b3e01aebff89fe614865ad88bccdab6 100644 --- a/GeoLib/TemplatePoint.h +++ b/GeoLib/TemplatePoint.h @@ -15,10 +15,10 @@ #include "GeoObject.h" -namespace GEOLIB { +namespace GeoLib { /** - * \ingroup GEOLIB + * \ingroup GeoLib * * \brief class-template for points can be instantiated by a numeric type. * \param T the coordinate type diff --git a/GeoLib/TemplateVec.h b/GeoLib/TemplateVec.h index 878539a4ea3034383f133bc7fff701bc1470d4c6..51ab39ef0b31562d584cb5588d22bd8821206d96 100644 --- a/GeoLib/TemplateVec.h +++ b/GeoLib/TemplateVec.h @@ -8,10 +8,10 @@ #ifndef TEMPLATEVEC_H_ #define TEMPLATEVEC_H_ -namespace GEOLIB { +namespace GeoLib { /** - * \ingroup GEOLIB + * \ingroup GeoLib * * \brief The class TemplateVec takes a unique name and manages * a std::vector of pointers to data elements of type T. @@ -176,6 +176,6 @@ private: std::map<std::string, size_t>* _name_id_map; }; -} // end namespace GEOLIB +} // end namespace GeoLib #endif /* TEMPLATEVEC_H_ */ diff --git a/GeoLib/Triangle.cpp b/GeoLib/Triangle.cpp index 06df2b4c28720ce481c661c2abaa61fb93d1851a..0992089f0ed58d44f7bf904ae8a179ee190a9997 100644 --- a/GeoLib/Triangle.cpp +++ b/GeoLib/Triangle.cpp @@ -13,7 +13,7 @@ #include "LinAlg/Dense/Matrix.h" #include "Vector3.h" -namespace GEOLIB { +namespace GeoLib { Triangle::Triangle (std::vector<Point *> const &pnt_vec) : _pnts(pnt_vec), _initialized (false), _longest_edge (0.0) @@ -54,24 +54,24 @@ void Triangle::setTriangle (size_t pnt_a, size_t pnt_b, size_t pnt_c) bool Triangle::containsPoint (const double *pnt) const { - GEOLIB::Point const& a_tmp (*(_pnts[_pnt_ids[0]])); - GEOLIB::Point const& b_tmp (*(_pnts[_pnt_ids[1]])); - GEOLIB::Point const& c_tmp (*(_pnts[_pnt_ids[2]])); + GeoLib::Point const& a_tmp (*(_pnts[_pnt_ids[0]])); + GeoLib::Point const& b_tmp (*(_pnts[_pnt_ids[1]])); + GeoLib::Point const& c_tmp (*(_pnts[_pnt_ids[2]])); - GEOLIB::Point s(a_tmp); + GeoLib::Point s(a_tmp); for (size_t k(0); k<3; k++) { s[k] += b_tmp[k] + c_tmp[k]; s[k] /= 3.0; } double eps (1e-2); - GEOLIB::Point const a (a_tmp[0] + eps *(a_tmp[0]-s[0]), + GeoLib::Point const a (a_tmp[0] + eps *(a_tmp[0]-s[0]), a_tmp[1] + eps *(a_tmp[1]-s[1]), a_tmp[2] + eps *(a_tmp[2]-s[2])); - GEOLIB::Point const b (b_tmp[0] + eps *(b_tmp[0]-s[0]), + GeoLib::Point const b (b_tmp[0] + eps *(b_tmp[0]-s[0]), b_tmp[1] + eps *(b_tmp[1]-s[1]), b_tmp[2] + eps *(b_tmp[2]-s[2])); - GEOLIB::Point const c (c_tmp[0] + eps *(c_tmp[0]-s[0]), + GeoLib::Point const c (c_tmp[0] + eps *(c_tmp[0]-s[0]), c_tmp[1] + eps *(c_tmp[1]-s[1]), c_tmp[2] + eps *(c_tmp[2]-s[2])); @@ -156,9 +156,9 @@ bool Triangle::containsPoint (const double *pnt) const bool Triangle::containsPoint2D (const double *pnt) const { - GEOLIB::Point const& a (*(_pnts[_pnt_ids[0]])); - GEOLIB::Point const& b (*(_pnts[_pnt_ids[1]])); - GEOLIB::Point const& c (*(_pnts[_pnt_ids[2]])); + GeoLib::Point const& a (*(_pnts[_pnt_ids[0]])); + GeoLib::Point const& b (*(_pnts[_pnt_ids[1]])); + GeoLib::Point const& c (*(_pnts[_pnt_ids[2]])); // criterion: p-a = u0 * (b-a) + u1 * (c-a); 0 <= u0, u1 <= 1, u0+u1 <= 1 MathLib::Matrix<double> mat (2,2); @@ -183,9 +183,9 @@ bool Triangle::containsPoint2D (const double *pnt) const void getPlaneCoefficients(Triangle const& tri, double c[3]) { - GEOLIB::Point const& p0 (*(tri.getPoint(0))); - GEOLIB::Point const& p1 (*(tri.getPoint(1))); - GEOLIB::Point const& p2 (*(tri.getPoint(2))); + GeoLib::Point const& p0 (*(tri.getPoint(0))); + GeoLib::Point const& p1 (*(tri.getPoint(1))); + GeoLib::Point const& p2 (*(tri.getPoint(2))); MathLib::Matrix<double> mat (3,3); mat(0,0) = p0[0]; mat(0,1) = p0[1]; @@ -204,4 +204,4 @@ void getPlaneCoefficients(Triangle const& tri, double c[3]) gauss.execute (c); } -} // end namespace GEOLIB +} // end namespace GeoLib diff --git a/GeoLib/Triangle.h b/GeoLib/Triangle.h index 2541ba5d6437237e7b91a7635651474bb25e5343..b404844d80ea4ec83298cfdf13cbb3bf31277c11 100644 --- a/GeoLib/Triangle.h +++ b/GeoLib/Triangle.h @@ -13,7 +13,7 @@ // GeoLib #include "Point.h" -namespace GEOLIB { +namespace GeoLib { /** \brief Class Triangle consists of a reference to a point vector and * a vector that stores the indices in the point vector. @@ -94,6 +94,6 @@ protected: void getPlaneCoefficients(Triangle const& tri, double c[3]); -} // end namespace GEOLIB +} // end namespace GeoLib #endif /* TRIANGLE_H_ */ diff --git a/MathLib/AnalyticalGeometry.cpp b/MathLib/AnalyticalGeometry.cpp index 108f6d094df20e51bedde9f50227b1bd708a19fc..e4b2037c4b08525e1f2c67afcac88a245f3a3993 100644 --- a/MathLib/AnalyticalGeometry.cpp +++ b/MathLib/AnalyticalGeometry.cpp @@ -43,14 +43,14 @@ Orientation getOrientation (const double& p0_x, const double& p0_y, return CW; } -Orientation getOrientation (const GEOLIB::Point* p0, const GEOLIB::Point* p1, const GEOLIB::Point* p2) +Orientation getOrientation (const GeoLib::Point* p0, const GeoLib::Point* p1, const GeoLib::Point* p2) { return getOrientation ((*p0)[0], (*p0)[1], (*p1)[0], (*p1)[1], (*p2)[0], (*p2)[1]); } -bool lineSegmentIntersect (const GEOLIB::Point& a, const GEOLIB::Point& b, - const GEOLIB::Point& c, const GEOLIB::Point& d, - GEOLIB::Point& s) +bool lineSegmentIntersect (const GeoLib::Point& a, const GeoLib::Point& b, + const GeoLib::Point& c, const GeoLib::Point& d, + GeoLib::Point& s) { Matrix<double> mat(2,2); mat(0,0) = b[0] - a[0]; @@ -98,7 +98,7 @@ bool lineSegmentIntersect (const GEOLIB::Point& a, const GEOLIB::Point& b, return false; } -bool lineSegmentsIntersect (const GEOLIB::Polyline* ply, size_t &idx0, size_t &idx1, GEOLIB::Point& intersection_pnt) +bool lineSegmentsIntersect (const GeoLib::Polyline* ply, size_t &idx0, size_t &idx1, GeoLib::Point& intersection_pnt) { size_t n_segs (ply->getNumberOfPoints() - 1); /** @@ -139,14 +139,14 @@ bool isPointInTriangle (const double p[3], const double a[3], const double b[3], return false; } -bool isPointInTriangle (const GEOLIB::Point* p, - const GEOLIB::Point* a, const GEOLIB::Point* b, const GEOLIB::Point* c) +bool isPointInTriangle (const GeoLib::Point* p, + const GeoLib::Point* a, const GeoLib::Point* b, const GeoLib::Point* c) { return isPointInTriangle (p->getCoords(), a->getCoords(), b->getCoords(), c->getCoords()); } // NewellPlane from book Real-Time Collision detection p. 494 -void getNewellPlane(const std::vector<GEOLIB::Point*>& pnts, Vector &plane_normal, +void getNewellPlane(const std::vector<GeoLib::Point*>& pnts, Vector &plane_normal, double& d) { d = 0; @@ -169,7 +169,7 @@ void getNewellPlane(const std::vector<GEOLIB::Point*>& pnts, Vector &plane_norma void rotatePointsToXY(Vector &plane_normal, - std::vector<GEOLIB::Point*> &pnts) + std::vector<GeoLib::Point*> &pnts) { double small_value (sqrt (std::numeric_limits<double>::min())); if (fabs(plane_normal[0]) < small_value && fabs(plane_normal[1]) < small_value) diff --git a/MathLib/AnalyticalGeometry.h b/MathLib/AnalyticalGeometry.h index d982f10f3a0058f93caa2de82c48d61b8d98755b..a6219ab73a288949f04f082e5f8055e69057df66 100644 --- a/MathLib/AnalyticalGeometry.h +++ b/MathLib/AnalyticalGeometry.h @@ -10,10 +10,10 @@ // MathLib #include "Vector3.h" -// GEOLIB +// GeoLib #include "Triangle.h" -namespace GEOLIB { +namespace GeoLib { class Polyline; } @@ -37,7 +37,7 @@ Orientation getOrientation (const double& p0_x, const double& p0_y, /** * wrapper for getOrientation () */ -Orientation getOrientation (const GEOLIB::Point* p0, const GEOLIB::Point* p1, const GEOLIB::Point* p2); +Orientation getOrientation (const GeoLib::Point* p0, const GeoLib::Point* p1, const GeoLib::Point* p2); /** * compute a supporting plane (represented by plane_normal and the value d) for the polygon @@ -47,17 +47,17 @@ Orientation getOrientation (const GEOLIB::Point* p0, const GEOLIB::Point* p1, co * @param plane_normal the normal of the plane the polygon is located in * @param d parameter from the plane equation */ -void getNewellPlane (const std::vector<GEOLIB::Point*>& pnts, MathLib::Vector &plane_normal, double& d); +void getNewellPlane (const std::vector<GeoLib::Point*>& pnts, MathLib::Vector &plane_normal, double& d); /** * * @param plane_normal * @param pnts */ -void rotatePointsToXY(MathLib::Vector &plane_normal, std::vector<GEOLIB::Point*> &pnts); +void rotatePointsToXY(MathLib::Vector &plane_normal, std::vector<GeoLib::Point*> &pnts); -bool isPointInTriangle (const GEOLIB::Point* p, - const GEOLIB::Point* a, const GEOLIB::Point* b, const GEOLIB::Point* c); +bool isPointInTriangle (const GeoLib::Point* p, + const GeoLib::Point* a, const GeoLib::Point* b, const GeoLib::Point* c); /** * test for intersections of the line segments of the Polyline @@ -67,7 +67,7 @@ bool isPointInTriangle (const GEOLIB::Point* p, * @param intersection_pnt the intersection point if the line segments intersect * @return true, if the polyline contains intersections */ -bool lineSegmentsIntersect (const GEOLIB::Polyline* ply, size_t &idx0, size_t &idx1, GEOLIB::Point& intersection_pnt); +bool lineSegmentsIntersect (const GeoLib::Polyline* ply, size_t &idx0, size_t &idx1, GeoLib::Point& intersection_pnt); /** * A line segment is given by its two end-points. The function checks, @@ -80,8 +80,8 @@ bool lineSegmentsIntersect (const GEOLIB::Polyline* ply, size_t &idx0, size_t &i * @param s the intersection point * @return true, if the line segments intersect, else false */ -bool lineSegmentIntersect (const GEOLIB::Point& a, const GEOLIB::Point& b, - const GEOLIB::Point& c, const GEOLIB::Point& d, GEOLIB::Point& s); +bool lineSegmentIntersect (const GeoLib::Point& a, const GeoLib::Point& b, + const GeoLib::Point& c, const GeoLib::Point& d, GeoLib::Point& s); } // end namespace MathLib diff --git a/MathLib/EarClippingTriangulation.cpp b/MathLib/EarClippingTriangulation.cpp index d8832cbd5fbc0f8e3b3d418d220cbc54d52a1c67..d95e8e66db86383c949676c0e8cfcf8189861e36 100644 --- a/MathLib/EarClippingTriangulation.cpp +++ b/MathLib/EarClippingTriangulation.cpp @@ -18,8 +18,8 @@ namespace MathLib { -EarClippingTriangulation::EarClippingTriangulation(const GEOLIB::Polygon* polygon, - std::list<GEOLIB::Triangle> &triangles, bool rot) +EarClippingTriangulation::EarClippingTriangulation(const GeoLib::Polygon* polygon, + std::list<GeoLib::Triangle> &triangles, bool rot) { copyPolygonPoints (polygon); @@ -32,14 +32,14 @@ EarClippingTriangulation::EarClippingTriangulation(const GEOLIB::Polygon* polygo initLists (); clipEars (); - std::vector<GEOLIB::Point*> const& ref_pnts_vec (polygon->getPointsVec()); - std::list<GEOLIB::Triangle>::const_iterator it (_triangles.begin()); + std::vector<GeoLib::Point*> const& ref_pnts_vec (polygon->getPointsVec()); + std::list<GeoLib::Triangle>::const_iterator it (_triangles.begin()); if (_original_orient == MathLib::CW) { while (it != _triangles.end()) { const size_t i0 (polygon->getPointID ((*it)[0])); const size_t i1 (polygon->getPointID ((*it)[1])); const size_t i2 (polygon->getPointID ((*it)[2])); - triangles.push_back (GEOLIB::Triangle (ref_pnts_vec, i0, i1, i2)); + triangles.push_back (GeoLib::Triangle (ref_pnts_vec, i0, i1, i2)); it++; } } else { @@ -48,7 +48,7 @@ EarClippingTriangulation::EarClippingTriangulation(const GEOLIB::Polygon* polygo const size_t i0 (polygon->getPointID (n_pnts-(*it)[0])); const size_t i1 (polygon->getPointID (n_pnts-(*it)[1])); const size_t i2 (polygon->getPointID (n_pnts-(*it)[2])); - triangles.push_back (GEOLIB::Triangle (ref_pnts_vec, i0, i1, i2)); + triangles.push_back (GeoLib::Triangle (ref_pnts_vec, i0, i1, i2)); it++; } } @@ -62,12 +62,12 @@ EarClippingTriangulation::~EarClippingTriangulation() } } -void EarClippingTriangulation::copyPolygonPoints (const GEOLIB::Polygon* polygon) +void EarClippingTriangulation::copyPolygonPoints (const GeoLib::Polygon* polygon) { // copy points - last point is identical to the first size_t n_pnts (polygon->getNumberOfPoints()-1); for (size_t k(0); k < n_pnts; k++) { - _pnts.push_back (new GEOLIB::Point (*(polygon->getPoint(k)))); + _pnts.push_back (new GeoLib::Point (*(polygon->getPoint(k)))); } } @@ -207,7 +207,7 @@ void EarClippingTriangulation::clipEars() prev--; } // add triangle - _triangles.push_back(GEOLIB::Triangle(_pnts, *prev, ear, *next)); + _triangles.push_back(GeoLib::Triangle(_pnts, *prev, ear, *next)); // check the orientation of prevprev, prev, next std::list<size_t>::iterator prevprev; @@ -294,9 +294,9 @@ void EarClippingTriangulation::clipEars() it = next; next++; if (getOrientation(_pnts[*prev], _pnts[*it], _pnts[*next]) == CCW) - _triangles.push_back(GEOLIB::Triangle(_pnts, *prev, *next, *it)); + _triangles.push_back(GeoLib::Triangle(_pnts, *prev, *next, *it)); else - _triangles.push_back(GEOLIB::Triangle(_pnts, *prev, *it, *next)); + _triangles.push_back(GeoLib::Triangle(_pnts, *prev, *it, *next)); } } // end namespace MathLib diff --git a/MathLib/EarClippingTriangulation.h b/MathLib/EarClippingTriangulation.h index 77b8e6000fc17dbbadffd735d8e685324e63e07c..4e0fc9d96dabddc86452a603f7e55bfe3d58918a 100644 --- a/MathLib/EarClippingTriangulation.h +++ b/MathLib/EarClippingTriangulation.h @@ -11,7 +11,7 @@ // STL #include <list> -// GEOLIB +// GeoLib #include "Polygon.h" #include "Triangle.h" @@ -22,13 +22,13 @@ namespace MathLib { class EarClippingTriangulation { public: - EarClippingTriangulation(const GEOLIB::Polygon* ply, std::list<GEOLIB::Triangle> &triangles, bool rot = true); + EarClippingTriangulation(const GeoLib::Polygon* ply, std::list<GeoLib::Triangle> &triangles, bool rot = true); virtual ~EarClippingTriangulation(); private: /** * copies the points of the polygon to the vector _pnts */ - inline void copyPolygonPoints (const GEOLIB::Polygon* polygon); + inline void copyPolygonPoints (const GeoLib::Polygon* polygon); inline void rotate (); inline void ensureCWOrientation (); @@ -41,7 +41,7 @@ private: /** * a copy of the polygon points */ - std::vector<GEOLIB::Point*> _pnts; + std::vector<GeoLib::Point*> _pnts; std::list<size_t> _vertex_list; std::list<size_t> _convex_vertex_list; std::list<size_t> _ear_list; @@ -49,7 +49,7 @@ private: /** * triangles of the triangulation (maybe in the wrong orientation) */ - std::list<GEOLIB::Triangle> _triangles; + std::list<GeoLib::Triangle> _triangles; MathLib::Orientation _original_orient; }; diff --git a/MathLib/MathTools.cpp b/MathLib/MathTools.cpp index d916c8a524fa1af09ac587fe9395d0e630cbf343..e6ccca427eae35e9cd676a4535aea2d502262da5 100644 --- a/MathLib/MathTools.cpp +++ b/MathLib/MathTools.cpp @@ -50,12 +50,12 @@ double calcProjPntToLineAndDists(const double p[3], const double a[3], return sqrt (sqrDist (p, proj_pnt)); } -double sqrNrm2 (const GEOLIB::Point* p0) +double sqrNrm2 (const GeoLib::Point* p0) { return scpr (p0->getCoords(), p0->getCoords(), 3); } -double sqrDist (const GEOLIB::Point* p0, const GEOLIB::Point* p1) +double sqrDist (const GeoLib::Point* p0, const GeoLib::Point* p1) { const double v[3] = {(*p1)[0] - (*p0)[0], (*p1)[1] - (*p0)[1], (*p1)[2] - (*p0)[2]}; return scpr (v, v, 3); @@ -67,7 +67,7 @@ double sqrDist(const double* p0, const double* p1) return scpr (v, v, 3); } -bool checkDistance(GEOLIB::Point const &p0, GEOLIB::Point const &p1, double squaredDistance) +bool checkDistance(GeoLib::Point const &p0, GeoLib::Point const &p1, double squaredDistance) { return (sqrDist(&p0, &p1) < squaredDistance); } diff --git a/MathLib/MathTools.h b/MathLib/MathTools.h index 344d4308009bfed12c830161ad7352e5ccb109b2..deb6f96366ec18bb0874aa601db5f50b83f4ecb7 100644 --- a/MathLib/MathTools.h +++ b/MathLib/MathTools.h @@ -70,13 +70,13 @@ double calcProjPntToLineAndDists(const double p[3], const double a[3], * @param squaredDistance The square of the distance within which the two points should be * @return true if p1 and p2 are within the given distance of each other, false otherwise */ -bool checkDistance(GEOLIB::Point const &p0, GEOLIB::Point const &p1, double squaredDistance); +bool checkDistance(GeoLib::Point const &p0, GeoLib::Point const &p1, double squaredDistance); /** squared euklid norm of the vector p0 */ -double sqrNrm2(const GEOLIB::Point* const p0); +double sqrNrm2(const GeoLib::Point* const p0); -/** squared dist between GEOLIB::Points p0 and p1 */ -double sqrDist(const GEOLIB::Point* p0, const GEOLIB::Point* p1); +/** squared dist between GeoLib::Points p0 and p1 */ +double sqrDist(const GeoLib::Point* p0, const GeoLib::Point* p1); /** squared dist between double arrays p0 and p1 (size of arrays is 3) */ double sqrDist(const double* p0, const double* p1); diff --git a/MathLib/Vector3.h b/MathLib/Vector3.h index c7d173f63f682f0f51895b9d5893034057d14d60..75f507f97fc68342984e0201a2dcf4e67caaa135 100644 --- a/MathLib/Vector3.h +++ b/MathLib/Vector3.h @@ -24,17 +24,17 @@ namespace MathLib { * operators. (* is cross product.) */ template <class T> -class TemplateVector : public GEOLIB::TemplatePoint<T> +class TemplateVector : public GeoLib::TemplatePoint<T> { public: - TemplateVector() : GEOLIB::TemplatePoint<T>() {}; - TemplateVector(T x1, T x2, T x3) : GEOLIB::TemplatePoint<T>(x1, x2, x3) {}; - TemplateVector(const GEOLIB::TemplatePoint<T> & rhs) : - GEOLIB::TemplatePoint<T>(rhs[0], rhs[1], rhs[2]) + TemplateVector() : GeoLib::TemplatePoint<T>() {}; + TemplateVector(T x1, T x2, T x3) : GeoLib::TemplatePoint<T>(x1, x2, x3) {}; + TemplateVector(const GeoLib::TemplatePoint<T> & rhs) : + GeoLib::TemplatePoint<T>(rhs[0], rhs[1], rhs[2]) {} /** constructs a vector from the gien points */ - TemplateVector(const GEOLIB::TemplatePoint<T> &a, const GEOLIB::TemplatePoint<T> &b) : - GEOLIB::TemplatePoint<T>(b[0]-a[0], b[1]-a[1], b[2]-a[2]) + TemplateVector(const GeoLib::TemplatePoint<T> &a, const GeoLib::TemplatePoint<T> &b) : + GeoLib::TemplatePoint<T>(b[0]-a[0], b[1]-a[1], b[2]-a[2]) {} ~TemplateVector() {}; @@ -58,7 +58,7 @@ public: return *this; } - TemplateVector& operator+=(const GEOLIB::TemplatePoint<T>& pnt) + TemplateVector& operator+=(const GeoLib::TemplatePoint<T>& pnt) { for (size_t i(0); i<3; i++) this->_x[i] += pnt[i]; return *this; diff --git a/MeshLib/Elements/FemElem.cpp b/MeshLib/Elements/FemElem.cpp index fc64795c9a6357918d0f4e503cbb5ac3d161397c..ac3c2026221adfb0d9a43d773b490d34dd18dc93 100644 --- a/MeshLib/Elements/FemElem.cpp +++ b/MeshLib/Elements/FemElem.cpp @@ -10,7 +10,7 @@ namespace MeshLib { FemElem::FemElem() - : _centroid(GEOLIB::Point(0,0,0)) + : _centroid(GeoLib::Point(0,0,0)) { } diff --git a/MeshLib/Elements/FemElem.h b/MeshLib/Elements/FemElem.h index b75265450b04d9b5155a4b2581c8047ea1fb3b22..a5229d743088b84aa99ba096928609e4411efd7e 100644 --- a/MeshLib/Elements/FemElem.h +++ b/MeshLib/Elements/FemElem.h @@ -22,7 +22,7 @@ public: virtual ~FemElem(); /// Get the number of nodes for this element. - const GEOLIB::Point& getCentroid() const { return _centroid; }; + const GeoLib::Point& getCentroid() const { return _centroid; }; protected: /// Constructor. @@ -34,7 +34,7 @@ protected: /// Calculate centre of gravity virtual void calcCentroid() = 0; - GEOLIB::Point _centroid; + GeoLib::Point _centroid; }; /* class */ diff --git a/MeshLib/Node.cpp b/MeshLib/Node.cpp index ed3a2fd33e888c5ac74bfa4376a572cc7f27cf03..7e49a8259a91472e3860399642503cffc3658d50 100644 --- a/MeshLib/Node.cpp +++ b/MeshLib/Node.cpp @@ -10,17 +10,17 @@ namespace MeshLib { Node::Node(const double coords[3], unsigned id) - : GEOLIB::PointWithID(coords, id) + : GeoLib::PointWithID(coords, id) { } Node::Node(double x, double y, double z, unsigned id) - : GEOLIB::PointWithID(x, y, z, id) + : GeoLib::PointWithID(x, y, z, id) { } Node::Node(const Node &node) - : GEOLIB::PointWithID(node.getCoords(), node.getID()) + : GeoLib::PointWithID(node.getCoords(), node.getID()) { } diff --git a/MeshLib/Node.h b/MeshLib/Node.h index c92ba2c507c682338e3e257e93509a8e806da735..1a64a2c9c21ff8cf6f084e4be2a9ff82fd870d0a 100644 --- a/MeshLib/Node.h +++ b/MeshLib/Node.h @@ -22,7 +22,7 @@ class Element; /** * A mesh node with coordinates in 3D space. */ -class Node : public GEOLIB::PointWithID +class Node : public GeoLib::PointWithID { /* friend functions: */ friend class Mesh;//void Mesh::setElementInformationForNodes(); diff --git a/SimpleTests/MeshTests/MeshRead.cpp b/SimpleTests/MeshTests/MeshRead.cpp index 6a3b4250e5f875c4ca594c6e7b24a17b7b2ae54e..6e6ea00e8522327c230a211658352507bff55b7e 100644 --- a/SimpleTests/MeshTests/MeshRead.cpp +++ b/SimpleTests/MeshTests/MeshRead.cpp @@ -20,8 +20,8 @@ int main(int argc, char *argv[]) //std::string file_name("/mnt/visdata/tom/data/TestMeshes/Mesh-dx1.00-Layered20.msh"); std::string file_name("c:/Project/PlyTestMesh.msh"); std::cout << "sizeof(double): " << sizeof (double) << std::endl; - std::cout << "sizeof(GeoLib::Point): " << sizeof (GEOLIB::Point) << std::endl; - std::cout << "sizeof(GeoLib::PointWithID): " << sizeof (GEOLIB::PointWithID) << std::endl; + std::cout << "sizeof(GeoLib::Point): " << sizeof (GeoLib::Point) << std::endl; + std::cout << "sizeof(GeoLib::PointWithID): " << sizeof (GeoLib::PointWithID) << std::endl; std::cout << "sizeof(Node): " << sizeof (MeshLib::Node) << std::endl; std::cout << "sizeof(Element): " << sizeof (MeshLib::Element) << std::endl; FileIO::MeshIO mesh_io;