// -------------------------------------------------------------------------------------------------------------------- // // Copyright (c) VRMADA, All rights reserved. // // -------------------------------------------------------------------------------------------------------------------- namespace UltimateXR.Core { public static class UxrUtils { #region Public Methods /// /// Gets the opposite side. /// /// Side /// Opposite side public static UxrHandSide GetOppositeSide(UxrHandSide handSide) { return handSide == UxrHandSide.Left ? UxrHandSide.Right : UxrHandSide.Left; } /// /// Builds a flags enum using booleans. /// /// Whether to add the translation flag /// Whether to add the rotate flag /// Whether to add the scale flag /// Flags public static UxrTransformations BuildTransformations(bool translate = false, bool rotate = false, bool scale = false) { UxrTransformations transformations = UxrTransformations.None; if (translate) { transformations |= UxrTransformations.Translate; } if (rotate) { transformations |= UxrTransformations.Rotate; } if (scale) { transformations |= UxrTransformations.Scale; } return transformations; } #endregion } }