示例#1
0
        private void getParameters(Constants.planeType _type)
        {
            switch (_type)
            {
            case Constants.planeType.XOY:
                a = 0;
                b = 0;
                c = 1;
                break;

            case Constants.planeType.XOZ:
                a = 0;
                b = 1;
                c = 0;
                break;

            case Constants.planeType.YOZ:
                a = 1;
                b = 0;
                c = 0;
                break;

            default:
                break;
            }
        }
示例#2
0
        // get angle from 2 points 3D and a plane XOY, YOZ, XOZ
        public static double getAngle(Point3D A, Point3D B, Constants.planeType _type)
        {
            Line3D  line  = new Line3D(A, B);
            Plane3D plane = new Plane3D(_type);

            return((180 / 3.14) * Math.Asin((Math.Abs(plane.getA() * line.getL() + plane.getB() * line.getM() + plane.getC() * line.getN()))
                                            / (Math.Sqrt(line.getL() * line.getL() + line.getM() * line.getM() + line.getN() * line.getN()) * Math.Sqrt(plane.getA() * plane.getA() + plane.getB() * plane.getB() + plane.getC() * plane.getC()))));
        }
示例#3
0
 public Plane3D(Constants.planeType _type)
 {
     type = _type;
     getParameters(type);
 }
示例#4
0
 public Plane3D(Constants.planeType _type)
 {
     type = _type;
     getParameters(type);
 }