Exemplo 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;
        }
Exemplo 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;
        }