Ejemplo n.º 1
0
        public Mdl(mdl_t mdlTStruct,
				   texgroup_struct[] tgs,
				   stvert_t[] vertData,
				   dtriangle_t[] triData,
				   frame_struct[] frame
				   )
        {
            this.header = mdlTStruct;
            this.texGroup = tgs;
            this.vertex = vertData;
            this.triangle = triData;
            this.frame = frame;
        }
Ejemplo n.º 2
0
        private dtriangle_t[] readTriangleData(mdl_t mdlTStruct, System.IO.FileStream fstream)
        {
            dtriangle_t[] triData = new dtriangle_t[mdlTStruct.numtris];

            for(int tri_num = 0; tri_num < mdlTStruct.numtris; tri_num++){
                triData[tri_num].vertindex = new int[3];
                triData[tri_num].facesfront = readInt(fstream);

                for(int i = 0; i < 3; i++){
                    triData[tri_num].vertindex[i] = readInt(fstream);
                }
            }

            return triData;
        }