Browse Source

Added = operator

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

+ 7 - 0
Source/Urho3D/Math/Polyhedron.h

@@ -69,6 +69,13 @@ public:
     /// Destruct.
     ~Polyhedron();
 
+    /// Assign from another polyhedron.
+    Polyhedron& operator =(const Polyhedron& rhs)
+    {
+        faces_ = rhs.faces_;
+        return *this;
+    }
+
     /// Define from a bounding box.
     void Define(const BoundingBox& box);
     /// Define from a frustum.