///<summary>Map mesh *into* local coordinates of Frame </summary> public static void ToFrame(IDeformableMesh mesh, Frame3f f) { int NV = mesh.MaxVertexID; bool bHasNormals = mesh.HasVertexNormals; for (int vid = 0; vid < NV; ++vid) { if (mesh.IsVertex(vid)) { Vector3d v = mesh.GetVertex(vid); Vector3d vf = f.ToFrameP((Vector3f)v); mesh.SetVertex(vid, vf); if (bHasNormals) { Vector3f n = mesh.GetVertexNormal(vid); Vector3f nf = f.ToFrameV(n); mesh.SetVertexNormal(vid, nf); } } } }