示例#1
0
    public void SwitchBorders()
    {
        bordersOn = !bordersOn;
        UserTrackerVisualization utv = FindObjectOfType <UserTrackerVisualization>();

        if (utv != null)
        {
            utv.SetShaderProperties(backgroundColors[currentBGColor], bordersOn);
        }

        UserTrackerVisMesh utvm = FindObjectOfType <UserTrackerVisMesh>();

        if (utvm != null)
        {
            utvm.SetShaderProperties((currentBGColor == 0), bordersOn);
        }
    }
示例#2
0
    public void SwitchBackground(bool bgEnabled)
    {
        currentBGColor = bgEnabled ? 0 : 1;
        //currentBGColor = (currentBGColor + 1) % backgroundColors.Length;
        UserTrackerVisualization utv = FindObjectOfType <UserTrackerVisualization>();

        if (utv != null)
        {
            utv.SetShaderProperties(backgroundColors[currentBGColor], bordersOn);
        }

        UserTrackerVisMesh utvm = FindObjectOfType <UserTrackerVisMesh>();

        if (utvm != null)
        {
            utvm.SetShaderProperties((currentBGColor == 0), bordersOn);
        }
    }
    public void SwitchDepthVisualisation(bool meshEnabled)
    {
        UserTrackerVisualization utv = FindObjectOfType <UserTrackerVisualization>();

        if (utv != null)
        {
            utv.SetActive(!meshEnabled);
        }

        UserTrackerVisMesh utvm = FindObjectOfType <UserTrackerVisMesh>();

        if (utvm != null)
        {
            utvm.SetActive(meshEnabled);
        }

        SwitchBackground(tBackground.isOn);
    }