summaryrefslogtreecommitdiff
path: root/basegfx/source/point
diff options
context:
space:
mode:
Diffstat (limited to 'basegfx/source/point')
-rw-r--r--basegfx/source/point/b2dhompoint.cxx259
-rw-r--r--basegfx/source/point/b2dpoint.cxx85
-rw-r--r--basegfx/source/point/b2ipoint.cxx76
-rw-r--r--basegfx/source/point/b3dhompoint.cxx44
-rw-r--r--basegfx/source/point/b3dpoint.cxx85
-rw-r--r--basegfx/source/point/b3ipoint.cxx79
-rw-r--r--basegfx/source/point/makefile.mk52
7 files changed, 680 insertions, 0 deletions
diff --git a/basegfx/source/point/b2dhompoint.cxx b/basegfx/source/point/b2dhompoint.cxx
new file mode 100644
index 000000000000..979fbd4cdd3b
--- /dev/null
+++ b/basegfx/source/point/b2dhompoint.cxx
@@ -0,0 +1,259 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_basegfx.hxx"
+#include <basegfx/point/b2dhompoint.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <basegfx/numeric/ftools.hxx>
+
+namespace basegfx
+{
+ bool B2DHomPoint::implIsHomogenized() const
+ {
+ const double fOne(1.0);
+ return ::basegfx::fTools::equal(fOne, mfW);
+ }
+
+ void B2DHomPoint::implHomogenize()
+ {
+ const double fFactor(1.0 / mfW);
+ maTuple.setX(maTuple.getX() * fFactor);
+ maTuple.setY(maTuple.getY() * fFactor);
+ mfW = 1.0;
+ }
+
+ void B2DHomPoint::implTestAndHomogenize() const
+ {
+ if(!implIsHomogenized())
+ ((B2DHomPoint*)this)->implHomogenize();
+ }
+
+ B2DPoint B2DHomPoint::getB2DPoint() const
+ {
+ implTestAndHomogenize();
+ return B2DPoint(maTuple.getX(), maTuple.getY());
+ }
+
+ double B2DHomPoint::getX() const
+ {
+ implTestAndHomogenize();
+ return maTuple.getX();
+ }
+
+ double B2DHomPoint::getY() const
+ {
+ implTestAndHomogenize();
+ return maTuple.getY();
+ }
+
+ void B2DHomPoint::setX(double fX)
+ {
+ maTuple.setX(implIsHomogenized() ? fX : fX * mfW );
+ }
+
+ void B2DHomPoint::setY(double fY)
+ {
+ maTuple.setY(implIsHomogenized() ? fY : fY * mfW );
+ }
+
+ B2DHomPoint& B2DHomPoint::operator+=( const B2DHomPoint& rPnt )
+ {
+ maTuple.setX(getX() * rPnt.mfW + rPnt.getX() * mfW);
+ maTuple.setY(getY() * rPnt.mfW + rPnt.getY() * mfW);
+ mfW = mfW * rPnt.mfW;
+
+ return *this;
+ }
+
+ B2DHomPoint& B2DHomPoint::operator-=( const B2DHomPoint& rPnt )
+ {
+ maTuple.setX(getX() * rPnt.mfW - rPnt.getX() * mfW);
+ maTuple.setY(getY() * rPnt.mfW - rPnt.getY() * mfW);
+ mfW = mfW * rPnt.mfW;
+
+ return *this;
+ }
+
+ B2DHomPoint& B2DHomPoint::operator*=(double t)
+ {
+ if(!::basegfx::fTools::equalZero(t))
+ {
+ mfW /= t;
+ }
+
+ return *this;
+ }
+
+ B2DHomPoint& B2DHomPoint::operator*=( const B2DHomMatrix& rMat )
+ {
+ const double fTempX( rMat.get(0,0)*maTuple.getX() +
+ rMat.get(0,1)*maTuple.getY() +
+ rMat.get(0,2)*mfW );
+
+ const double fTempY( rMat.get(1,0)*maTuple.getX() +
+ rMat.get(1,1)*maTuple.getY() +
+ rMat.get(1,2)*mfW );
+
+ const double fTempZ( rMat.get(2,0)*maTuple.getX() +
+ rMat.get(2,1)*maTuple.getY() +
+ rMat.get(2,2)*mfW );
+ maTuple.setX( fTempX );
+ maTuple.setY( fTempY );
+ mfW = fTempZ;
+
+ return *this;
+ }
+
+ B2DHomPoint& B2DHomPoint::operator/=(double t)
+ {
+ mfW *= t;
+ return *this;
+ }
+
+ B2DHomPoint& B2DHomPoint::operator-(void)
+ {
+ mfW = -mfW;
+ return *this;
+ }
+
+ bool B2DHomPoint::operator==( const B2DHomPoint& rPnt ) const
+ {
+ implTestAndHomogenize();
+ return (maTuple == rPnt.maTuple);
+ }
+
+ bool B2DHomPoint::operator!=( const B2DHomPoint& rPnt ) const
+ {
+ implTestAndHomogenize();
+ return (maTuple != rPnt.maTuple);
+ }
+
+ B2DHomPoint& B2DHomPoint::operator=( const B2DHomPoint& rPnt )
+ {
+ maTuple = rPnt.maTuple;
+ mfW = rPnt.mfW;
+ return *this;
+ }
+
+ B2DHomPoint minimum(const B2DHomPoint& rVecA, const B2DHomPoint& rVecB)
+ {
+ B2DHomPoint aMin(
+ (rVecB.getX() < rVecA.getX()) ? rVecB.getX() : rVecA.getX(),
+ (rVecB.getY() < rVecA.getY()) ? rVecB.getY() : rVecA.getY());
+ return aMin;
+ }
+
+ B2DHomPoint maximum(const B2DHomPoint& rVecA, const B2DHomPoint& rVecB)
+ {
+ B2DHomPoint aMax(
+ (rVecB.getX() > rVecA.getX()) ? rVecB.getX() : rVecA.getX(),
+ (rVecB.getY() > rVecA.getY()) ? rVecB.getY() : rVecA.getY());
+ return aMax;
+ }
+ B2DHomPoint absolute(const B2DHomPoint& rVec)
+ {
+ B2DHomPoint aAbs(
+ (0.0 > rVec.getX()) ? -rVec.getX() : rVec.getX(),
+ (0.0 > rVec.getY()) ? -rVec.getY() : rVec.getY());
+ return aAbs;
+ }
+
+ B2DHomPoint interpolate(B2DHomPoint& rOld1, B2DHomPoint& rOld2, double t)
+ {
+ B2DHomPoint aInt(
+ ((rOld2.getX() - rOld1.getX()) * t) + rOld1.getX(),
+ ((rOld2.getY() - rOld1.getY()) * t) + rOld1.getY());
+ return aInt;
+ }
+
+ B2DHomPoint average(B2DHomPoint& rOld1, B2DHomPoint& rOld2)
+ {
+ B2DHomPoint aAvg(
+ (rOld1.getX() + rOld2.getX()) * 0.5,
+ (rOld1.getY() + rOld2.getY()) * 0.5);
+ return aAvg;
+ }
+
+ B2DHomPoint average(B2DHomPoint& rOld1, B2DHomPoint& rOld2, B2DHomPoint& rOld3)
+ {
+ B2DHomPoint aAvg(
+ (rOld1.getX() + rOld2.getX() + rOld3.getX()) * (1.0 / 3.0),
+ (rOld1.getY() + rOld2.getY() + rOld3.getY()) * (1.0 / 3.0));
+ return aAvg;
+ }
+
+ B2DHomPoint operator+(const B2DHomPoint& rVecA, const B2DHomPoint& rVecB)
+ {
+ B2DHomPoint aSum(rVecA);
+ aSum += rVecB;
+ return aSum;
+ }
+
+ B2DHomPoint operator-(const B2DHomPoint& rVecA, const B2DHomPoint& rVecB)
+ {
+ B2DHomPoint aSub(rVecA);
+ aSub -= rVecB;
+ return aSub;
+ }
+
+ B2DHomPoint operator*(const B2DHomPoint& rVec, double t)
+ {
+ B2DHomPoint aNew(rVec);
+ aNew *= t;
+ return aNew;
+ }
+
+ B2DHomPoint operator*(double t, const B2DHomPoint& rVec)
+ {
+ B2DHomPoint aNew(rVec);
+ aNew *= t;
+ return aNew;
+ }
+
+ B2DHomPoint operator*( const B2DHomMatrix& rMat, const B2DHomPoint& rPoint )
+ {
+ B2DHomPoint aNew(rPoint);
+ return aNew*=rMat;
+ }
+
+ B2DHomPoint operator/(const B2DHomPoint& rVec, double t)
+ {
+ B2DHomPoint aNew(rVec);
+ aNew /= t;
+ return aNew;
+ }
+
+ B2DHomPoint operator/(double t, const B2DHomPoint& rVec)
+ {
+ B2DHomPoint aNew(rVec);
+ aNew /= t;
+ return aNew;
+ }
+} // end of namespace basegfx
+
+// eof
diff --git a/basegfx/source/point/b2dpoint.cxx b/basegfx/source/point/b2dpoint.cxx
new file mode 100644
index 000000000000..39b5eaa6fcbf
--- /dev/null
+++ b/basegfx/source/point/b2dpoint.cxx
@@ -0,0 +1,85 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_basegfx.hxx"
+#include <basegfx/point/b2dpoint.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <basegfx/numeric/ftools.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace basegfx
+{
+ B2DPoint& B2DPoint::operator=( const ::basegfx::B2DTuple& rPoint )
+ {
+ mfX = rPoint.getX();
+ mfY = rPoint.getY();
+ return *this;
+ }
+
+ B2DPoint& B2DPoint::operator*=( const ::basegfx::B2DHomMatrix& rMat )
+ {
+ double fTempX(
+ rMat.get(0, 0) * mfX +
+ rMat.get(0, 1) * mfY +
+ rMat.get(0, 2));
+ double fTempY(
+ rMat.get(1, 0) * mfX +
+ rMat.get(1, 1) * mfY +
+ rMat.get(1, 2));
+
+ if(!rMat.isLastLineDefault())
+ {
+ const double fOne(1.0);
+ const double fTempM(
+ rMat.get(2, 0) * mfX +
+ rMat.get(2, 1) * mfY +
+ rMat.get(2, 2));
+
+ if(!fTools::equalZero(fTempM) && !fTools::equal(fOne, fTempM))
+ {
+ fTempX /= fTempM;
+ fTempY /= fTempM;
+ }
+ }
+
+ mfX = fTempX;
+ mfY = fTempY;
+
+ return *this;
+ }
+
+ B2DPoint operator*( const ::basegfx::B2DHomMatrix& rMat, const B2DPoint& rPoint )
+ {
+ B2DPoint aRes( rPoint );
+ return aRes *= rMat;
+ }
+} // end of namespace basegfx
+
+//////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/basegfx/source/point/b2ipoint.cxx b/basegfx/source/point/b2ipoint.cxx
new file mode 100644
index 000000000000..09af767518b3
--- /dev/null
+++ b/basegfx/source/point/b2ipoint.cxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_basegfx.hxx"
+#include <basegfx/point/b2ipoint.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <basegfx/numeric/ftools.hxx>
+
+namespace basegfx
+{
+ B2IPoint& B2IPoint::operator=( const ::basegfx::B2ITuple& rPoint )
+ {
+ mnX = rPoint.getX();
+ mnY = rPoint.getY();
+ return *this;
+ }
+
+ B2IPoint& B2IPoint::operator*=( const ::basegfx::B2DHomMatrix& rMat )
+ {
+ double fTempX(
+ rMat.get(0, 0) * mnX +
+ rMat.get(0, 1) * mnY +
+ rMat.get(0, 2));
+ double fTempY(
+ rMat.get(1, 0) * mnX +
+ rMat.get(1, 1) * mnY +
+ rMat.get(1, 2));
+
+ if(!rMat.isLastLineDefault())
+ {
+ const double fOne(1.0);
+ const double fTempM(
+ rMat.get(2, 0) * mnX +
+ rMat.get(2, 1) * mnY +
+ rMat.get(2, 2));
+
+ if(!fTools::equalZero(fTempM) && !fTools::equal(fOne, fTempM))
+ {
+ fTempX /= fTempM;
+ fTempY /= fTempM;
+ }
+ }
+
+ mnX = fround(fTempX);
+ mnY = fround(fTempY);
+
+ return *this;
+ }
+} // end of namespace basegfx
+
+// eof
diff --git a/basegfx/source/point/b3dhompoint.cxx b/basegfx/source/point/b3dhompoint.cxx
new file mode 100644
index 000000000000..34dee5bc01d0
--- /dev/null
+++ b/basegfx/source/point/b3dhompoint.cxx
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_basegfx.hxx"
+#include <basegfx/point/b3dhompoint.hxx>
+
+namespace basegfx
+{
+ void B3DHomPoint::implHomogenize()
+ {
+ const double fFactor(1.0 / mfW);
+ maTuple.setX(maTuple.getX() * fFactor);
+ maTuple.setY(maTuple.getY() * fFactor);
+ maTuple.setZ(maTuple.getZ() * fFactor);
+ mfW = 1.0;
+ }
+} // end of namespace basegfx
+
+// eof
diff --git a/basegfx/source/point/b3dpoint.cxx b/basegfx/source/point/b3dpoint.cxx
new file mode 100644
index 000000000000..8bc1f06f3356
--- /dev/null
+++ b/basegfx/source/point/b3dpoint.cxx
@@ -0,0 +1,85 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_basegfx.hxx"
+#include <basegfx/point/b3dpoint.hxx>
+#include <basegfx/matrix/b3dhommatrix.hxx>
+#include <basegfx/numeric/ftools.hxx>
+
+namespace basegfx
+{
+ B3DPoint& B3DPoint::operator*=( const ::basegfx::B3DHomMatrix& rMat )
+ {
+ double fTempX(
+ rMat.get(0, 0) * mfX +
+ rMat.get(0, 1) * mfY +
+ rMat.get(0, 2) * mfZ +
+ rMat.get(0, 3));
+ double fTempY(
+ rMat.get(1, 0) * mfX +
+ rMat.get(1, 1) * mfY +
+ rMat.get(1, 2) * mfZ +
+ rMat.get(1, 3));
+ double fTempZ(
+ rMat.get(2, 0) * mfX +
+ rMat.get(2, 1) * mfY +
+ rMat.get(2, 2) * mfZ +
+ rMat.get(2, 3));
+
+ if(!rMat.isLastLineDefault())
+ {
+ const double fOne(1.0);
+ const double fTempM(
+ rMat.get(3, 0) * mfX +
+ rMat.get(3, 1) * mfY +
+ rMat.get(3, 2) * mfZ +
+ rMat.get(3, 3));
+
+ if(!fTools::equalZero(fTempM) && !fTools::equal(fOne, fTempM))
+ {
+ fTempX /= fTempM;
+ fTempY /= fTempM;
+ fTempZ /= fTempM;
+ }
+ }
+
+ mfX = fTempX;
+ mfY = fTempY;
+ mfZ = fTempZ;
+
+ return *this;
+ }
+
+ B3DPoint operator*( const ::basegfx::B3DHomMatrix& rMat, const B3DPoint& rPoint )
+ {
+ B3DPoint aRes( rPoint );
+ return aRes *= rMat;
+ }
+} // end of namespace basegfx
+
+// eof
diff --git a/basegfx/source/point/b3ipoint.cxx b/basegfx/source/point/b3ipoint.cxx
new file mode 100644
index 000000000000..19bb25b8bf46
--- /dev/null
+++ b/basegfx/source/point/b3ipoint.cxx
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_basegfx.hxx"
+#include <basegfx/point/b3ipoint.hxx>
+#include <basegfx/matrix/b3dhommatrix.hxx>
+#include <basegfx/numeric/ftools.hxx>
+
+namespace basegfx
+{
+ B3IPoint& B3IPoint::operator*=( const ::basegfx::B3DHomMatrix& rMat )
+ {
+ double fTempX(
+ rMat.get(0, 0) * mnX +
+ rMat.get(0, 1) * mnY +
+ rMat.get(0, 2) * mnZ +
+ rMat.get(0, 3));
+ double fTempY(
+ rMat.get(1, 0) * mnX +
+ rMat.get(1, 1) * mnY +
+ rMat.get(1, 2) * mnZ +
+ rMat.get(1, 3));
+ double fTempZ(
+ rMat.get(2, 0) * mnX +
+ rMat.get(2, 1) * mnY +
+ rMat.get(2, 2) * mnZ +
+ rMat.get(2, 3));
+
+ if(!rMat.isLastLineDefault())
+ {
+ const double fOne(1.0);
+ const double fTempM(
+ rMat.get(3, 0) * mnX +
+ rMat.get(3, 1) * mnY +
+ rMat.get(3, 2) * mnZ +
+ rMat.get(3, 3));
+
+ if(!fTools::equalZero(fTempM) && !fTools::equal(fOne, fTempM))
+ {
+ fTempX /= fTempM;
+ fTempY /= fTempM;
+ fTempZ /= fTempM;
+ }
+ }
+
+ mnX = fround(fTempX);
+ mnY = fround(fTempY);
+ mnZ = fround(fTempZ);
+
+ return *this;
+ }
+} // end of namespace basegfx
+
+// eof
diff --git a/basegfx/source/point/makefile.mk b/basegfx/source/point/makefile.mk
new file mode 100644
index 000000000000..96798eb35cc9
--- /dev/null
+++ b/basegfx/source/point/makefile.mk
@@ -0,0 +1,52 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=..$/..
+PRJNAME=basegfx
+TARGET=point
+
+#UNOUCRRDB=$(SOLARBINDIR)$/applicat.rdb
+#ENABLE_EXCEPTIONS=FALSE
+#USE_DEFFILE=TRUE
+
+# --- Settings ----------------------------------
+
+.INCLUDE : settings.mk
+
+# --- Files -------------------------------------
+
+SLOFILES= \
+ $(SLO)$/b2dpoint.obj \
+ $(SLO)$/b2dhompoint.obj \
+ $(SLO)$/b3dpoint.obj \
+ $(SLO)$/b3dhompoint.obj \
+ $(SLO)$/b2ipoint.obj \
+ $(SLO)$/b3ipoint.obj
+
+# --- Targets ----------------------------------
+
+.INCLUDE : target.mk