示例#1
0
        public ICartesian2D Shift(ICartesian2DPoint newBase)
        {
            double tempX = (newBase.X.ChangeTo <T>()).Value;

            double tempY = (newBase.Y.ChangeTo <T>()).Value;

            ILinearCollection newX = X.SubtractAllValuesWith(tempX);

            ILinearCollection newY = Y.SubtractAllValuesWith(tempY);

            return(new Cartesian2D <T>(newX, newY, this.Handedness));
        }
示例#2
0
        public Polar(string name, ILinearCollection radius, IAngularCollection angle, AxisType handedness)
        {
            if (radius.Length != angle.Length)
            {
                throw new NotImplementedException();
            }

            this.m_Name = name;

            this.m_Handedness = handedness;

            this.m_Radius = (LinearCollection <TLinear>)radius.ChangeTo <TLinear>();

            this.m_Angle = (AngularCollection <TAngular>)angle.ChangeTo <TAngular>();
        }
示例#3
0
        public Polar(string name, Matrix values, AxisType handedness, AngleRange range)
        {
            if (values.NumberOfColumns != this.Dimension)
            {
                throw new NotImplementedException();
            }

            this.m_Name = name;

            this.m_Handedness = handedness;

            this.m_Radius = new LinearCollection <TLinear>(values.GetColumn(0));

            this.m_Angle = new AngularCollection <TAngular>(values.GetColumn(1), range);
        }
示例#4
0
        public Cartesian2D(string name, ILinearCollection x, ILinearCollection y, AxisType handedness)
        {
            if (x.Length != y.Length)
            {
                throw new NotImplementedException();
            }

            this.m_Name = name;

            this.m_Handedness = handedness;

            this.m_X = (LinearCollection <T>)x.ChangeTo <T>();

            this.m_Y = (LinearCollection <T>)y.ChangeTo <T>();
        }
示例#5
0
        public Cartesian2D(string name, Matrix values, AxisType handedness, LinearPrefix prefix)
        {
            if (values.NumberOfColumns != this.Dimension)
            {
                throw new NotImplementedException();
            }

            this.m_Name = name;

            this.m_Handedness = handedness;

            this.m_X = new LinearCollection <T>(values.GetColumn(0));

            this.m_Y = new LinearCollection <T>(values.GetColumn(1));
        }
示例#6
0
        public ILinearCollection Subtract(ILinearCollection array)
        {
            if (this.Length != array.Length)
            {
                throw new NotImplementedException();
            }

            LinearCollection <T> result = new LinearCollection <T>(this.Length);

            for (int i = 0; i < this.Length; i++)
            {
                result.SetValue(i, this.GetValue(i).Subtract(array.GetValue(i)));
            }

            return(result);
        }
示例#7
0
        public Spherical(string name, Matrix values, AxisType handedness, AngleRange horizontalRange)
        {
            if (values.NumberOfColumns != this.Dimension)
            {
                throw new NotImplementedException();
            }

            this.m_Name = name;

            this.m_Handedness = handedness;

            this.m_Radius = new LinearCollection <TLinear>(values.GetColumn(0));

            this.m_HorizontalAngle = new AngularCollection <TAngular>(values.GetColumn(1), horizontalRange);

            this.m_VerticalAngle = new AngularCollection <TAngular>(values.GetColumn(2), AngleRange.MinusPiTOPi);
        }
示例#8
0
        public Spherical(string name, ILinearCollection radius, IAngularCollection horizontalAngle, IAngularCollection verticalAngle, AxisType handedness)
        {
            if (radius.Length != horizontalAngle.Length || radius.Length != verticalAngle.Length)
            {
                throw new NotImplementedException();
            }

            this.m_Name = name;

            this.m_Handedness = handedness;

            this.m_Radius = (LinearCollection <TLinear>)radius.ChangeTo <TLinear>();

            this.m_HorizontalAngle = (AngularCollection <TAngular>)horizontalAngle.ChangeTo <TAngular>();

            this.m_VerticalAngle = (AngularCollection <TAngular>)verticalAngle.ChangeTo <TAngular>();
        }
示例#9
0
        public Geodetic(string name, Matrix values, AxisType handedness, AngleRange longitudinalRange, IEllipsoid ellipsoid)
        {
            if (values.NumberOfColumns != this.Dimension)
            {
                throw new NotImplementedException();
            }

            this.m_Name = name;

            this.m_Handedness = handedness;

            this.m_Datum = ellipsoid.ChangeTo <TLinear, TAngular>();

            this.m_Height = new LinearCollection <TLinear>(values.GetColumn(0));

            this.m_Longitude = new AngularCollection <TAngular>(values.GetColumn(1), longitudinalRange);

            this.m_Latitude = new AngularCollection <TAngular>(values.GetColumn(2), AngleRange.MinusPiTOPi);
        }
示例#10
0
        public Geodetic(string name, ILinearCollection height, IAngularCollection longitude, IAngularCollection latitude, IEllipsoid ellipsoid, AxisType handedness)
        {
            if (height.Length != longitude.Length || height.Length != latitude.Length)
            {
                throw new NotImplementedException();
            }

            this.m_Name = name;

            this.m_Handedness = handedness;

            this.m_Datum = ellipsoid.ChangeTo <TLinear, TAngular>();

            this.m_Height = (LinearCollection <TLinear>)height.ChangeTo <TLinear>();

            this.m_Longitude = (AngularCollection <TAngular>)longitude.ChangeTo <TAngular>();

            this.m_Latitude = (AngularCollection <TAngular>)latitude.ChangeTo <TAngular>();
        }
示例#11
0
 public Spherical(ILinearCollection radius, IAngularCollection horizontalAngle, IAngularCollection verticalAngle, AxisType handedness)
     : this("Shperical", radius, horizontalAngle, verticalAngle, handedness)
 {
 }
示例#12
0
 public Spherical(ILinearCollection radius, IAngularCollection horizontalAngle, IAngularCollection verticalAngle)
     : this(radius, horizontalAngle, verticalAngle, AxisType.RightHanded)
 {
 }
示例#13
0
 public Polar(ILinearCollection radius, IAngularCollection angle, AxisType handedness)
     : this("Polar", radius, angle, handedness)
 {
 }
示例#14
0
 public Polar(ILinearCollection radius, IAngularCollection angle)
     : this(radius, angle, AxisType.RightHanded)
 {
 }
示例#15
0
 public Cartesian3D(ILinearCollection x, ILinearCollection y, ILinearCollection z)
     : this("Cartesian2D", x, y, z, AxisType.RightHanded)
 {
 }
示例#16
0
 public Cartesian3D(ILinearCollection x, ILinearCollection y, ILinearCollection z, AxisType handedness)
     : this("Cartesian2D", x, y, z, handedness)
 {
 }
示例#17
0
 public Geodetic(ILinearCollection height, IAngularCollection longitude, IAngularCollection latitude, IEllipsoid ellipsoid)
     : this(height, longitude, latitude, ellipsoid, AxisType.RightHanded)
 {
 }
示例#18
0
 public Geodetic(ILinearCollection height, IAngularCollection longitude, IAngularCollection latitude, IEllipsoid ellipsoid, AxisType handedness)
     : this("Geodetic", height, longitude, latitude, ellipsoid, handedness)
 {
 }