title: Mesh using Eigen: MatrixX3f or std::vector<Vector3f>?
body: <p>I'm using the <a href="http://eigen.tuxfamily.org" rel="nofollow">Eigen</a> library in a computer graphics project with meshes that will change often.</p>
  
  <p>What are the performance implications of using a dynamic Eigen Matrix for all the vertex positions, normals, etc? </p>
  
  <p>Should I use:</p>
  
  <pre><code>Eigen::Matrix&lt;float, Eigen::Dynamic, 3, Eigen::RowMajor&gt; vertices;
  </code></pre>
  
  <p>or </p>
  
  <pre><code>std::vector&lt;Eigen::Vector3f&gt; vertices;
  </code></pre>
  
  <p>I will have to copy the mesh data to GPU after every change, but as I understand it, I can do this with memcpy efficiently with both representations.</p>