Ejemplo n.º 1
0
        public static float GetFloat(FLOAT_DATA_TYPE type, int userIndex = 0)
        {
            switch (type)
            {
            case FLOAT_DATA_TYPE.AudioBeat:
                return(AudioProcessor.GetBeat());

            case FLOAT_DATA_TYPE.AudioLevel:
                return(AudioProcessor.GetLevel());

            case FLOAT_DATA_TYPE.HandsHorizontalSeparation:
                return(CVInterface.GetFloat(FLOAT_DATA_TYPE.HandsHorizontalSeparation, userIndex));

            case FLOAT_DATA_TYPE.HandsVerticalSeparation:
                return(CVInterface.GetFloat(FLOAT_DATA_TYPE.HandsVerticalSeparation));

            case FLOAT_DATA_TYPE.HandsToPelvisFactor:
                return(CVInterface.GetFloat(FLOAT_DATA_TYPE.HandsToPelvisFactor));

            case FLOAT_DATA_TYPE.UserHorizontalPosition:
                return(CVInterface.GetFloat(FLOAT_DATA_TYPE.UserHorizontalPosition));

            case FLOAT_DATA_TYPE.PelvisToLeftHand:
                return(CVInterface.GetFloat(FLOAT_DATA_TYPE.PelvisToLeftHand, userIndex));

            case FLOAT_DATA_TYPE.PelvisToRightHand:
                return(CVInterface.GetFloat(FLOAT_DATA_TYPE.PelvisToRightHand, userIndex));

            case FLOAT_DATA_TYPE.AmplitudeSetting:
                return(CVInterface.GetFloat(FLOAT_DATA_TYPE.AmplitudeSetting));

            default:
                return(0.0f);
            }
        }
Ejemplo n.º 2
0
        public static float GetFloat(FXDataProvider.FLOAT_DATA_TYPE type, int userIndex = 0)
        {
            if (!AreDatasAvailable())
            {
                return(0.0f);
            }


            ulong userID = _Instance.KManager.GetUserIdByIndex(userIndex);

            _Instance.UpdateUserMetaBoneData(userID);

            switch (type)
            {
            case FXDataProvider.FLOAT_DATA_TYPE.HandsHorizontalSeparation:
                return(_Instance.UsersMetaDatas[userID].HandsHorizontalSeparation);

            case FXDataProvider.FLOAT_DATA_TYPE.HandsToPelvisFactor:
                return(_Instance.UsersMetaDatas[userID].HandsToPelvisFactor);

            case FXDataProvider.FLOAT_DATA_TYPE.HandsVerticalSeparation:
                return(_Instance.UsersMetaDatas[userID].HandsVerticalSeparation);

            case FXDataProvider.FLOAT_DATA_TYPE.UserHorizontalPosition:
                return(_Instance.UsersMetaDatas[userID].UserHorizontalPosition);

            case FXDataProvider.FLOAT_DATA_TYPE.PelvisToLeftHand:
                return(_Instance.UsersMetaDatas[userID].PelvisToLeftHand);

            case FXDataProvider.FLOAT_DATA_TYPE.PelvisToRightHand:
                return(_Instance.UsersMetaDatas[userID].PelvisToRightHand);

            case FXDataProvider.FLOAT_DATA_TYPE.AudioBeat:
                return(AudioProcessor.GetBeat());

            case FXDataProvider.FLOAT_DATA_TYPE.AudioLevel:
                return(AudioProcessor.GetLevel());

            case FXDataProvider.FLOAT_DATA_TYPE.AmplitudeSetting:
                return(AmplitudeLevel);

            default:
                return(0.0f);
            }
        }