// 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()))); }
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; } }
public Plane3D(Constants.planeType _type) { type = _type; getParameters(type); }
public void setType(Constants.stateType type) { this.type = type; }
public State(Constants.stateType _type, String _motion) { this.type = _type; transitions = new Dictionary<String, Transition>(); this.motion = _motion; }
public void setOperator(Constants.conditionType op) { this.op = op; }