Resolve WES-143 "Feedback courses"
This commit is contained in:
committed by
Jerome Coudron
parent
c20cd89c3a
commit
c358ac59e4
@@ -203,8 +203,8 @@ MonoBehaviour:
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4282188031
|
||||
m_fontColor: {r: 1, g: 0, b: 0.23945475, a: 1}
|
||||
rgba: 4282206709
|
||||
m_fontColor: {r: 0.9607843, g: 0.28627452, b: 0.23921569, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
@@ -322,14 +322,14 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 0, b: 0, a: 1}
|
||||
m_Color: {r: 0.9607843, g: 0.28627452, b: 0.23921569, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
@@ -398,14 +398,14 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_Color: {r: 0.5803922, g: 0.58431375, b: 0.6, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
|
||||
@@ -6,11 +6,11 @@ using UnityEngine;
|
||||
/// </summary>
|
||||
public abstract class AbstractFeedback : MonoBehaviour, Listener
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Reference to the sign predictor
|
||||
/// </summary>
|
||||
public SignPredictor signPredictor;
|
||||
|
||||
/// <summary>
|
||||
/// The function that is called by the publisher on all its listeners
|
||||
/// </summary>
|
||||
@@ -19,6 +19,7 @@ public abstract class AbstractFeedback : MonoBehaviour, Listener
|
||||
{
|
||||
yield return StartCoroutine(UpdateFeedback());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A function to add yourself as listener to the signPredictor you are holding
|
||||
/// </summary>
|
||||
@@ -26,6 +27,7 @@ public abstract class AbstractFeedback : MonoBehaviour, Listener
|
||||
{
|
||||
signPredictor.listeners.Add(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The function that holds the logic to process the new probabilities of the signPredictor
|
||||
/// </summary>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user