Resolve WES-143 "Feedback courses"

This commit is contained in:
Helena Van Breugel
2023-04-04 18:24:17 +00:00
committed by Jerome Coudron
parent c20cd89c3a
commit c358ac59e4
115 changed files with 11331 additions and 1116 deletions

View File

@@ -123,12 +123,6 @@ public class SignPredictor : MonoBehaviour
[SerializeField]
private RawImage screen;
/// <summary>
/// A secondary optional screen object on which the video is displayed
/// </summary>
[SerializeField]
private RawImage screen2;
/// <summary>
/// MediaPipe graph
/// </summary>
@@ -230,10 +224,6 @@ public class SignPredictor : MonoBehaviour
float webcamAspect = (float)webcamTexture.width / (float)webcamTexture.height;
screen.rectTransform.sizeDelta = new Vector2(screen.rectTransform.sizeDelta.y * webcamAspect, (screen.rectTransform.sizeDelta.y));
screen.texture = webcamTexture;
if (screen2 != null)
{
screen2.rectTransform.sizeDelta = new Vector2(screen2.rectTransform.sizeDelta.y * webcamAspect, (screen2.rectTransform.sizeDelta.y));
}
// TODO this method is kinda meh you should use
inputTexture = new Texture2D(width, height, TextureFormat.RGBA32, false);
@@ -426,7 +416,7 @@ public class SignPredictor : MonoBehaviour
webcamTexture.Play();
}
}
/*
/// <summary>
/// Swaps the display screens
/// </summary>
@@ -443,9 +433,19 @@ public class SignPredictor : MonoBehaviour
screen2.texture = null;
}
}
public void ChangeModel(ModelIndex index)
*/
public void SetModel(ModelIndex index)
{
this.modelList.SetCurrentModel(index);
}
/// <summary>
/// Swaps the display screens
/// </summary>
public void SwapScreen(RawImage screen)
{
this.screen = screen;
this.screen.texture = webcamTexture;
}
}