예제 #1
0
        public static CubeData getCubeDataFromDL(string DLname)
        {
            CubeDataCont data = findDataContFromName(DLname);

            if (data.cubeDataName == null)
            {
                CubeData cd = new CubeData();
                cd.x1 = -32768;
                cd.x2 = 32767;
                cd.y1 = -32768;
                cd.y2 = 32767;
                cd.z1 = -32768;
                cd.z2 = 32767;
            }
            return(data.data);
        }
예제 #2
0
        public static OBJs.CubeData getCubeDataFromF3DFile(string[] lines) //yeah sorry i make it check the whole file, just did this for convenience and also cause objects should be more accurately represented
        {
            CubeData data = new CubeData();

            string[] vs;
            if (lines == null)
            {
                return(data);
            }
            foreach (string line in lines)
            {
                vs = MISCUtils.ParseAsmbd(line);
                if (vs[0] == "vertex")
                {
                    data.updateCubeData((short)(MISCUtils.ParseInt(vs[1]) >> 4), (short)(MISCUtils.ParseInt(vs[2]) >> 4), (short)(MISCUtils.ParseInt(vs[3]) >> 4));
                }
            }
            return(data);
        }