public void Draw(mplt.RelativeKeypoint target, float threshold = 0.0f) { if (ActivateFor(target)) { Draw(GetScreenRect().GetPoint(target, rotationAngle, isMirrored)); SetColor(GetColor(target.Score, threshold)); } }
/// <summary> /// Get the coordinates represented by <paramref name="relativeKeypoint" /> in the local coordinate system. /// </summary> /// <param name="rectangle">Rectangle to get a point inside</param> /// <param name="imageRotation"> /// Counterclockwise rotation angle of the input image in the image coordinate system. /// In the local coordinate system, this value will often represent a clockwise rotation angle. /// </param> /// <param name="isMirrored">Set to true if the original coordinates is mirrored</param> public static Vector2 GetPoint(this UnityEngine.Rect rectangle, mplt.RelativeKeypoint relativeKeypoint, RotationAngle imageRotation = RotationAngle.Rotation0, bool isMirrored = false) { return(ImageNormalizedToPoint(rectangle, relativeKeypoint.X, relativeKeypoint.Y, imageRotation, isMirrored)); }