Esempio n. 1
0
        public static Rect GetCulledBox(Rect totalRect, float previousLODPercentage)
        {
            Rect result = LODGroupGUI.CalcLODRange(totalRect, previousLODPercentage, 0f);

            result.height -= 2f;
            result.width  -= 1f;
            result.center += new Vector2(0f, 1f);
            return(result);
        }
Esempio n. 2
0
        public static List <LODGroupGUI.LODInfo> CreateLODInfos(int numLODs, Rect area, Func <int, string> nameGen, Func <int, float> heightGen)
        {
            List <LODGroupGUI.LODInfo> list = new List <LODGroupGUI.LODInfo>();

            for (int i = 0; i < numLODs; i++)
            {
                LODGroupGUI.LODInfo lODInfo = new LODGroupGUI.LODInfo(i, nameGen(i), heightGen(i));
                lODInfo.m_ButtonPosition = LODGroupGUI.CalcLODButton(area, lODInfo.ScreenPercent);
                float startPercent = (i != 0) ? list[i - 1].ScreenPercent : 1f;
                lODInfo.m_RangePosition = LODGroupGUI.CalcLODRange(area, startPercent, lODInfo.ScreenPercent);
                list.Add(lODInfo);
            }
            return(list);
        }
Esempio n. 3
0
        public static List <LODGroupGUI.LODInfo> CreateLODInfos(int numLODs, Rect area, Func <int, string> nameGen, Func <int, float> heightGen)
        {
            List <LODGroupGUI.LODInfo> lodInfoList = new List <LODGroupGUI.LODInfo>();

            for (int lodLevel = 0; lodLevel < numLODs; ++lodLevel)
            {
                LODGroupGUI.LODInfo lodInfo = new LODGroupGUI.LODInfo(lodLevel, nameGen(lodLevel), heightGen(lodLevel));
                lodInfo.m_ButtonPosition = LODGroupGUI.CalcLODButton(area, lodInfo.ScreenPercent);
                float startPercent = lodLevel != 0 ? lodInfoList[lodLevel - 1].ScreenPercent : 1f;
                lodInfo.m_RangePosition = LODGroupGUI.CalcLODRange(area, startPercent, lodInfo.ScreenPercent);
                lodInfoList.Add(lodInfo);
            }
            return(lodInfoList);
        }