예제 #1
0
        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);
                }
            }
        }
예제 #2
0
        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);
                }
            }
        }
예제 #3
0
        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);
                }
            }
        }
예제 #4
0
        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);
                }
            }
        }