From a40c57786ce0e230d3d6cfbd9ff62bf0f6c24793 Mon Sep 17 00:00:00 2001 From: luz paz Date: Tue, 21 Dec 2021 16:10:04 -0500 Subject: [PATCH] Base: translate doxygen from DE/FR to EN For the purpose of making the source documentation uniform, source comments in this file were translated to english. --- src/Base/BoundBox.h | 22 +++++++++++----------- src/Base/Tools2D.cpp | 40 ++++++++++++++++++++-------------------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/Base/BoundBox.h b/src/Base/BoundBox.h index c59e2c8cf5..9d9f8ca12f 100644 --- a/src/Base/BoundBox.h +++ b/src/Base/BoundBox.h @@ -627,39 +627,39 @@ inline bool BoundBox3<_Precision>::IsCutLine (const Vector3<_Precision>& rcBase, { _Precision fDist; - // zuerst nur grobe und schnelle Pruefung, indem der - // Abstand der Linie zum Mittelpunkt der BB berechnet wird - // und mit der maximalen Diagonalenlaenge + fTolerance - // verglichen wird. + // at first only a rough and quick test by the + // Distance of the line to the center of the BB is calculated + // and with the maximum diagonal length + fTolerance + // will be compared. - // Distanz zwischen Mittelpunkt und Linie + // Distance between center point and line fDist = (rcDir % (GetCenter() - rcBase)).Length() / rcDir.Length(); if (fDist > (CalcDiagonalLength() + fTolerance)) { return false; } - else { // hier genauerer Test + else { // more detailed test here unsigned char i; Vector3<_Precision> clVectRes; - // schneide jede Seitenflaeche mit der Linie + // intersect each face with the line for (i = 0; i < 6; i++) { if (IntersectPlaneWithLine(i, rcBase, rcDir, clVectRes)) { - // pruefe, ob Schnittpunkt innerhalb BB-Grenzen + Toleranz + // Check whether the intersection point is within BB limits + Tolerance switch (i) { - case LEFT : // linke und rechte Ebene + case LEFT : // left and right plane case RIGHT : if ((isOnRayW (MinY - fTolerance, MaxY + fTolerance, clVectRes.y) && isOnRayW (MinZ - fTolerance, MaxZ + fTolerance, clVectRes.z))) return true; break; - case TOP : // obere und untere Ebene + case TOP : // top and bottom plane case BOTTOM : if ((isOnRayW (MinX - fTolerance, MaxX + fTolerance, clVectRes.x) && isOnRayW (MinZ - fTolerance, MaxZ + fTolerance, clVectRes.z))) return true; break; - case FRONT : // vordere und hintere Ebene + case FRONT : // front and back plane case BACK : if ((isOnRayW (MinX - fTolerance, MaxX + fTolerance, clVectRes.x) && isOnRayW (MinY - fTolerance, MaxY + fTolerance, clVectRes.y))) diff --git a/src/Base/Tools2D.cpp b/src/Base/Tools2D.cpp index 4ef8768f58..57622508ee 100644 --- a/src/Base/Tools2D.cpp +++ b/src/Base/Tools2D.cpp @@ -277,7 +277,7 @@ static short _CalcTorsion (double *pfLine, double fX, double fY) int sQuad[2], i; // Changing this from short to int allows the compiler to inline this function double fResX; - // Klassifizierung der beiden Polygonpunkte in Quadranten + // Classification of both polygon points into quadrants for (i = 0; i < 2; i++) { if (pfLine[i * 2] <= fX) @@ -286,46 +286,46 @@ static short _CalcTorsion (double *pfLine, double fX, double fY) sQuad[i] = (pfLine[i * 2 + 1] > fY) ? 1 : 2; } - // Abbruch bei Linienpunkten innerhalb eines Quadranten - // Abbruch bei nichtschneidenden Linienpunkten + // Abort at line points within a quadrant + // Abort at non-intersecting line points if (abs (sQuad[0] - sQuad[1]) <= 1) return 0; - // Beide Punkte links von ulX + // Both points to the left of ulX if (abs (sQuad[0] - sQuad[1]) == 3) return (sQuad[0] == 0) ? 1 : -1; - // Restfaelle : Quadrantendifferenz von 2 - // mathematischer Test auf Schnitt + // Remaining cases: Quadrant difference from 2 + // mathematical tests on intersection fResX = pfLine[0] + (fY - pfLine[1]) / ((pfLine[3] - pfLine[1]) / (pfLine[2] - pfLine[0])); if (fResX < fX) - // oben/unten oder unten/oben + // up/down or down/up return (sQuad[0] <= 1) ? 1 : -1; - // Verbleibende Faelle ? + // Remaining cases? return 0; } bool Polygon2d::Contains (const Vector2d &rclV) const { - // Ermittelt mit dem Verfahren der Windungszahl, ob ein Punkt innerhalb - // eines Polygonzugs enthalten ist. - // Summe aller Windungszahlen gibt an, ob ja oder nein. + // Using the number of turns method, determines + // whether a point is contained within a polygon. + // The sum of all turns indicates whether yes or no. double pfTmp[4]; unsigned long i; short sTorsion = 0; - // Fehlercheck + // Error check if (GetCtVectors() < 3) return false; - // fuer alle Polygon-Linien + // for all polygon lines for (i = 0; i < GetCtVectors(); i++) { - // Linienstruktur belegen + // Evidence of line structure if (i == GetCtVectors() - 1) { - // Polygon automatisch schliessen + // Close polygon automatically pfTmp[0] = _aclVct[i].x; pfTmp[1] = _aclVct[i].y; pfTmp[2] = _aclVct[0].x; @@ -333,25 +333,25 @@ bool Polygon2d::Contains (const Vector2d &rclV) const } else { - // uebernehmen Punkt i und i+1 + // accept point i and i+1 pfTmp[0] = _aclVct[i].x; pfTmp[1] = _aclVct[i].y; pfTmp[2] = _aclVct[i + 1].x; pfTmp[3] = _aclVct[i + 1].y; } - // Schnitt-Test durchfuehren und Windungszaehler berechnen + // Carry out a cut test and calculate the turn counter sTorsion += _CalcTorsion (pfTmp, rclV.x, rclV.y); } - // Windungszaehler auswerten + // Evaluate turn counter return sTorsion != 0; } void Polygon2d::Intersect (const Polygon2d &rclPolygon, std::list &rclResultPolygonList) const { - // trimmen des uebergebenen Polygons mit dem aktuellen, Ergebnis ist eine Liste von Polygonen (Untermenge des uebergebenen Polygons) - // das eigene (Trim-) Polygon ist geschlossen + // trim the passed polygon with the current one, the result is a list of polygons (subset of the passed polygon) + // your own (trim) polygon is closed // if ((rclPolygon.GetCtVectors() < 2) || (GetCtVectors() < 2)) return;