Esempio n. 1
0
        public void Sub(IVector4 v1, IVector4 v2)
        {
            ITuple4_Double _v1 = v1.AsTupleDouble();
            ITuple4_Double _v2 = v2.AsTupleDouble();

            this.Set(_v1.X - _v2.X, _v1.Y - _v2.Y, _v1.Z - _v2.Z, _v1.W - _v2.W);
        }
Esempio n. 2
0
        public void Sub(IPoint4 p1, IPoint4 p2)
        {
            ITuple4_Double _p1 = p1.AsTupleDouble();
            ITuple4_Double _p2 = p2.AsTupleDouble();

            this.Set(_p1.X - _p2.X, _p1.Y - _p2.Y, _p1.Z - _p2.Z, _p1.W - _p2.W);
        }
Esempio n. 3
0
        public void Sub(IPoint4 p, IVector4 v)
        {
            ITuple4_Double _p = p.AsTupleDouble();
            ITuple4_Double _v = v.AsTupleDouble();

            this.Set(_p.X - _v.X, _p.Y - _v.Y, _p.Z - _v.Z, _p.W - _v.W);
        }
Esempio n. 4
0
        public void SimpleMul(IVector4 v1, IVector4 v2)
        {
            ITuple4_Double _v1 = v1.AsTupleDouble();
            ITuple4_Double _v2 = v2.AsTupleDouble();

            this.Set(_v1.X * _v2.X, _v1.Y * _v2.Y, _v1.Z * _v2.Z, _v1.W * _v2.W);
        }
Esempio n. 5
0
        public void Add(IPoint4 p, IVector4 v)
        {
            ITuple4_Double _p = p.AsTupleDouble();
            ITuple4_Double _v = v.AsTupleDouble();

            this.Set(_p.X + _v.X, _p.Y + _v.Y, _p.Z + _v.Z, _p.W + _v.W);
        }
Esempio n. 6
0
        public void Add(IVector4 v1, IVector4 v2)
        {
            ITuple4_Double _v1 = v1.AsTupleDouble();
            ITuple4_Double _v2 = v2.AsTupleDouble();

            this.Set(_v1.X + _v2.X, _v1.Y + _v2.Y, _v1.Z + _v2.Z, _v1.W + _v2.W);
        }
Esempio n. 7
0
        public void ProjectTo(IPoint4 p1, IVector4 where)
        {
            ITuple4_Double _p1 = p1.AsTupleDouble();
            BuffVector4d   aux = new BuffVector4d(where);

            aux.ProjV(new Vector4d(_p1.X, _p1.Y, _p1.Z, _p1.W));
            this.Set(aux.X, aux.Y, aux.Z, aux.W);
        }
Esempio n. 8
0
        public BuffVector4d(IVector4 other)
        {
            ITuple4_Double _other = other.AsTupleDouble();

            this.x = _other.X;
            this.y = _other.Y;
            this.z = _other.Z;
            this.w = _other.W;
        }
Esempio n. 9
0
        public Point4d(IPoint4 p)
        {
            ITuple4_Double _p = p.AsTupleDouble();

            this.X = _p.X;
            this.Y = _p.Y;
            this.Z = _p.Z;
            this.W = _p.W;
        }
Esempio n. 10
0
        public BuffPoint4d(IPoint4 other)
        {
            ITuple4_Double _other = other.AsTupleDouble();

            this.x = _other.X;
            this.y = _other.Y;
            this.z = _other.Z;
            this.w = _other.W;
        }
Esempio n. 11
0
        public void Lineal(IPoint4 p2, double alpha, double beta)
        {
            ITuple4_Double _p2 = p2.AsTupleDouble();

            this.Set(alpha * this.x + beta * _p2.X,
                     alpha * this.y + beta * _p2.Y,
                     alpha * this.z + beta * _p2.Z,
                     alpha * this.w + beta * _p2.W);
        }
Esempio n. 12
0
        public void Lineal(IVector4 v2, double alpha, double beta)
        {
            ITuple4_Double _v2 = v2.AsTupleDouble();

            this.Set(alpha * this.x + beta * _v2.X,
                     alpha * this.y + beta * _v2.Y,
                     alpha * this.z + beta * _v2.Z,
                     alpha * this.w + beta * _v2.W);
        }
Esempio n. 13
0
        public Vector4d(IVector4 v)
        {
            ITuple4_Double _v = v.AsTupleDouble();

            this.X = _v.X;
            this.Y = _v.Y;
            this.Z = _v.Z;
            this.W = _v.W;
        }
Esempio n. 14
0
        public void Lineal(IPoint4 p1, IPoint4 p2, double alpha, double beta)
        {
            ITuple4_Double _p1 = p1.AsTupleDouble();
            ITuple4_Double _p2 = p2.AsTupleDouble();

            this.Set(alpha * _p1.X + beta * _p2.X,
                     alpha * _p1.Y + beta * _p2.Y,
                     alpha * _p1.Z + beta * _p2.Z,
                     alpha * _p1.W + beta * _p2.W);
        }
Esempio n. 15
0
        public static ITuple4_Double AsTupleDouble(this ITuple4 v)
        {
            ITuple4_Double ret = v as ITuple4_Double;

            if (ret != null)
            {
                return(ret);
            }
            return(VectorUtils.Convert <ITuple4_Double>(v));
        }
Esempio n. 16
0
        public void Lineal(IVector4 v1, IVector4 v2, double alpha, double beta)
        {
            ITuple4_Double _v1 = v1.AsTupleDouble();
            ITuple4_Double _v2 = v2.AsTupleDouble();

            this.Set(alpha * _v1.X + beta * _v2.X,
                     alpha * _v1.Y + beta * _v2.Y,
                     alpha * _v1.Z + beta * _v2.Z,
                     alpha * _v1.W + beta * _v2.W);
        }
Esempio n. 17
0
        public void Sub(IVector4 v2)
        {
            ITuple4_Double _v2 = v2.AsTupleDouble();

            this.Set(this.x - _v2.X, this.y - _v2.Y, this.z - _v2.Z, this.w - _v2.W);
        }
Esempio n. 18
0
        public double Dot(IVector4 v2)
        {
            ITuple4_Double _v2 = v2.AsTupleDouble();

            return(this.X * _v2.X + this.Y * _v2.Y + this.Z * _v2.Z + this.W * _v2.W);
        }
Esempio n. 19
0
        public bool Equals(IVector4 other)
        {
            ITuple4_Double _other = other.AsTupleDouble();

            return(this.Equals(_other.X, _other.Y, _other.Z, _other.W));
        }
Esempio n. 20
0
        public bool EpsilonEquals(IVector4 other, double epsilon = EPSILON)
        {
            ITuple4_Double _other = other.AsTupleDouble();

            return(this.EpsilonEquals(_other.X, _other.Y, _other.Z, _other.W, epsilon));
        }
Esempio n. 21
0
        public void Sub(IVector4 v)
        {
            ITuple4_Double _v = v.AsTupleDouble();

            this.Set(this.x - _v.X, this.y - _v.Y, this.z - _v.Z, this.w - _v.W);
        }
Esempio n. 22
0
        public void Neg(IVector4 v1)
        {
            ITuple4_Double _v1 = v1.AsTupleDouble();

            this.Set(-_v1.X, -_v1.Y, -_v1.Z, -_v1.W);
        }
Esempio n. 23
0
        public void Abs(IVector4 v1)
        {
            ITuple4_Double _v1 = v1.AsTupleDouble();

            this.Set(Math.Abs(_v1.X), Math.Abs(_v1.Y), Math.Abs(_v1.Z), Math.Abs(_v1.W));
        }
Esempio n. 24
0
        public void SimpleMul(IVector4 v2)
        {
            ITuple4_Double _v2 = v2.AsTupleDouble();

            this.Set(this.x * _v2.X, this.y * _v2.Y, this.z * _v2.Z, this.w * _v2.W);
        }
Esempio n. 25
0
        public void Set(ITuple4 tuple)
        {
            ITuple4_Double _tuple = tuple.AsTupleDouble();

            this.Set(_tuple.X, _tuple.Y, _tuple.Z, _tuple.W);
        }
Esempio n. 26
0
        public void Div(IVector4 v1, double c)
        {
            ITuple4_Double _v1 = v1.AsTupleDouble();

            this.Set(_v1.X / c, _v1.Y / c, _v1.Z / c, _v1.W / c);
        }
Esempio n. 27
0
        public void Mul(IVector4 v1, double c)
        {
            ITuple4_Double _v1 = v1.AsTupleDouble();

            this.Set(_v1.X * c, _v1.Y * c, _v1.Z * c, _v1.W * c);
        }
Esempio n. 28
0
        public double Dot(IVector4 v2)
        {
            ITuple4_Double _v2 = v2.AsTupleDouble();

            return(this.x * _v2.X + this.y * _v2.Y + this.z * _v2.Z + this.w * _v2.W);
        }
Esempio n. 29
0
        public void Add(IVector4 v2)
        {
            ITuple4_Double _v2 = v2.AsTupleDouble();

            this.Set(this.x + _v2.X, this.y + _v2.Y, this.z + _v2.Z, this.w + _v2.W);
        }
Esempio n. 30
0
        public void Add(IVector4 v)
        {
            ITuple4_Double _v = v.AsTupleDouble();

            this.Set(this.x + _v.X, this.y + _v.Y, this.z + _v.Z, this.w + _v.W);
        }