示例#1
0
        public void Sub(IVector3 v1, IVector3 v2)
        {
            ITuple3_Double _v1 = v1.AsTupleDouble();
            ITuple3_Double _v2 = v2.AsTupleDouble();

            this.Set(_v1.X - _v2.X, _v1.Y - _v2.Y, _v1.Z - _v2.Z);
        }
示例#2
0
        public void Add(IVector3 v1, IVector3 v2)
        {
            ITuple3_Double _v1 = v1.AsTupleDouble();
            ITuple3_Double _v2 = v2.AsTupleDouble();

            this.Set(_v1.X + _v2.X, _v1.Y + _v2.Y, _v1.Z + _v2.Z);
        }
示例#3
0
        public override void Transform(IVector3 v, IOpVector3 vout)
        {
            ITuple3_Double   _v    = v.AsTupleDouble();
            IOpTuple3_Double _vout = vout.AsOpTupleDouble();

            _vout.Set(_v.X, _v.Y, _v.Z);
        }
示例#4
0
        public void Add(IPoint3 p, IVector3 v)
        {
            ITuple3_Double _p = p.AsTupleDouble();
            ITuple3_Double _v = v.AsTupleDouble();

            this.Set(_p.X + _v.X, _p.Y + _v.Y, _p.Z + _v.Z);
        }
示例#5
0
        public void Sub(IPoint3 p, IVector3 v)
        {
            ITuple3_Double _p = p.AsTupleDouble();
            ITuple3_Double _v = v.AsTupleDouble();

            this.Set(_p.X - _v.X, _p.Y - _v.Y, _p.Z - _v.Z);
        }
示例#6
0
        public void SimpleMul(IVector3 v1, IVector3 v2)
        {
            ITuple3_Double _v1 = v1.AsTupleDouble();
            ITuple3_Double _v2 = v2.AsTupleDouble();

            this.Set(_v1.X * _v2.X, _v1.Y * _v2.Y, _v1.Z * _v2.Z);
        }
示例#7
0
        public BuffVector3d(IVector3 other)
        {
            ITuple3_Double _other = other.AsTupleDouble();

            this.x = _other.X;
            this.y = _other.Y;
            this.z = _other.Z;
        }
示例#8
0
        public void Lineal(IVector3 v2, double alpha, double beta)
        {
            ITuple3_Double _v2 = v2.AsTupleDouble();

            this.Set(alpha * this.x + beta * _v2.X,
                     alpha * this.y + beta * _v2.Y,
                     alpha * this.z + beta * _v2.Z);
        }
示例#9
0
        public Vector3d(IVector3 v)
        {
            ITuple3_Double _v = v.AsTupleDouble();

            this.X = _v.X;
            this.Y = _v.Y;
            this.Z = _v.Z;
        }
示例#10
0
        public void Cross(IVector3 v2)
        {
            ITuple3_Double _v2 = v2.AsTupleDouble();

            this.Set((this.y * _v2.Z) - (this.z * _v2.Y),
                     (this.z * _v2.X) - (this.x * _v2.Z),
                     (this.x * _v2.Y) - (this.y * _v2.X));
        }
示例#11
0
        public IVector3 Mul(IVector3 v)
        {
            ITuple3_Double _v = v.AsTupleDouble();

            return(new Vector3d(this.M00 * _v.X + this.M01 * _v.Y + this.M02 * _v.Z,
                                this.M10 * _v.X + this.M11 * _v.Y + this.M12 * _v.Z,
                                _v.Z));
        }
示例#12
0
        public void Cross(IVector3 v1, IVector3 v2)
        {
            ITuple3_Double _v1 = v1.AsTupleDouble();
            ITuple3_Double _v2 = v2.AsTupleDouble();

            this.Set((_v1.Y * _v2.Z) - (_v1.Z * _v2.Y),
                     (_v1.Z * _v2.X) - (_v1.X * _v2.Z),
                     (_v1.X * _v2.Y) - (_v1.Y * _v2.X));
        }
示例#13
0
        public void Mul(IVector3 v, IOpVector3 vout)
        {
            ITuple3_Double   _v    = v.AsTupleDouble();
            IOpTuple3_Double _vout = vout.AsOpTupleDouble();

            _vout.Set(this.M00 * _v.X + this.M01 * _v.Y + this.M02 * _v.Z,
                      this.M10 * _v.X + this.M11 * _v.Y + this.M12 * _v.Z,
                      _v.Z);
        }
示例#14
0
        public IVector3 Mul(IVector3 v)
        {
            ITuple3_Double _v = v.AsTupleDouble();

            Contract.Requires((this.M30 * _v.X + this.M31 * _v.Y + this.M32 * _v.Z).EpsilonEquals(0));
            return(new Vector3d(this.M00 * _v.X + this.M01 * _v.Y + this.M02 * _v.Z,
                                this.M10 * _v.X + this.M11 * _v.Y + this.M12 * _v.Z,
                                this.M20 * _v.X + this.M21 * _v.Y + this.M22 * _v.Z));
        }
示例#15
0
        public void Lineal(IVector3 v1, IVector3 v2, double alpha, double beta)
        {
            ITuple3_Double _v1 = v1.AsTupleDouble();
            ITuple3_Double _v2 = v2.AsTupleDouble();

            this.Set(alpha * _v1.X + beta * _v2.X,
                     alpha * _v1.Y + beta * _v2.Y,
                     alpha * _v1.Z + beta * _v2.Z);
        }
示例#16
0
        public void Mul(IVector3 v, IOpVector3 vout)
        {
            ITuple3_Double   _v    = v.AsTupleDouble();
            IOpTuple3_Double _vout = vout.AsOpTupleDouble();

            Contract.Requires((this.M30 * _v.X + this.M31 * _v.Y + this.M32 * _v.Z).EpsilonEquals(0));
            _vout.Set(this.M00 * _v.X + this.M01 * _v.Y + this.M02 * _v.Z,
                      this.M10 * _v.X + this.M11 * _v.Y + this.M12 * _v.Z,
                      this.M20 * _v.X + this.M21 * _v.Y + this.M22 * _v.Z);
        }
示例#17
0
        public double Dot(IVector3 v2)
        {
            ITuple3_Double _v2 = v2.AsTupleDouble();

            return(this.x * _v2.X + this.y * _v2.Y + this.z * _v2.Z);
        }
示例#18
0
        public void Sub(IVector3 v)
        {
            ITuple3_Double _v = v.AsTupleDouble();

            this.Set(this.x - _v.X, this.y - _v.Y, this.z - _v.Z);
        }
示例#19
0
        public void Add(IVector3 v2)
        {
            ITuple3_Double _v2 = v2.AsTupleDouble();

            this.Set(this.x + _v2.X, this.y + _v2.Y, this.z + _v2.Z);
        }
示例#20
0
        public void Add(IVector3 v)
        {
            ITuple3_Double _v = v.AsTupleDouble();

            this.Set(this.x + _v.X, this.y + _v.Y, this.z + _v.Z);
        }
示例#21
0
        public bool Equals(IVector3 other)
        {
            ITuple3_Double _other = other.AsTupleDouble();

            return(this.Equals(_other.X, _other.Y, _other.Z));
        }
示例#22
0
        public void SimpleMul(IVector3 v2)
        {
            ITuple3_Double _v2 = v2.AsTupleDouble();

            this.Set(this.x * _v2.X, this.y * _v2.Y, this.z * _v2.Z);
        }
示例#23
0
        public void Mul(IVector3 v1, double c)
        {
            ITuple3_Double _v1 = v1.AsTupleDouble();

            this.Set(_v1.X * c, _v1.Y * c, _v1.Z * c);
        }
示例#24
0
        public void Neg(IVector3 v1)
        {
            ITuple3_Double _v1 = v1.AsTupleDouble();

            this.Set(-_v1.X, -_v1.Y, -_v1.Z);
        }
示例#25
0
        public void Sub(IVector3 v2)
        {
            ITuple3_Double _v2 = v2.AsTupleDouble();

            this.Set(this.x - _v2.X, this.y - _v2.Y, this.z - _v2.Z);
        }
示例#26
0
        public void Abs(IVector3 v1)
        {
            ITuple3_Double _v1 = v1.AsTupleDouble();

            this.Set(Math.Abs(_v1.X), Math.Abs(_v1.Y), Math.Abs(_v1.Z));
        }
示例#27
0
        public bool EpsilonEquals(IVector3 other, double epsilon = MathUtils.EPSILON)
        {
            ITuple3_Double _other = other.AsTupleDouble();

            return(this.EpsilonEquals(_other.X, _other.Y, _other.Z, epsilon));
        }
示例#28
0
        public void Div(IVector3 v1, double c)
        {
            ITuple3_Double _v1 = v1.AsTupleDouble();

            this.Set(_v1.X / c, _v1.Y / c, _v1.Z / c);
        }