Пример #1
0
 /// <summary>
 /// Sets the position of each vertex to it's base position.
 /// </summary>
 protected void ResetVertexData()
 {
     MeshDataUtil.ResetVertexData(meshData);
 }
Пример #2
0
        protected override void DeformVertexData()
        {
            // I'm not threading savvy, but I have a hunch that using all these locks isn't the ideal solution.
            lock (deformers)
            {
                RemoveNullDeformers();

                for (var deformerIndex = 0; deformerIndex < deformers.Count; deformerIndex++)
                {
                    lock (deformers[deformerIndex])
                    {
                        if (deformers[deformerIndex].update)
                        {
                            meshData = deformers[deformerIndex].Modify(meshData, SyncedTransform, MeshDataUtil.GetBounds(meshData));
                        }
                    }
                }
            }

            NotifyPostModify();
        }
Пример #3
0
 /// <summary>
 /// Sets vertexData to the vertexData of the original mesh.
 /// </summary>
 public void RecreateVertexData()
 {
     meshData = MeshDataUtil.GetMeshData(originalMesh);
 }