Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

M_Replace for C_Polygon

  • Loading branch information...
commit 287d1125e5a6a3020a91e4cae1034eb58b94b665 1 parent 30aedcf
@Detegr authored
Showing with 7 additions and 0 deletions.
  1. +6 −0 polygon.cpp
  2. +1 −0  polygon.h
View
6 polygon.cpp
@@ -65,3 +65,9 @@ void C_Polygon::M_Reverse()
{
std::reverse(m_Verts.begin(), m_Verts.end());
}
+
+void C_Polygon::M_Replace(int index, const std::vector<C_Vertex>& vec)
+{
+ m_Verts.erase(m_Verts.begin()+index);
+ m_Verts.insert(m_Verts.begin()+index, vec.begin(), vec.end());
+}
View
1  polygon.h
@@ -32,4 +32,5 @@ class C_Polygon
std::pair<QStandardItem*, QStandardItem*> M_GetItems(const C_Vertex& v) const;
void M_Reverse();
int M_Size() const { return m_Verts.size(); }
+ void M_Replace(int index, const std::vector<C_Vertex>& vec);
};
Please sign in to comment.
Something went wrong with that request. Please try again.