Пример #1
0
    public void PlayVideoBUTTON()
    {
        if (already_played)
        {
            play_bool = true;
            PhysioThread.acquiring = false;
            PausePostButton.SetActive(true);
            PlayPostButton.SetActive(false);

            pause_time = Time.time - init_pause_time;
            //Debug.LogError("pause_time: " + pause_time + "current_time: "+current_time + "  current-pause: "+(current_time-pause_time));
        }
        else
        {
            PhysioThread.acquiring = false;
            play_bool = true;

            init_time = Time.time;

            PausePostButton.SetActive(true);
            PlayPostButton.SetActive(false);
            already_played = true;
            pause_time     = 0;
        }
    }
Пример #2
0
    private void GetFrameData()
    {
        //Debug.LogWarning("Frame_  " + frame);

        if (frame < PDM_DATA_Size - 3)
        {
            if (Math.Abs(Time_PDM[frame] - current_time) < 0.1)
            {
                frame++;
            }
            //Debug.LogError("time:  "+PhysioThread.Time_PDM[frame] + "   currenttime: "+current_time);
            Quat_Pelvis     = new Quaternion(Quat_P_X[frame], Quat_P_Y[frame], Quat_P_Z[frame], Quat_P_W[frame]);
            Quat_LeftThigh  = new Quaternion(Quat_LT_X[frame], Quat_LT_Y[frame], Quat_LT_Z[frame], Quat_LT_W[frame]);
            Quat_LeftCalf   = new Quaternion(Quat_LC_X[frame], Quat_LC_Y[frame], Quat_LC_Z[frame], Quat_LC_W[frame]);
            Quat_LeftFoot   = new Quaternion(Quat_LF_X[frame], Quat_LF_Y[frame], Quat_LF_Z[frame], Quat_LF_W[frame]);
            Quat_RightThigh = new Quaternion(Quat_RT_X[frame], Quat_RT_Y[frame], Quat_RT_Z[frame], Quat_RT_W[frame]);
            Quat_RightCalf  = new Quaternion(Quat_RC_X[frame], Quat_RC_Y[frame], Quat_RC_Z[frame], Quat_RC_W[frame]);
            Quat_RightFoot  = new Quaternion(Quat_RF_X[frame], Quat_RF_Y[frame], Quat_RF_Z[frame], Quat_RF_W[frame]);
        }
        else
        {
            StopVideoBUTTON();
            PausePostButton.SetActive(false);
            PlayPostButton.SetActive(true);
        }
    }
Пример #3
0
    public void NewSessionBUTTON()
    {
        TopPostPlotPanel.SetActive(false);
        BottomPostPlotPanel.SetActive(false);
        TopPlotPanel.SetActive(true);
        BottomPlotPanel.SetActive(true);
        StartButton.SetActive(true);
        StopButton.SetActive(true);
        SaveDataButton.SetActive(true);
        NewSessionButton.SetActive(false);
        UsersList.patientsessioninfo.SessionDate    = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
        SessionDateLabel.GetComponent <Text>().text = UsersList.patientsessioninfo.SessionDate;
        PlayPostButton.SetActive(false);
        PausePostButton.SetActive(false);
        StopPostButton.SetActive(false);
        CheckNodesButton.SetActive(true);

        Destroy(graphGOpost);
        Destroy(graphGOBottompost);
        graphGO       = Instantiate(graphPrefab) as GameObject;
        graphGOBottom = Instantiate(graphPrefabBottom) as GameObject;
        graph         = graphGO.GetComponent <WMG_Axis_Graph>();
        graphBottom   = graphGOBottom.GetComponent <WMG_Axis_Graph>();
        graph.changeSpriteParent(graphGO, TopPlotPanel);
        graphBottom.changeSpriteParent(graphGOBottom, BottomPlotPanel);
        post_plotting = false;
    }
Пример #4
0
 public void PauseVideoBUTTON()
 {
     play_bool = false;
     PausePostButton.SetActive(false);
     PlayPostButton.SetActive(true);
     init_pause_time = Time.time;
     pause_time      = 0;
 }
Пример #5
0
 public void StopVideoBUTTON()
 {
     play_bool = false;
     frame     = 0;
     init_time = Time.time;
     PausePostButton.SetActive(false);
     PlayPostButton.SetActive(true);
     already_played = false;
 }
Пример #6
0
    void Start()
    {
        TopPlotPanel     = GameObject.Find("TopPlotPanel");
        BottomPlotPanel  = GameObject.Find("BottomPlotPanel");
        TopPostPlotPanel = GameObject.Find("TopPostPlotPanel");
        TopPostPlotPanel.SetActive(false);
        BottomPostPlotPanel = GameObject.Find("BottomPostPlotPanel");
        BottomPostPlotPanel.SetActive(false);
        StartButton      = GameObject.Find("StartButton");
        StopButton       = GameObject.Find("StopButton");
        SaveDataButton   = GameObject.Find("SaveButton");
        NewSessionButton = GameObject.Find("NewSessionButton");
        SessionDateLabel = GameObject.Find("SessionTimeLabel");
        NewSessionButton.SetActive(false);

        PlayPostButton   = GameObject.Find("PlayPostButton");
        PausePostButton  = GameObject.Find("PausePostButton");
        StopPostButton   = GameObject.Find("StopPostButton");
        CheckNodesButton = GameObject.Find("CheckButton");
        PlayPostButton.SetActive(false);
        PausePostButton.SetActive(false);
        StopPostButton.SetActive(false);

        graphGO       = Instantiate(graphPrefab) as GameObject;
        graphGOBottom = Instantiate(graphPrefabBottom) as GameObject;

        graph       = graphGO.GetComponent <WMG_Axis_Graph>();
        graphBottom = graphGOBottom.GetComponent <WMG_Axis_Graph>();

        graph.changeSpriteParent(graphGO, TopPlotPanel);
        graphBottom.changeSpriteParent(graphGOBottom, BottomPlotPanel);

        graph.lineSeries[0].GetComponent <WMG_Series>().hideLines        = true;
        graph.lineSeries[0].GetComponent <WMG_Series>().hidePoints       = true;
        graph.lineSeries[1].GetComponent <WMG_Series>().hideLines        = true;
        graph.lineSeries[1].GetComponent <WMG_Series>().hidePoints       = true;
        graphBottom.lineSeries[0].GetComponent <WMG_Series>().hideLines  = true;
        graphBottom.lineSeries[0].GetComponent <WMG_Series>().hidePoints = true;
        graphBottom.lineSeries[1].GetComponent <WMG_Series>().hideLines  = true;
        graphBottom.lineSeries[1].GetComponent <WMG_Series>().hidePoints = true;

        PopulateLists();
        InitializeDropdowns();

        play_bool      = false;
        post_plotting  = false;
        already_played = false;
        UpdateFrame    = PhysioThread.BodyMoveUpdateFrame;
        current_time   = 0;
        delta_time     = 0;
    }
Пример #7
0
    public void StopPlotting()
    {
        s1.StopRealTimeUpdate();
        s2.StopRealTimeUpdate();

        s3.StopRealTimeUpdate();
        s4.StopRealTimeUpdate();

        StartButton.SetActive(false);
        StopButton.SetActive(false);
        NewSessionButton.SetActive(true);
        TopPlotPanel.SetActive(false);
        BottomPlotPanel.SetActive(false);
        TopPostPlotPanel.SetActive(true);
        BottomPostPlotPanel.SetActive(true);
        PlayPostButton.SetActive(true);
        PausePostButton.SetActive(false);
        StopPostButton.SetActive(true);
        CheckNodesButton.SetActive(false);
        PostPlotResults();
        post_plotting = true;
        frame         = 0;
    }