summaryrefslogtreecommitdiff
path: root/basegfx/inc/basegfx/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/inc/basegfx/vector
parentc4068e1d9c41fb4a08498c6318684226076bc56c (diff)
Added support for B3DPolyPOlygon, moved BDRange from source/inc to range namespace and the directories
Diffstat (limited to 'basegfx/inc/basegfx/vector')
-rw-r--r--basegfx/inc/basegfx/vector/b2dvector.hxx22
-rw-r--r--basegfx/inc/basegfx/vector/b3dvector.hxx44
2 files changed, 62 insertions, 4 deletions
diff --git a/basegfx/inc/basegfx/vector/b2dvector.hxx b/basegfx/inc/basegfx/vector/b2dvector.hxx
index 0a3a896733a0..f35c38bb3236 100644
--- a/basegfx/inc/basegfx/vector/b2dvector.hxx
+++ b/basegfx/inc/basegfx/vector/b2dvector.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b2dvector.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: thb $ $Date: 2003-11-12 12:09:51 $
+ * last change: $Author: aw $ $Date: 2003-11-26 14:40:05 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -158,6 +158,24 @@ namespace basegfx
~B2DVector()
{}
+ /** *=operator to allow usage from B2DVector, too
+ */
+ B2DVector& operator*=( const B2DVector& rPnt )
+ {
+ mfX *= rPnt.mfX;
+ mfY *= rPnt.mfY;
+ return *this;
+ }
+
+ /** *=operator to allow usage from B2DVector, too
+ */
+ B2DVector& operator*=(double t)
+ {
+ mfX *= t;
+ mfY *= t;
+ return *this;
+ }
+
/** assignment operator to allow assigning the results
of B2DTuple calculations
*/
diff --git a/basegfx/inc/basegfx/vector/b3dvector.hxx b/basegfx/inc/basegfx/vector/b3dvector.hxx
index bd118592ec96..855abb7f71e8 100644
--- a/basegfx/inc/basegfx/vector/b3dvector.hxx
+++ b/basegfx/inc/basegfx/vector/b3dvector.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b3dvector.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: aw $ $Date: 2003-11-06 16:30:26 $
+ * last change: $Author: aw $ $Date: 2003-11-26 14:40:05 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -68,6 +68,12 @@
namespace basegfx
{
+ namespace matrix
+ {
+ // predeclaration
+ class B3DHomMatrix;
+ } // end of namespace matrix;
+
namespace vector
{
/** Base Point class with three double values
@@ -128,6 +134,26 @@ namespace basegfx
~B3DVector()
{}
+ /** *=operator to allow usage from B3DVector, too
+ */
+ B3DVector& operator*=( const B3DVector& rPnt )
+ {
+ mfX *= rPnt.mfX;
+ mfY *= rPnt.mfY;
+ mfZ *= rPnt.mfZ;
+ return *this;
+ }
+
+ /** *=operator to allow usage from B3DVector, too
+ */
+ B3DVector& operator*=(double t)
+ {
+ mfX *= t;
+ mfY *= t;
+ mfZ *= t;
+ return *this;
+ }
+
/** assignment operator to allow assigning the results
of B3DTuple calculations
*/
@@ -275,6 +301,13 @@ namespace basegfx
return ((mfX * rVec.mfX) + (mfY * rVec.mfY) + (mfZ * rVec.mfZ));
}
+ /** Transform vector by given transformation matrix.
+
+ Since this is a vector, translational components of the
+ matrix are disregarded.
+ */
+ B3DVector& operator*=( const matrix::B3DHomMatrix& rMat );
+
static const B3DVector& getEmptyVector()
{
return (const B3DVector&) ::basegfx::tuple::B3DTuple::getEmptyTuple();
@@ -301,6 +334,13 @@ namespace basegfx
return aPerpendicular;
}
+ /** Transform vector by given transformation matrix.
+
+ Since this is a vector, translational components of the
+ matrix are disregarded.
+ */
+ B3DVector operator*( const matrix::B3DHomMatrix& rMat, const B3DVector& rVec );
+
/** Calculate the Cross Product of two 3D Vectors
@param rVecA