summaryrefslogtreecommitdiff
path: root/basegfx/source/vector
diff options
context:
space:
mode:
authorArmin Weiss <aw@openoffice.org>2003-11-26 13:40:18 +0000
committerArmin Weiss <aw@openoffice.org>2003-11-26 13:40:18 +0000
commit56f2ab808ec8b0ce9aed1acd042123b87006ad60 (patch)
tree647130c86bd40c589a4a555ea24aac497ca7029a /basegfx/source/vector
parentc4068e1d9c41fb4a08498c6318684226076bc56c (diff)
Added support for B3DPolyPOlygon, moved BDRange from source/inc to range namespace and the directories
Diffstat (limited to 'basegfx/source/vector')
-rw-r--r--basegfx/source/vector/b3dvector.cxx26
1 files changed, 24 insertions, 2 deletions
diff --git a/basegfx/source/vector/b3dvector.cxx b/basegfx/source/vector/b3dvector.cxx
index 96c1ee387ae5..45c8b3d58fa8 100644
--- a/basegfx/source/vector/b3dvector.cxx
+++ b/basegfx/source/vector/b3dvector.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b3dvector.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: aw $ $Date: 2003-10-31 10:14:00 $
+ * last change: $Author: aw $ $Date: 2003-11-26 14:40:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -63,6 +63,10 @@
#include <basegfx/vector/b3dvector.hxx>
#endif
+#ifndef _BGFX_MATRIX_B3DHOMMATRIX_HXX
+#include <basegfx/matrix/b3dhommatrix.hxx>
+#endif
+
namespace basegfx
{
namespace vector
@@ -111,6 +115,24 @@ namespace basegfx
return aNew;
}
+
+ B3DVector& B3DVector::operator*=( const matrix::B3DHomMatrix& rMat )
+ {
+ const double fTempX( rMat.get(0,0)*mfX + rMat.get(0,1)*mfY + rMat.get(0,2)*mfZ );
+ const double fTempY( rMat.get(1,0)*mfX + rMat.get(1,1)*mfY + rMat.get(1,2)*mfZ );
+ const double fTempZ( rMat.get(2,0)*mfX + rMat.get(2,1)*mfY + rMat.get(2,2)*mfZ );
+ mfX = fTempX;
+ mfY = fTempY;
+ mfZ = fTempZ;
+
+ return *this;
+ }
+
+ B3DVector operator*( const matrix::B3DHomMatrix& rMat, const B3DVector& rVec )
+ {
+ B3DVector aRes( rVec );
+ return aRes*=rMat;
+ }
} // end of namespace vector
} // end of namespace basegfx