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(); } }
/// <summary> /// Creates a new control. /// </summary> protected Control() { Scale = InterfaceScale.Medium; }