Exemple #1
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 (vertexData)
            {
                lock (deformers)
                {
                    RemoveNullDeformers();

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

            NotifyPostModify();
        }
Exemple #2
0
        protected override void DeformVertexData()
        {
            lock (vertexData)
            {
                lock (deformers)
                {
                    RemoveNullDeformers();

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

            NotifyPostModify();
        }