From 7b47486069c9c6dd9b48b0feafbc5d2cff23d9a0 Mon Sep 17 00:00:00 2001
From: Karsten Rink <karsten.rink@ufz.de>
Date: Mon, 7 Oct 2013 16:26:00 +0200
Subject: [PATCH] added comments

---
 Gui/DataView/GeoMapper.cpp |  1 +
 Gui/DataView/GeoMapper.h   | 11 +++++++++++
 2 files changed, 12 insertions(+)

diff --git a/Gui/DataView/GeoMapper.cpp b/Gui/DataView/GeoMapper.cpp
index 3336daf2283..0360f6389ee 100644
--- a/Gui/DataView/GeoMapper.cpp
+++ b/Gui/DataView/GeoMapper.cpp
@@ -206,6 +206,7 @@ void GeoMapper::advancedMapOnMesh(const MeshLib::Mesh* mesh, const std::string &
 		(*new_lines)[i]->update(pnt_id_map);
 	this->_geo_objects.addPolylineVec(new_lines, new_geo_name);
 
+	// map new geometry incl. additional point using the normal mapping method
 	this->_geo_name = new_geo_name;
 	this->mapOnMesh(mesh);
 }
diff --git a/Gui/DataView/GeoMapper.h b/Gui/DataView/GeoMapper.h
index e76a87ab6b5..8db7c663af8 100644
--- a/Gui/DataView/GeoMapper.h
+++ b/Gui/DataView/GeoMapper.h
@@ -48,16 +48,27 @@ public:
 private:
 	// Manages the mapping geometric data (points, stations, boreholes) on a raster or mesh.
 	void mapData();
+
 	// Returns a grid containing all mesh surface points with elevation=0
 	GeoLib::Grid<GeoLib::PointWithID>* getFlatGrid(MeshLib::Mesh const*const mesh, std::vector<GeoLib::PointWithID*> sfc_pnts) const;
+	
 	// Returns the elevation at Point (x,y) based on a mesh. This uses collision detection for triangles and nearest neighbor for quads.
+	// NOTE: This medhod only returns correct values if the node numbering of the elements is correct!
 	double getMeshElevation(double x, double y, double min_val, double max_val) const;
+
 	// Returns the elevation at Point (x,y) based on a raster
 	float getDemElevation(double x, double y) const;
 
+	// Calculates the intersection of two lines embedded in the xy-plane
 	GeoLib::Point* calcIntersection(GeoLib::Point const*const p1, GeoLib::Point const*const p2, GeoLib::Point const*const q1, GeoLib::Point const*const q2) const;
+
+	// Returns the position of a point within a line-segment
 	unsigned getPointPosInLine(GeoLib::Polyline const*const line, unsigned start, unsigned end, GeoLib::Point const*const point, double eps) const;
+
+	// Returns the maximum segment length in a polyline vector
 	double GeoMapper::getMaxSegmentLength(const std::vector<GeoLib::Polyline*> &lines) const;
+
+	// Returns if a point p is within a bounding box defined by a and b
 	bool isPntInBoundingBox(double ax, double ay, double bx, double by, double px, double py) const;
 
 	GeoLib::GEOObjects& _geo_objects;
-- 
GitLab