1ce9c7ef7SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3ce9c7ef7SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4ce9c7ef7SAndrew Rist * or more contributor license agreements. See the NOTICE file 5ce9c7ef7SAndrew Rist * distributed with this work for additional information 6ce9c7ef7SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7ce9c7ef7SAndrew Rist * to you under the Apache License, Version 2.0 (the 8ce9c7ef7SAndrew Rist * "License"); you may not use this file except in compliance 9ce9c7ef7SAndrew Rist * with the License. You may obtain a copy of the License at 10ce9c7ef7SAndrew Rist * 11ce9c7ef7SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12ce9c7ef7SAndrew Rist * 13ce9c7ef7SAndrew Rist * Unless required by applicable law or agreed to in writing, 14ce9c7ef7SAndrew Rist * software distributed under the License is distributed on an 15ce9c7ef7SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16ce9c7ef7SAndrew Rist * KIND, either express or implied. See the License for the 17ce9c7ef7SAndrew Rist * specific language governing permissions and limitations 18ce9c7ef7SAndrew Rist * under the License. 19ce9c7ef7SAndrew Rist * 20ce9c7ef7SAndrew Rist *************************************************************/ 21ce9c7ef7SAndrew Rist 22ce9c7ef7SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _BGFX_POINT_B2DHOMPOINT_HXX 25cdf0e10cSrcweir #define _BGFX_POINT_B2DHOMPOINT_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <basegfx/point/b2dpoint.hxx> 28cdf0e10cSrcweir 29cdf0e10cSrcweir namespace basegfx 30cdf0e10cSrcweir { 31cdf0e10cSrcweir /** Basic homogen Point class with two double values and one homogen factor 32cdf0e10cSrcweir 33cdf0e10cSrcweir This class provides access to homogen coordinates in 2D. 34cdf0e10cSrcweir For this purpose all the operators which need to do specific 35cdf0e10cSrcweir action due to their homogenity are implemented here. 36cdf0e10cSrcweir The only caveat are member methods which are declared as const 37cdf0e10cSrcweir but do change the content. These are documented for that reason. 38cdf0e10cSrcweir The class is designed to provide homogenous coordinates without 39cdf0e10cSrcweir direct access to the homogen part (mfW). This is also the reason 40cdf0e10cSrcweir for leaving out the [] operators which return references to members. 41cdf0e10cSrcweir 42cdf0e10cSrcweir @see B2DTuple 43cdf0e10cSrcweir */ 44cdf0e10cSrcweir class B2DHomPoint 45cdf0e10cSrcweir { 46cdf0e10cSrcweir protected: 47cdf0e10cSrcweir /// This member contains the coordinate part of the point 48cdf0e10cSrcweir ::basegfx::B2DTuple maTuple; 49cdf0e10cSrcweir 50cdf0e10cSrcweir /// This Member holds the homogenous part of the point 51*7024eca9SArmin Le Grand double mfW; 52cdf0e10cSrcweir 53cdf0e10cSrcweir /** Test if this homogen point does have a homogenous part 54cdf0e10cSrcweir 55cdf0e10cSrcweir @return Returns true if this point has no homogenous part 56cdf0e10cSrcweir */ implIsHomogenized() const57*7024eca9SArmin Le Grand inline bool implIsHomogenized() const 58*7024eca9SArmin Le Grand { 59*7024eca9SArmin Le Grand const double fOne(1.0); 60*7024eca9SArmin Le Grand return ::basegfx::fTools::equal(fOne, mfW); 61*7024eca9SArmin Le Grand } 62cdf0e10cSrcweir 63cdf0e10cSrcweir /** Remove homogenous part of this Point 64cdf0e10cSrcweir 65cdf0e10cSrcweir This method does necessary calculations to remove 66cdf0e10cSrcweir the evtl. homogenous part of this Point. This may 67cdf0e10cSrcweir change all members. 68cdf0e10cSrcweir */ 69cdf0e10cSrcweir void implHomogenize(); 70cdf0e10cSrcweir 71cdf0e10cSrcweir /** Test and on demand remove homogenous part 72cdf0e10cSrcweir 73cdf0e10cSrcweir This method tests if this Point does have a homogenous part 74cdf0e10cSrcweir and then evtl. takes actions to remove that part. 75cdf0e10cSrcweir 76cdf0e10cSrcweir @attention Even when this method is const it may change all 77cdf0e10cSrcweir members of this instance. This is due to the fact that changing 78cdf0e10cSrcweir the homogenous part of a homogenous point does from a mathematical 79cdf0e10cSrcweir point of view not change the point at all. 80cdf0e10cSrcweir */ implTestAndHomogenize() const81*7024eca9SArmin Le Grand inline void implTestAndHomogenize() const 82*7024eca9SArmin Le Grand { 83*7024eca9SArmin Le Grand if(!implIsHomogenized()) 84*7024eca9SArmin Le Grand ((B2DHomPoint*)this)->implHomogenize(); 85*7024eca9SArmin Le Grand } 86cdf0e10cSrcweir 87cdf0e10cSrcweir public: 88cdf0e10cSrcweir /** Create a homogen point 89cdf0e10cSrcweir 90cdf0e10cSrcweir The point is initialized to (0.0, 0.0) 91cdf0e10cSrcweir */ B2DHomPoint()92cdf0e10cSrcweir B2DHomPoint() 93cdf0e10cSrcweir : maTuple(), 94cdf0e10cSrcweir mfW(1.0) 95cdf0e10cSrcweir {} 96cdf0e10cSrcweir 97cdf0e10cSrcweir /** Create a homogen point 98cdf0e10cSrcweir 99cdf0e10cSrcweir @param fX 100cdf0e10cSrcweir This parameter is used to initialize the X-coordinate 101cdf0e10cSrcweir of the Point. The homogenous part is initialized to 1.0. 102cdf0e10cSrcweir 103cdf0e10cSrcweir @param fY 104cdf0e10cSrcweir This parameter is used to initialize the Y-coordinate 105cdf0e10cSrcweir of the Point. The homogenous part is initialized to 1.0. 106cdf0e10cSrcweir */ B2DHomPoint(double fX,double fY)107cdf0e10cSrcweir B2DHomPoint(double fX, double fY) 108cdf0e10cSrcweir : maTuple(fX, fY), 109cdf0e10cSrcweir mfW(1.0) 110cdf0e10cSrcweir {} 111cdf0e10cSrcweir 112cdf0e10cSrcweir /** Create a copy of a 2D Point 113cdf0e10cSrcweir 114cdf0e10cSrcweir @param rVec 115cdf0e10cSrcweir The 2D point which will be copied. The homogenous part 116cdf0e10cSrcweir is initialized to 1.0. 117cdf0e10cSrcweir */ B2DHomPoint(const B2DPoint & rVec)118cdf0e10cSrcweir B2DHomPoint(const B2DPoint& rVec) 119cdf0e10cSrcweir : maTuple(rVec), 120cdf0e10cSrcweir mfW(1.0) 121cdf0e10cSrcweir {} 122cdf0e10cSrcweir 123cdf0e10cSrcweir /** Create a copy of a homogen point 124cdf0e10cSrcweir 125cdf0e10cSrcweir @param rVec 126cdf0e10cSrcweir The homogen point which will be copied. The homogenous part 127cdf0e10cSrcweir is copied, too. 128cdf0e10cSrcweir */ B2DHomPoint(const B2DHomPoint & rVec)129cdf0e10cSrcweir B2DHomPoint(const B2DHomPoint& rVec) 130cdf0e10cSrcweir : maTuple(rVec.maTuple.getX(), rVec.maTuple.getY()), 131cdf0e10cSrcweir mfW(rVec.mfW) 132cdf0e10cSrcweir {} 133cdf0e10cSrcweir ~B2DHomPoint()134cdf0e10cSrcweir ~B2DHomPoint() 135cdf0e10cSrcweir {} 136cdf0e10cSrcweir 137cdf0e10cSrcweir /** Get a 2D point from this homogenous point 138cdf0e10cSrcweir 139cdf0e10cSrcweir This method normalizes this homogen point if necessary and 140cdf0e10cSrcweir returns the corresponding 2D point for this homogen point. 141cdf0e10cSrcweir 142cdf0e10cSrcweir @attention Even when this method is const it may change all 143cdf0e10cSrcweir members of this instance. 144cdf0e10cSrcweir */ getB2DPoint() const145*7024eca9SArmin Le Grand inline B2DPoint getB2DPoint() const 146*7024eca9SArmin Le Grand { 147*7024eca9SArmin Le Grand implTestAndHomogenize(); 148*7024eca9SArmin Le Grand return B2DPoint(maTuple.getX(), maTuple.getY()); 149*7024eca9SArmin Le Grand } 150cdf0e10cSrcweir 151cdf0e10cSrcweir /** Get X-coordinate 152cdf0e10cSrcweir 153cdf0e10cSrcweir This method normalizes this homogen point if necessary and 154cdf0e10cSrcweir returns the corresponding X-coordinate for this homogen point. 155cdf0e10cSrcweir 156cdf0e10cSrcweir @attention Even when this method is const it may change all 157cdf0e10cSrcweir members of this instance. 158cdf0e10cSrcweir */ getX() const159*7024eca9SArmin Le Grand inline double getX() const 160*7024eca9SArmin Le Grand { 161*7024eca9SArmin Le Grand implTestAndHomogenize(); 162*7024eca9SArmin Le Grand return maTuple.getX(); 163*7024eca9SArmin Le Grand } 164cdf0e10cSrcweir 165cdf0e10cSrcweir /** Get Y-coordinate 166cdf0e10cSrcweir 167cdf0e10cSrcweir This method normalizes this homogen point if necessary and 168cdf0e10cSrcweir returns the corresponding Y-coordinate for this homogen point. 169cdf0e10cSrcweir 170cdf0e10cSrcweir @attention Even when this method is const it may change all 171cdf0e10cSrcweir members of this instance. 172cdf0e10cSrcweir */ getY() const173*7024eca9SArmin Le Grand inline double getY() const 174*7024eca9SArmin Le Grand { 175*7024eca9SArmin Le Grand implTestAndHomogenize(); 176*7024eca9SArmin Le Grand return maTuple.getY(); 177*7024eca9SArmin Le Grand } 178cdf0e10cSrcweir 179cdf0e10cSrcweir /** Set X-coordinate of the homogen point. 180cdf0e10cSrcweir 181cdf0e10cSrcweir This method sets the X-coordinate of the homogen point. If 182cdf0e10cSrcweir the point does have a homogenous part this is taken into account. 183cdf0e10cSrcweir 184cdf0e10cSrcweir @param fX 185cdf0e10cSrcweir The to-be-set X-coordinate without homogenous part. 186cdf0e10cSrcweir */ setX(double fX)187*7024eca9SArmin Le Grand inline void setX(double fX) 188*7024eca9SArmin Le Grand { 189*7024eca9SArmin Le Grand maTuple.setX(implIsHomogenized() ? fX : fX * mfW ); 190*7024eca9SArmin Le Grand } 191cdf0e10cSrcweir 192cdf0e10cSrcweir /** Set Y-coordinate of the homogen point. 193cdf0e10cSrcweir 194cdf0e10cSrcweir This method sets the Y-coordinate of the homogen point. If 195cdf0e10cSrcweir the point does have a homogenous part this is taken into account. 196cdf0e10cSrcweir 197cdf0e10cSrcweir @param fY 198cdf0e10cSrcweir The to-be-set Y-coordinate without homogenous part. 199cdf0e10cSrcweir */ setY(double fY)200*7024eca9SArmin Le Grand inline void setY(double fY) 201*7024eca9SArmin Le Grand { 202*7024eca9SArmin Le Grand maTuple.setY(implIsHomogenized() ? fY : fY * mfW ); 203*7024eca9SArmin Le Grand } 204cdf0e10cSrcweir 205cdf0e10cSrcweir // operators 206cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////// 207cdf0e10cSrcweir operator +=(const B2DHomPoint & rPnt)208*7024eca9SArmin Le Grand inline B2DHomPoint& operator+=( const B2DHomPoint& rPnt ) 209*7024eca9SArmin Le Grand { 210*7024eca9SArmin Le Grand maTuple.setX(getX() * rPnt.mfW + rPnt.getX() * mfW); 211*7024eca9SArmin Le Grand maTuple.setY(getY() * rPnt.mfW + rPnt.getY() * mfW); 212*7024eca9SArmin Le Grand mfW = mfW * rPnt.mfW; 213cdf0e10cSrcweir 214*7024eca9SArmin Le Grand return *this; 215*7024eca9SArmin Le Grand } 216*7024eca9SArmin Le Grand operator -=(const B2DHomPoint & rPnt)217*7024eca9SArmin Le Grand inline B2DHomPoint& operator-=( const B2DHomPoint& rPnt ) 218*7024eca9SArmin Le Grand { 219*7024eca9SArmin Le Grand maTuple.setX(getX() * rPnt.mfW - rPnt.getX() * mfW); 220*7024eca9SArmin Le Grand maTuple.setY(getY() * rPnt.mfW - rPnt.getY() * mfW); 221*7024eca9SArmin Le Grand mfW = mfW * rPnt.mfW; 222*7024eca9SArmin Le Grand 223*7024eca9SArmin Le Grand return *this; 224*7024eca9SArmin Le Grand } 225cdf0e10cSrcweir operator *=(double t)226*7024eca9SArmin Le Grand inline B2DHomPoint& operator*=(double t) 227*7024eca9SArmin Le Grand { 228*7024eca9SArmin Le Grand if(!::basegfx::fTools::equalZero(t)) 229*7024eca9SArmin Le Grand { 230*7024eca9SArmin Le Grand mfW /= t; 231*7024eca9SArmin Le Grand } 232cdf0e10cSrcweir 233*7024eca9SArmin Le Grand return *this; 234*7024eca9SArmin Le Grand } 235cdf0e10cSrcweir 236*7024eca9SArmin Le Grand B2DHomPoint& operator*=( const B2DHomMatrix& rMat ); 237cdf0e10cSrcweir operator /=(double t)238*7024eca9SArmin Le Grand inline B2DHomPoint& operator/=(double t) 239*7024eca9SArmin Le Grand { 240*7024eca9SArmin Le Grand mfW *= t; 241*7024eca9SArmin Le Grand return *this; 242*7024eca9SArmin Le Grand } 243*7024eca9SArmin Le Grand operator -(void)244*7024eca9SArmin Le Grand inline B2DHomPoint& operator-(void) 245*7024eca9SArmin Le Grand { 246*7024eca9SArmin Le Grand mfW = -mfW; 247*7024eca9SArmin Le Grand return *this; 248*7024eca9SArmin Le Grand } 249cdf0e10cSrcweir operator ==(const B2DHomPoint & rPnt) const250*7024eca9SArmin Le Grand inline bool operator==( const B2DHomPoint& rPnt ) const 251*7024eca9SArmin Le Grand { 252*7024eca9SArmin Le Grand implTestAndHomogenize(); 253*7024eca9SArmin Le Grand return (maTuple == rPnt.maTuple); 254*7024eca9SArmin Le Grand } 255*7024eca9SArmin Le Grand operator !=(const B2DHomPoint & rPnt) const256*7024eca9SArmin Le Grand inline bool operator!=( const B2DHomPoint& rPnt ) const 257*7024eca9SArmin Le Grand { 258*7024eca9SArmin Le Grand implTestAndHomogenize(); 259*7024eca9SArmin Le Grand return (maTuple != rPnt.maTuple); 260*7024eca9SArmin Le Grand } 261cdf0e10cSrcweir operator =(const B2DHomPoint & rPnt)262*7024eca9SArmin Le Grand inline B2DHomPoint& operator=( const B2DHomPoint& rPnt ) 263*7024eca9SArmin Le Grand { 264*7024eca9SArmin Le Grand maTuple = rPnt.maTuple; 265*7024eca9SArmin Le Grand mfW = rPnt.mfW; 266*7024eca9SArmin Le Grand return *this; 267*7024eca9SArmin Le Grand } 268cdf0e10cSrcweir }; 269cdf0e10cSrcweir 270cdf0e10cSrcweir // external operators 271cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////// 272cdf0e10cSrcweir minimum(const B2DHomPoint & rVecA,const B2DHomPoint & rVecB)273*7024eca9SArmin Le Grand inline B2DHomPoint minimum(const B2DHomPoint& rVecA, const B2DHomPoint& rVecB) 274*7024eca9SArmin Le Grand { 275*7024eca9SArmin Le Grand return B2DHomPoint( // getX()/getY() homogenizes already 276*7024eca9SArmin Le Grand std::min(rVecB.getX(), rVecA.getX()), 277*7024eca9SArmin Le Grand std::min(rVecB.getY(), rVecA.getY())); 278*7024eca9SArmin Le Grand } 279*7024eca9SArmin Le Grand maximum(const B2DHomPoint & rVecA,const B2DHomPoint & rVecB)280*7024eca9SArmin Le Grand inline B2DHomPoint maximum(const B2DHomPoint& rVecA, const B2DHomPoint& rVecB) 281*7024eca9SArmin Le Grand { 282*7024eca9SArmin Le Grand return B2DHomPoint( // getX()/getY() homogenizes already 283*7024eca9SArmin Le Grand std::max(rVecB.getX(), rVecA.getX()), 284*7024eca9SArmin Le Grand std::max(rVecB.getY(), rVecA.getY())); 285*7024eca9SArmin Le Grand } 286*7024eca9SArmin Le Grand absolute(const B2DHomPoint & rVec)287*7024eca9SArmin Le Grand inline B2DHomPoint absolute(const B2DHomPoint& rVec) 288*7024eca9SArmin Le Grand { 289*7024eca9SArmin Le Grand return B2DHomPoint( // getX()/getY() homogenizes already 290*7024eca9SArmin Le Grand fabs(rVec.getX()), 291*7024eca9SArmin Le Grand fabs(rVec.getY())); 292*7024eca9SArmin Le Grand } 293*7024eca9SArmin Le Grand interpolate(B2DHomPoint & rOld1,B2DHomPoint & rOld2,double t)294*7024eca9SArmin Le Grand inline B2DHomPoint interpolate(B2DHomPoint& rOld1, B2DHomPoint& rOld2, double t) 295*7024eca9SArmin Le Grand { 296*7024eca9SArmin Le Grand if(0.0 >= t) 297*7024eca9SArmin Le Grand { 298*7024eca9SArmin Le Grand return rOld1; 299*7024eca9SArmin Le Grand } 300*7024eca9SArmin Le Grand else if(1.0 <= t) 301*7024eca9SArmin Le Grand { 302*7024eca9SArmin Le Grand return rOld2; 303*7024eca9SArmin Le Grand } 304*7024eca9SArmin Le Grand else if(rOld1 == rOld2) // this call homogenizes already 305*7024eca9SArmin Le Grand { 306*7024eca9SArmin Le Grand return rOld1; 307*7024eca9SArmin Le Grand } 308*7024eca9SArmin Le Grand else 309*7024eca9SArmin Le Grand { 310*7024eca9SArmin Le Grand return B2DHomPoint( 311*7024eca9SArmin Le Grand ((rOld2.getX() - rOld1.getX()) * t) + rOld1.getX(), 312*7024eca9SArmin Le Grand ((rOld2.getY() - rOld1.getY()) * t) + rOld1.getY()); 313*7024eca9SArmin Le Grand } 314*7024eca9SArmin Le Grand } 315*7024eca9SArmin Le Grand average(B2DHomPoint & rOld1,B2DHomPoint & rOld2)316*7024eca9SArmin Le Grand inline B2DHomPoint average(B2DHomPoint& rOld1, B2DHomPoint& rOld2) 317*7024eca9SArmin Le Grand { 318*7024eca9SArmin Le Grand return B2DHomPoint( // getX()/ getY() homogenizes already 319*7024eca9SArmin Le Grand rOld1.getX() == rOld2.getX() ? rOld1.getX() : (rOld1.getX() + rOld2.getX()) * 0.5, 320*7024eca9SArmin Le Grand rOld1.getY() == rOld2.getY() ? rOld1.getY() : (rOld1.getY() + rOld2.getY()) * 0.5); 321*7024eca9SArmin Le Grand } 322cdf0e10cSrcweir average(B2DHomPoint & rOld1,B2DHomPoint & rOld2,B2DHomPoint & rOld3)323*7024eca9SArmin Le Grand inline B2DHomPoint average(B2DHomPoint& rOld1, B2DHomPoint& rOld2, B2DHomPoint& rOld3) 324*7024eca9SArmin Le Grand { 325*7024eca9SArmin Le Grand return B2DHomPoint( // getX()/ getY() homogenizes already 326*7024eca9SArmin Le Grand (rOld1.getX() == rOld2.getX() && rOld2.getX() == rOld3.getX()) ? rOld1.getX() : (rOld1.getX() + rOld2.getX() + rOld3.getX()) * (1.0 / 3.0), 327*7024eca9SArmin Le Grand (rOld1.getY() == rOld2.getY() && rOld2.getY() == rOld3.getY()) ? rOld1.getY() : (rOld1.getY() + rOld2.getY() + rOld3.getY()) * (1.0 / 3.0)); 328*7024eca9SArmin Le Grand } 329*7024eca9SArmin Le Grand operator +(const B2DHomPoint & rVecA,const B2DHomPoint & rVecB)330*7024eca9SArmin Le Grand inline B2DHomPoint operator+(const B2DHomPoint& rVecA, const B2DHomPoint& rVecB) 331*7024eca9SArmin Le Grand { 332*7024eca9SArmin Le Grand B2DHomPoint aSum(rVecA); 333*7024eca9SArmin Le Grand aSum += rVecB; 334*7024eca9SArmin Le Grand return aSum; 335*7024eca9SArmin Le Grand } 336*7024eca9SArmin Le Grand operator -(const B2DHomPoint & rVecA,const B2DHomPoint & rVecB)337*7024eca9SArmin Le Grand inline B2DHomPoint operator-(const B2DHomPoint& rVecA, const B2DHomPoint& rVecB) 338*7024eca9SArmin Le Grand { 339*7024eca9SArmin Le Grand B2DHomPoint aSub(rVecA); 340*7024eca9SArmin Le Grand aSub -= rVecB; 341*7024eca9SArmin Le Grand return aSub; 342*7024eca9SArmin Le Grand } 343*7024eca9SArmin Le Grand operator *(const B2DHomPoint & rVec,double t)344*7024eca9SArmin Le Grand inline B2DHomPoint operator*(const B2DHomPoint& rVec, double t) 345*7024eca9SArmin Le Grand { 346*7024eca9SArmin Le Grand B2DHomPoint aNew(rVec); 347*7024eca9SArmin Le Grand aNew *= t; 348*7024eca9SArmin Le Grand return aNew; 349*7024eca9SArmin Le Grand } 350*7024eca9SArmin Le Grand operator *(double t,const B2DHomPoint & rVec)351*7024eca9SArmin Le Grand inline B2DHomPoint operator*(double t, const B2DHomPoint& rVec) 352*7024eca9SArmin Le Grand { 353*7024eca9SArmin Le Grand B2DHomPoint aNew(rVec); 354*7024eca9SArmin Le Grand aNew *= t; 355*7024eca9SArmin Le Grand return aNew; 356*7024eca9SArmin Le Grand } 357*7024eca9SArmin Le Grand operator *(const B2DHomMatrix & rMat,const B2DHomPoint & rPoint)358*7024eca9SArmin Le Grand inline B2DHomPoint operator*( const B2DHomMatrix& rMat, const B2DHomPoint& rPoint ) 359*7024eca9SArmin Le Grand { 360*7024eca9SArmin Le Grand B2DHomPoint aNew(rPoint); 361*7024eca9SArmin Le Grand return aNew*=rMat; 362*7024eca9SArmin Le Grand } 363*7024eca9SArmin Le Grand operator /(const B2DHomPoint & rVec,double t)364*7024eca9SArmin Le Grand inline B2DHomPoint operator/(const B2DHomPoint& rVec, double t) 365*7024eca9SArmin Le Grand { 366*7024eca9SArmin Le Grand B2DHomPoint aNew(rVec); 367*7024eca9SArmin Le Grand aNew /= t; 368*7024eca9SArmin Le Grand return aNew; 369*7024eca9SArmin Le Grand } 370*7024eca9SArmin Le Grand operator /(double t,const B2DHomPoint & rVec)371*7024eca9SArmin Le Grand inline B2DHomPoint operator/(double t, const B2DHomPoint& rVec) 372*7024eca9SArmin Le Grand { 373*7024eca9SArmin Le Grand B2DHomPoint aNew(rVec); 374*7024eca9SArmin Le Grand aNew /= t; 375*7024eca9SArmin Le Grand return aNew; 376*7024eca9SArmin Le Grand } 377cdf0e10cSrcweir } // end of namespace basegfx 378cdf0e10cSrcweir 379cdf0e10cSrcweir #endif /* _BGFX_POINT_B2DHOMPOINT_HXX */ 380