//---------------------------------------------------------------------------------------------------------

    public unsafe MD2File(byte[] md2File)
    {
        RawFile = md2File;

        fixed(byte *pRawData = &md2File[0])
        {
            Header = *(MD2Header *)pRawData;
        }
    }
예제 #2
0
        public MD2Model(string path)
        {
            //load model here
            if (!File.Exists(path))
                return;

            Header = new MD2Header();
            Reader = new FileStream(path, FileMode.Open);

            boxedHeader = ParseHeader();
            Header = (MD2Header)boxedHeader;

            Vertices = new List<Vertex>();
        }