Hi Julien,

why do you think, that the order is wrong?

As far as I see, the caller createUnitSpherePolyPolygon uses "hor" in the same meaning as "Horizontal Segments", and "ver" in the meaning of "Vertical Segments" as it is used in the UI. In the 3D-coordinate system, the y-axis is the rotation axis of the sphere, and a rotation circle lays in a plane parallel to the x-z-plane. The second parameter fHor determines the radius of such a rotation circle by cos(fHor) in getPointFromCartesian and the centre of this circle lays on the y-axis at sin(fHor). From view of the call getPointFromCartesian(fHor, fVer) in createUnitSpherePolyPolygon the radius of the circle is calculated from the vertical segments.

Kind regards
Regina


Julien Nabet (via Code Review) schrieb:
Hi,

I have submitted a patch for review:

     https://gerrit.libreoffice.org/3126

To pull it, you can do:

     git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/26/3126/1

coverity#983561: Arguments in wrong order

Change-Id: I3035457e93a659fe09cfe383735328f2854e5871
---
M basegfx/source/polygon/b3dpolypolygontools.cxx
1 file changed, 4 insertions(+), 3 deletions(-)



diff --git a/basegfx/source/polygon/b3dpolypolygontools.cxx 
b/basegfx/source/polygon/b3dpolypolygontools.cxx
index dd7fa41..2f498be 100644
--- a/basegfx/source/polygon/b3dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b3dpolypolygontools.cxx
@@ -222,9 +222,10 @@
              return aRetval;
          }

-        // helper for getting the 3D Point from given cartesian coordiantes. 
fVer is defined from
-        // [F_PI2 .. -F_PI2], fHor from [0.0 .. F_2PI]
-        inline B3DPoint getPointFromCartesian(double fVer, double fHor)
+        // helper for getting the 3D Point from given cartesian coordinates.
+        // fHor from [0.0 .. F_2PI]
+        // fVer is defined from [F_PI2 .. -F_PI2]
+        inline B3DPoint getPointFromCartesian(double fHor, double fVer)
          {
              const double fCosHor(cos(fHor));
              return B3DPoint(fCosHor * cos(fVer), sin(fHor), fCosHor * 
-sin(fVer));


_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to