예제 #1
0
 public CopyLayerInstance(MeshVert _parent, MeshFace _element, int copyLayerId = -1)
 {
     parent         = _parent;
     element        = _element;
     offsetPosition = Vector3.zero;
     copyLayer      = CopyLayerManager.GetLayer(copyLayerId);
     copyLayer.Add(this);
 }
예제 #2
0
 public void RemoveInstance(CopyLayerInstance instance)
 {
     Instances.Remove(instance);
     if (Instances.Count == 0)
     {
         CopyLayerManager.RemoveLayer(this);
     }
 }
예제 #3
0
    public void CreateIteration(MeshFace startingFace)
    {
        Iterations.Clear();
        CopyLayerManager.GotoNextLayer();
        var iterator = new MeshIteration();

        iterator.Create(startingFace);
        Iterations.Add(iterator);
        AddIteration(iterator);
    }
예제 #4
0
    void AddIteration(MeshIteration previous)
    {
        CopyLayerManager.GotoNextLayer();
        var iterator = new MeshIteration();

        if (iterator.CreateFromIteration(previous))
        {
            Iterations.Add(iterator);
            AddIteration(iterator);
        }
    }
예제 #5
0
    public void Init(int meshIndex)
    {
        // Stop Previous Animation
        StopAllCoroutines();

        // Clear Data
        meshFilter.mesh.Clear();
        //initialTriIndex = -1;
        MeshVerts.Clear();
        MeshFaces.Clear();
        Vertices.Clear();
        Triangles.Clear();

        CopyLayerManager.ResetLayers();

        ConvertMesh(meshes[meshIndex]);

        //if (clearOnStart)
        //meshFilter.mesh.Clear();
    }
예제 #6
0
 public void ChangeCopyLayer(int copyLayerId = -1)
 {
     copyLayer.RemoveInstance(this);
     copyLayer = CopyLayerManager.GetLayer(copyLayerId);
     copyLayer.Add(this);
 }