Ejemplo n.º 1
0
        public Point2d(IPoint2 p)
        {
            ITuple2_Double _p = p.AsTupleDouble();

            this.X = _p.X;
            this.Y = _p.Y;
        }
Ejemplo n.º 2
0
        public IPoint2 Mul(IPoint2 p)
        {
            ITuple2_Double _v = p.AsTupleDouble();

            return(new Point2d(this.M00 * _v.X + this.M01 * _v.Y + this.M02,
                               this.M10 * _v.X + this.M11 * _v.Y + this.M12));
        }
Ejemplo n.º 3
0
        public void Sub(IPoint2 p1, IPoint2 p2)
        {
            ITuple2_Double _p1 = p1.AsTupleDouble();
            ITuple2_Double _p2 = p2.AsTupleDouble();

            this.Set(_p1.X - _p2.X, _p1.Y - _p2.Y);
        }
Ejemplo n.º 4
0
        public override void Transform(IPoint2 p, IOpPoint2 pout)
        {
            ITuple2_Double   _v    = p.AsTupleDouble();
            IOpTuple2_Double _vout = pout.AsOpTupleDouble();

            _vout.Set(_v.X, _v.Y);
        }
Ejemplo n.º 5
0
        public BuffPoint2d(IPoint2 other)
        {
            ITuple2_Double _other = other.AsTupleDouble();

            this.x = _other.X;
            this.y = _other.Y;
        }
Ejemplo n.º 6
0
        public void Lineal(IPoint2 p2, double alpha, double beta)
        {
            ITuple2_Double _p2 = p2.AsTupleDouble();

            this.Set(alpha * this.x + beta * _p2.X,
                     alpha * this.y + beta * _p2.Y);
        }
Ejemplo n.º 7
0
        public void Sub(IPoint2 p, IVector2 v)
        {
            ITuple2_Double _p = p.AsTupleDouble();
            ITuple2_Double _v = v.AsTupleDouble();

            this.Set(_p.X - _v.X, _p.Y - _v.Y);
        }
Ejemplo n.º 8
0
        public void Mul(IPoint2 p, IOpPoint2 pout)
        {
            ITuple2_Double   _v    = p.AsTupleDouble();
            IOpTuple2_Double _vout = pout.AsOpTupleDouble();

            _vout.Set(this.M00 * _v.X + this.M01 * _v.Y + this.M02,
                      this.M10 * _v.X + this.M11 * _v.Y + this.M12);
        }
Ejemplo n.º 9
0
        public void ProjectTo(IPoint2 p1, IVector2 where)
        {
            ITuple2_Double _p1 = p1.AsTupleDouble();
            BuffVector2d   aux = new BuffVector2d(where);

            aux.ProjV(new Vector2d(_p1.X, _p1.Y));
            this.Set(aux.X, aux.Y);
        }
Ejemplo n.º 10
0
        public void Lineal(IPoint2 p1, IPoint2 p2, double alpha, double beta)
        {
            ITuple2_Double _p1 = p1.AsTupleDouble();
            ITuple2_Double _p2 = p2.AsTupleDouble();

            this.Set(alpha * _p1.X + beta * _p2.X,
                     alpha * _p1.Y + beta * _p2.Y);
        }
Ejemplo n.º 11
0
        public bool Equals(IPoint2 other)
        {
            ITuple2_Double _other = other.AsTupleDouble();

            return(this.Equals(_other.X, _other.Y));
        }
Ejemplo n.º 12
0
        public bool EpsilonEquals(IPoint2 other, double epsilon = EPSILON)
        {
            ITuple2_Double _other = other.AsTupleDouble();

            return(this.EpsilonEquals(_other.X, _other.Y, epsilon));
        }