Summary description for hlmt.
Exemplo n.º 1
0
        /// <summary>
        /// The dispose.
        /// </summary>
        /// <remarks></remarks>
        public void Dispose()
        {
            this.BoundingBox = null;
            this.Display = null;
            this.hlmt = null;
            this.LOD = null;
            this.RawDataMetaChunks = null;
            for (int i = 0; i < this.Shaders.Shader.Length; i++)
            {
                this.Shaders.Shader[i].Bitmaps.Clear();
                this.Shaders.Shader[i].BitmapNames.Clear();
            }

            this.Shaders = null;
            GC.SuppressFinalize(this);
        }
Exemplo n.º 2
0
        /// <summary>
        /// The h 2 parsed model.
        /// </summary>
        /// <param name="meta">The meta.</param>
        /// <remarks></remarks>
        public void H2ParsedModel(ref Meta meta)
        {
            if (meta.MS.Length == 0)
            {
                return;
            }

            string[] temps = meta.name.Split('\\');
            name = temps[temps.Length - 1];
            BoundingBox = new BoundingBoxContainer(ref meta);

            BinaryReader BR = new BinaryReader(meta.MS);
            BR.BaseStream.Position = 36;
            int tempc = BR.ReadInt32();
            int tempr = BR.ReadInt32() - meta.magic - meta.offset;
            RawDataMetaChunks = new RawDataMetaChunk[tempc];
            for (int x = 0; x < tempc; x++)
            {
                RawDataMetaChunks[x] = new RawDataMetaChunk(tempr + (x * 92), x, BoundingBox, ref meta);
            }

            Shaders = new ShaderContainer(ref meta);

            LOD = new LODInfo(ref meta, ref RawDataMetaChunks);

            int temphlmt = -1;
            for (int x = 0; x < meta.Map.IndexHeader.metaCount; x++)
            {
                if ("hlmt" == meta.Map.MetaInfo.TagType[x] && meta.Map.FileNames.Name[x] == meta.name)
                {
                    temphlmt = x;
                    break;
                }
            }

            if (temphlmt != -1)
            {
                hlmt = new hlmtContainer(temphlmt, meta.Map);
                PermutationString = hlmt.Permutations.Name;
            }

            // ** Length of Distance LOD
            Display = DisplayedInfo.FindDisplayedPieces(4, this);

            Frames = new FrameHierarchy();
            Frames.GetFramesFromHalo2Model(ref meta);
        }