/** * Calculates the axis-specific difference of the points from the ABSOLUTENullFace * @param i01,i02 which are the current points to calculate the difference * @param axis which is the specific axis to work with * @param absolute defines wether or not the absolute difference should be returned or not */ public static double BetweenByAxis(int i01, int i02, Model.AXIS axis, bool absolute) { double result = 0; switch (axis) { case Model.AXIS.X: result = model.CurrentFace[i02].world.x - model.CurrentFace[i01].world.x; break; case Model.AXIS.Y: result = model.CurrentFace[i02].world.y - model.CurrentFace[i01].world.y; break; case Model.AXIS.Z: result = model.CurrentFace[i02].world.z - model.CurrentFace[i01].world.z; break; } return(absolute ? Math.Abs(result) : result); }
/** * David * * */ public static double DifferenceNullCurrent(int i01, Model.AXIS axis) { double result = 0; switch (axis) { case Model.AXIS.X: result = (model.NullFace[Model.NOSE_FIX].world.x - model.NullFace[i01].world.x) - (model.CurrentFace[Model.NOSE_FIX].world.x - model.CurrentFace[i01].world.x); break; case Model.AXIS.Y: result = (model.NullFace[Model.NOSE_FIX].world.y - model.NullFace[i01].world.y) - (model.CurrentFace[Model.NOSE_FIX].world.y - model.CurrentFace[i01].world.y); break; case Model.AXIS.Z: result = (model.NullFace[Model.NOSE_FIX].world.z - model.NullFace[i01].world.z) - (model.CurrentFace[Model.NOSE_FIX].world.z - model.CurrentFace[i01].world.z); break; } return(result); }
/** * Returns the total difference of axis-specific distance between two points * @param i01,i02 which are the current points to calculate the difference * @param axis which is the specific axis to work with * @param absolute defines wether or not the absolute difference should be returned or not */ public static double DifferenceByAxis(int i01, int i02, Model.AXIS axis, bool absolute) { return(NullFaceBetweenByAxis(i01, i02, axis, absolute) - BetweenByAxis(i01, i02, axis, absolute)); }