public CopyLayerInstance(MeshVert _parent, MeshFace _element, int copyLayerId = -1) { parent = _parent; element = _element; offsetPosition = Vector3.zero; copyLayer = CopyLayerManager.GetLayer(copyLayerId); copyLayer.Add(this); }
/// <summary> /// Sets the next Layer up /// </summary> public static void GotoNextLayer() { if (currentLayer != null && currentLayer.Count() == 0) { return; } if (idQueue.Count == 0) { GenerateNewIds(100); } currentLayer = new CopyLayer(idQueue.Dequeue()); Layers.Add(currentLayer); }
/// <summary> /// Removes a Layer, requeuing it's id. /// </summary> /// <param name="copyLayer"></param> public static void RemoveLayer(CopyLayer copyLayer) { idQueue.Enqueue(copyLayer.id); Layers.Remove(copyLayer); copyLayer.RemoveInstances(); }
public void ChangeCopyLayer(int copyLayerId = -1) { copyLayer.RemoveInstance(this); copyLayer = CopyLayerManager.GetLayer(copyLayerId); copyLayer.Add(this); }