Esempio n. 1
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())));
        }
Esempio n. 2
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;
     }
 }
Esempio n. 3
0
 public Plane3D(Constants.planeType _type)
 {
     type = _type;
     getParameters(type);
 }
Esempio n. 4
0
 public void setType(Constants.stateType type)
 {
     this.type = type;
 }
Esempio n. 5
0
 public State(Constants.stateType _type, String _motion)
 {
     this.type = _type;
     transitions = new Dictionary<String, Transition>();
     this.motion = _motion;
 }
Esempio n. 6
0
 public void setOperator(Constants.conditionType op) {
     this.op = op;
 }