Exemplo 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;
 }
Exemplo n.º 2
0
 public GVPoint(double x, double y)
 {
     this.x   = new GVDouble(x);
     this.y   = new GVDouble(y);
     Is3D     = false;
     IsMarked = false;
 }
Exemplo 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);
        }
Exemplo 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
            });
        }
Exemplo n.º 5
0
 public GVColorList()
 {
     colorList = new Queue <WeightedColor>();
     weightSum = new GVDouble(0.0);
 }
Exemplo n.º 6
0
 public void Add(GVDouble d)
 {
     doubleList.Enqueue(d);
 }