Ejemplo n.º 1
0
 public void SaveColored()
 {
     if (isImported)
     {
         originalMesh.Copy(mesh);
     }
 }
        protected override void Recompute(DGArguments args)
        {
            OffsetMesh.Copy(CachedValue <DMesh3>(0, args));
            double dist = CachedValue <double>(1, args);

            if (!OffsetMesh.HasVertexNormals)
            {
                MeshNormals.QuickCompute(OffsetMesh);
            }

            foreach (int vid in OffsetMesh.VertexIndices())
            {
                Vector3d v = OffsetMesh.GetVertex(vid);
                Vector3d n = OffsetMesh.GetVertexNormal(vid);
                v += dist * n;
                OffsetMesh.SetVertex(vid, v);
            }
        }