Browse Source

Added = operator

Added assign operator since there is a copy constructor. (More consistent)
cosmy1 10 years ago
parent
commit
258afe775b
1 changed files with 9 additions and 0 deletions
  1. 9 0
      Source/Urho3D/Math/Plane.h

+ 9 - 0
Source/Urho3D/Math/Plane.h

@@ -63,6 +63,15 @@ public:
         Define(plane);
     }
 
+    /// Assign from another plane.
+    Plane& operator =(const Plane& rhs)
+    {
+        normal_ = rhs.normal_;
+        absNormal_ = rhs.absNormal_;
+        d_ = rhs.d_;
+        return *this;
+    }
+
     /// Define from 3 vertices.
     void Define(const Vector3& v0, const Vector3& v1, const Vector3& v2)
     {