Ejemplo n.º 1
0
    protected override void Grab(Vector3 position)
    {
        if (VertexOffsets != null)
        {
            VertexOffsets.Clear();
        }
        else
        {
            VertexOffsets = new Dictionary <MeshEditor.VertexGroup, Vector3>();
        }
        if (HeldFaces != null)
        {
            HeldFaces.Clear();
        }
        else
        {
            HeldFaces = new List <MeshEditor.Face>();
        }

        foreach (var e in FindObjectOfType <SelectionTool>().Selection)
        {
            if (e is MeshEditor.Face)
            {
                foreach (var g in e.Editor.ExtrudeFace(e as MeshEditor.Face))
                {
                    if (VertexOffsets.ContainsKey(g))
                    {
                        return;
                    }
                    VertexOffsets.Add(g, g.WorldPosition - transform.position);
                }
            }
        }
    }
Ejemplo n.º 2
0
 public virtual void Dispose()
 {
     VertexOffsets.Dispose();
     VertexIndices.Dispose();
     EdgeFlags.Dispose();
     Triangles.Dispose();
 }