diff options
Diffstat (limited to 'basegfx/source/polygon/b3dpolygontools.cxx')
-rw-r--r-- | basegfx/source/polygon/b3dpolygontools.cxx | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/basegfx/source/polygon/b3dpolygontools.cxx b/basegfx/source/polygon/b3dpolygontools.cxx index 8bdfd132faa3..bcec7203e22a 100644 --- a/basegfx/source/polygon/b3dpolygontools.cxx +++ b/basegfx/source/polygon/b3dpolygontools.cxx @@ -88,71 +88,6 @@ namespace basegfx return rCandidate.getNormal(); } - double getSignedArea(const B3DPolygon& rCandidate) - { - double fRetval(0.0); - const sal_uInt32 nPointCount(rCandidate.count()); - - if(nPointCount > 2) - { - const B3DVector aAbsNormal(absolute(getNormal(rCandidate))); - sal_uInt16 nCase(3); // default: ignore z - - if(aAbsNormal.getX() > aAbsNormal.getY()) - { - if(aAbsNormal.getX() > aAbsNormal.getZ()) - { - nCase = 1; // ignore x - } - } - else if(aAbsNormal.getY() > aAbsNormal.getZ()) - { - nCase = 2; // ignore y - } - - B3DPoint aPreviousPoint(rCandidate.getB3DPoint(nPointCount - 1L)); - - for(sal_uInt32 a(0L); a < nPointCount; a++) - { - const B3DPoint aCurrentPoint(rCandidate.getB3DPoint(a)); - - switch(nCase) - { - case 1: // ignore x - fRetval += aPreviousPoint.getZ() * aCurrentPoint.getY(); - fRetval -= aPreviousPoint.getY() * aCurrentPoint.getZ(); - break; - case 2: // ignore y - fRetval += aPreviousPoint.getX() * aCurrentPoint.getZ(); - fRetval -= aPreviousPoint.getZ() * aCurrentPoint.getX(); - break; - case 3: // ignore z - fRetval += aPreviousPoint.getX() * aCurrentPoint.getY(); - fRetval -= aPreviousPoint.getY() * aCurrentPoint.getX(); - break; - } - - // prepare next step - aPreviousPoint = aCurrentPoint; - } - - switch(nCase) - { - case 1: // ignore x - fRetval /= 2.0 * aAbsNormal.getX(); - break; - case 2: // ignore y - fRetval /= 2.0 * aAbsNormal.getY(); - break; - case 3: // ignore z - fRetval /= 2.0 * aAbsNormal.getZ(); - break; - } - } - - return fRetval; - } - double getLength(const B3DPolygon& rCandidate) { double fRetval(0.0); |