/** \file Operations between a vector and a point \author Lukas Nellen \version $Id: OperationsPV.h 19124 2011-05-03 09:56:49Z javierg $ \date 25 Jul 2003 */ #ifndef _utl_OperationsPV_h_ #define _utl_OperationsPV_h_ static const char CVSId_utl_OperationsPV[] = "$Id: OperationsPV.h 19124 2011-05-03 09:56:49Z javierg $"; namespace utl { inline Point operator+(const Point& l, const Vector& r) { r.TransformTo(l.fCoordinateSystem); return Point(l.fVector + r.fVector, l.fCoordinateSystem); } inline Point operator+(const Vector& l, const Point& r) { r.TransformTo(l.fCoordinateSystem); return Point(l.fVector + r.fVector, l.fCoordinateSystem); } inline Point operator-(const Point& l, const Vector& r) { r.TransformTo(l.fCoordinateSystem); return Point(l.fVector - r.fVector, l.fCoordinateSystem); } inline Vector operator-(const Point& l, const Point& r) { r.TransformTo(l.fCoordinateSystem); return Vector(l.fVector - r.fVector, l.fCoordinateSystem); } inline Point& operator+=(Point& p, const Vector& v) { v.TransformTo(p.fCoordinateSystem); p.fVector += v.fVector; return p; } inline Point& operator-=(Point& p, const Vector& v) { v.TransformTo(p.fCoordinateSystem); p.fVector -= v.fVector; return p; } } // utl #endif // _utl_OperationsPV_h_ // Configure (x)emacs for this file ... // Local Variables: // mode:c++ // compile-command: "make -C .. -k" // End: