public TranslationAnnotation(Vector3 translation, List <Annotation> children) : base(children) { this.Translation = translation; int j = 0; //if (AllAnnotations.Count > 0) //{ //children.Remove(children.First<Annotation>()); //AllAnnotations.Add(this); //} foreach (Annotation child in children) { if (AllAnnotations.Remove(child)) { j++; } } if (children.Count > j) { for (int i = 0; i < children.Count - j; i++) { //AllAttributeAnnotations.RemoveAt(AllAttributeAnnotations.Count - i - 1); AllAttributeAnnotations.RemoveAt(i); } } }
public ScaleAnnotation(float scale, List <Annotation> children) : base(children) { this.Scale = scale; int j = 0; foreach (Annotation child in children) { if (AllAnnotations.Remove(child)) { j++; } } if (children.Count > j) { for (int i = 0; i < children.Count - j; i++) { //AllAttributeAnnotations.RemoveAt(AllAttributeAnnotations.Count-i-1); AllAttributeAnnotations.RemoveAt(i); } } }
public ColorAnnotation(Color lineColor, Color fillColor, List <Annotation> children) : base(children) { LineColor = lineColor; FillColor = fillColor; int j = 0; foreach (Annotation child in children) { if (AllAnnotations.Remove(child)) { j++; } } if (children.Count > j) { for (int i = 0; i < children.Count - j; i++) { //AllAttributeAnnotations.RemoveAt(AllAttributeAnnotations.Count - i - 1); AllAttributeAnnotations.RemoveAt(i); } } }
public RotationAnnotation(Vector3 myaxis, float myangle, List <Annotation> children) : base(children) { this.Axis = myaxis; this.Angle = myangle; int j = 0; foreach (Annotation child in children) { if (AllAnnotations.Remove(child)) { j++; } } if (children.Count > j) { for (int i = 0; i < children.Count - j; i++) { //AllAttributeAnnotations.RemoveAt(AllAttributeAnnotations.Count - i - 1); AllAttributeAnnotations.RemoveAt(i); } } }