Esempio n. 1
0
 public GVPoint(double x, double y, bool marked)
 {
     this.x   = new GVDouble(x);
     this.y   = new GVDouble(y);
     Is3D     = false;
     IsMarked = marked;
 }
Esempio n. 2
0
 public GVPoint(double x, double y)
 {
     this.x   = new GVDouble(x);
     this.y   = new GVDouble(y);
     Is3D     = false;
     IsMarked = false;
 }
Esempio n. 3
0
        public override string ToString()
        {
            string result = "";
            string colon  = "";

            while (doubleList.Count > 0)
            {
                GVDouble d = doubleList.Dequeue();
                result += colon + d.ToString();
                colon   = ":";
            }
            return(result);
        }
Esempio n. 4
0
        public void Add(GVColor color, GVDouble weight)
        {
            if (weight < GVDouble.Zero)
            {
                throw new GVException("Color-weight must be between 0.0 and 1.0");
            }
            if ((weightSum + weight) > GVDouble.One)
            {
                throw new GVException("Summed Color-weights exceed 1.0");
            }

            weightSum += weight;
            colorList.Enqueue(new WeightedColor {
                Weight = weight, Color = color
            });
        }
Esempio n. 5
0
 public GVColorList()
 {
     colorList = new Queue <WeightedColor>();
     weightSum = new GVDouble(0.0);
 }
Esempio n. 6
0
 public void Add(GVDouble d)
 {
     doubleList.Enqueue(d);
 }