Skip to content

Commit

Permalink
[mvsData] Point3d: more operators
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiencastan committed Feb 18, 2021
1 parent 78cc47d commit e6ef322
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/aliceVision/mvsData/Point3d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,30 @@ class Point3d
return *this;
}

inline Point3d& operator+=(const Point3d& _p)
{
x += _p.x;
y += _p.y;
z += _p.z;
return *this;
}

inline Point3d& operator/=(const Point3d& _p)
{
x /= _p.x;
y /= _p.y;
z /= _p.z;
return *this;
}

inline Point3d& operator/=(double v)
{
x /= v;
y /= v;
z /= v;
return *this;
}

inline bool operator==(const Point3d& param)
{
return (x == param.x) && (y == param.y) && (z == param.z);
Expand Down

0 comments on commit e6ef322

Please sign in to comment.