Exemplo n.º 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);
 }
Exemplo n.º 2
0
 public void RemoveInstance(CopyLayerInstance instance)
 {
     Instances.Remove(instance);
     if (Instances.Count == 0)
     {
         CopyLayerManager.RemoveLayer(this);
     }
 }
Exemplo n.º 3
0
    public void CreateIteration(MeshFace startingFace)
    {
        Iterations.Clear();
        CopyLayerManager.GotoNextLayer();
        var iterator = new MeshIteration();

        iterator.Create(startingFace);
        Iterations.Add(iterator);
        AddIteration(iterator);
    }
Exemplo n.º 4
0
    void AddIteration(MeshIteration previous)
    {
        CopyLayerManager.GotoNextLayer();
        var iterator = new MeshIteration();

        if (iterator.CreateFromIteration(previous))
        {
            Iterations.Add(iterator);
            AddIteration(iterator);
        }
    }
Exemplo n.º 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();
    }
Exemplo n.º 6
0
 public void ChangeCopyLayer(int copyLayerId = -1)
 {
     copyLayer.RemoveInstance(this);
     copyLayer = CopyLayerManager.GetLayer(copyLayerId);
     copyLayer.Add(this);
 }