Пример #1
0
        public static void AreEqual(CoordinateSystem coordinateSystem, Point3D origin, Vector3D xAxis, Vector3D yAxis, Vector3D zAxis, double tolerance = 1e-6)
        {
            AreEqual(xAxis, coordinateSystem.XAxis, tolerance);
            AreEqual(yAxis, coordinateSystem.YAxis, tolerance);
            AreEqual(zAxis, coordinateSystem.ZAxis, tolerance);
            AreEqual(origin, coordinateSystem.Origin, tolerance);

            AreEqual(new double[] { xAxis.X, xAxis.Y, xAxis.Z, 0 }, coordinateSystem.Column(0).ToArray(), tolerance);
            AreEqual(new double[] { yAxis.X, yAxis.Y, yAxis.Z, 0 }, coordinateSystem.Column(1).ToArray(), tolerance);
            AreEqual(new double[] { zAxis.X, zAxis.Y, zAxis.Z, 0 }, coordinateSystem.Column(2).ToArray(), tolerance);
            AreEqual(new double[] { origin.X, origin.Y, origin.Z, 1 }, coordinateSystem.Column(3).ToArray(), tolerance);
        }
Пример #2
0
        public static void AreEqual(CoordinateSystem coordinateSystem, Point3D origin, Vector3D xAxis, Vector3D yAxis, Vector3D zAxis, double tolerance = 1e-6)
        {
            AreEqual(xAxis, coordinateSystem.XAxis, tolerance);
            AreEqual(yAxis, coordinateSystem.YAxis, tolerance);
            AreEqual(zAxis, coordinateSystem.ZAxis, tolerance);
            AreEqual(origin, coordinateSystem.Origin, tolerance);

            AreEqual(new double[] { xAxis.X, xAxis.Y, xAxis.Z, 0 }, coordinateSystem.Column(0).ToArray(), tolerance);
            AreEqual(new double[] { yAxis.X, yAxis.Y, yAxis.Z, 0 }, coordinateSystem.Column(1).ToArray(), tolerance);
            AreEqual(new double[] { zAxis.X, zAxis.Y, zAxis.Z, 0 }, coordinateSystem.Column(2).ToArray(), tolerance);
            AreEqual(new double[] { origin.X, origin.Y, origin.Z, 1 }, coordinateSystem.Column(3).ToArray(), tolerance);
        }