示例#1
0
    public void SetupAxes(InterfaceScale interfaceScale, bool withSphere)
    {
        float axesLength = 1.0f;

        switch (interfaceScale)
        {
        case InterfaceScale.Small:
            axesLength = Helpers.GetAxesLengthForDistance(ObjectManager.Instance.SessionManager.UserArmHinged);
            break;

        case InterfaceScale.Large:
            axesLength = Helpers.GetAxesLengthForDistance(ObjectManager.Instance.SessionManager.UserArmOutstretched);
            break;

        default:
            Debug.LogError("unhandled interfaceScale: " + interfaceScale);
            break;
        }

        AxesGameObject.gameObject.SetActive(true);
        AxesGameObject.SetAxesSize(axesLength, axesLength / Constants.DefaultAxesLengthToWidthRatio, axesWireframe);

        if (withSphere)
        {
            SetupRadiusSphere();
        }
    }
示例#2
0
 /// <summary>
 /// Creates a new control.
 /// </summary>
 protected Control()
 {
     Scale = InterfaceScale.Medium;
 }