private bool _Status; // check if fingertip touch plane #endregion Fields #region Constructors /// <summary> /// Constructor /// </summary> /// <param name="X">X</param> /// <param name="Y">Y</param> /// <param name="Z">Z</param> /// <param name="Status">touch plane or not</param> /// <param name="Height">distance from fingertip to plane</param> public Fingertip(POINT3D Point3D, POINT2D Point2D1, POINT2D Point2D2, bool Status, double Height) { _Point3D = Point3D; _Point2D1 = Point2D1; _Point2D2 = Point2D2; _Status = Status; _Height = Height; }
public double DistanceFromPointToPlane(POINT3D point) { double tu = _A * point.X + _B * point.Y + _C * point.Z + _D; double mau = Math.Sqrt(_A * _A + _B * _B + _C * _C); return tu/mau; }