Esempio n. 1
0
        public Deformer(SculptMesh mesh)
        {
            this.mesh = mesh;

            int count = mesh.Points.Length;

            Selection      = new int[count];
            Weights        = new float[count];
            Deformation    = new Vector3[count];
            SelectionCount = 0;
        }
Esempio n. 2
0
        public void Awake()
        {
            if (sculptMeshReference == null || initialized)
            {
                return;
            }

            var mesh = IcoSphereCreator.Create(subdivisionLevel, radius);

            SculptMesh = new Modification.SculptMesh(this, mesh);
            sculptMeshReference.Mesh = SculptMesh.Mesh;

            initialized = true;
        }