public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|-----|" + ChunkHeader.W3D_CHUNK_DEFORM_DATA);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_DEFORM_DATA;
            HeaderName = ChunkHeader.W3D_CHUNK_DEFORM_DATA.ToString();

            for (int i = 0; i < chunkLength / 28; i++)
            {
                vertex_index = br.ReadInt32();
                position = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle());

                int R = br.ReadByte();
                int G = br.ReadByte();
                int B = br.ReadByte();
                int A = br.ReadByte();

                color = Color.FromArgb(A, R, G, B);

                //reserved
                for (int i2 = 0; i2 < 2; i2++)
                {
                    reserved[i2] = br.ReadInt32();
                }
            }
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int endPosition)
        {
            if (dbg) Console.Out.WriteLine("|-| " + ChunkHeader.W3D_CHUNK_COMPRESSED_ANIMATION);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_COMPRESSED_ANIMATION;
            HeaderName = ChunkHeader.W3D_CHUNK_COMPRESSED_ANIMATION.ToString();
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|--| " + ChunkHeader.W3D_CHUNK_HMODEL_HEADER);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_HMODEL_HEADER;
            HeaderName = ChunkHeader.W3D_CHUNK_HMODEL_HEADER.ToString();

            version = br.ReadInt32();
            byte[] nameArray = br.ReadBytes(16);
            name = System.Text.ASCIIEncoding.ASCII.GetString(nameArray);
            byte[] hierarchyNameArray = br.ReadBytes(16);
            hierarchy_name = System.Text.ASCIIEncoding.ASCII.GetString(hierarchyNameArray);
            num_connections = br.ReadInt16();

            //Not sure what the rest of the structure is, so iterate over the remaining bytes.
            br.ReadBytes(chunkLength - 38);

            if (dbg)
            {
                Console.Out.WriteLine("\t Version: " + version);
                Console.Out.WriteLine("\t Name: " + name);
                Console.Out.WriteLine("\t Hierarchy Name: " + hierarchy_name);
                Console.Out.WriteLine("\t Number Of Connections: " + num_connections);
            }
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|-|" + ChunkHeader.W3D_CHUNK_HIERARCHY);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_BOX;
            HeaderName = ChunkHeader.W3D_CHUNK_BOX.ToString();
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|--| " + ChunkHeader.W3D_CHUNK_COMPRESSED_ANIMATION_CHANNEL);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_COMPRESSED_ANIMATION_CHANNEL;
            HeaderName = ChunkHeader.W3D_CHUNK_COMPRESSED_ANIMATION_CHANNEL.ToString();

            long beginPos = br.BaseStream.Position;
            last_frame = br.ReadInt16();
            first_frame = br.ReadInt16();
            pivot = br.ReadInt16();
            channel_type = br.ReadInt16();
            vector_length = br.ReadInt32();

            if (dbg)
            {
                Console.Out.WriteLine("\t First Frame: " + first_frame);
                Console.Out.WriteLine("\t Last Frame: " + last_frame);
                Console.Out.WriteLine("\t Channel Type: " + channel_type);
                Console.Out.WriteLine("\t Pivot ID: " + pivot);
                Console.Out.WriteLine("\t Vector Length: " + vector_length);
            }

            //Skip over unkown structure.
            br.BaseStream.Position = beginPos + chunkLength;
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|----| " + ChunkHeader.W3D_CHUNK_STAGE_TEXCOORDS);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_STAGE_TEXCOORDS;
            HeaderName = ChunkHeader.W3D_CHUNK_STAGE_TEXCOORDS.ToString();

            int NumTexCoords = chunkLength / 8;
            object[] uv = new object[2];
            tex_coord_data = new object[NumTexCoords][];

            for (int i = 0; i < NumTexCoords; i++)
            {
                uv[0] = br.ReadSingle();
                uv[1] = br.ReadSingle();

                tex_coord_data[i] = uv;

                if (dbg)
                {
                    Console.Out.WriteLine("\t Tex Coord #" + i);
                    Console.Out.WriteLine("\t U: " + uv[0] + " V: " + uv[1]);
                }
            }
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int endPosition)
        {
            if (dbg) Console.Out.WriteLine("|--| " + ChunkHeader.W3D_CHUNK_HIERARCHY_HEADER);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_HIERARCHY_HEADER;
            HeaderName = ChunkHeader.W3D_CHUNK_HIERARCHY_HEADER.ToString();

            version = br.ReadInt32();
            byte[] nameArray = br.ReadBytes(16);
            name = System.Text.ASCIIEncoding.ASCII.GetString(nameArray);
            numPivots = br.ReadInt32();
            float x = br.ReadUInt32();
            float y = br.ReadUInt32();
            float z = br.ReadUInt32();

            center = new Vector3(x, y, z);

            if (dbg)
            {
                Console.Out.WriteLine("\t Version: " + version);
                Console.Out.WriteLine("\t Name: " + name);
                Console.Out.WriteLine("\t NumPivots: " + numPivots);
                Console.Out.WriteLine("\t Center: (" + center.X + ", " + center.Y + ", " + center.Z + ")");
            }
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|--| " + ChunkHeader.W3D_CHUNK_HLOD_PROXY_ARRAY);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_HLOD_PROXY_ARRAY;
            HeaderName = ChunkHeader.W3D_CHUNK_HLOD_PROXY_ARRAY.ToString();
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int endPosition)
        {
            if (dbg) Console.Out.WriteLine("|--| " + ChunkHeader.W3D_CHUNK_PRELIT_LIGHTMAP_MULTI_PASS);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_PRELIT_LIGHTMAP_MULTI_PASS;
            HeaderName = ChunkHeader.W3D_CHUNK_PRELIT_LIGHTMAP_MULTI_PASS.ToString();
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|--| " + ChunkHeader.W3D_CHUNK_COMPRESSED_BIT_CHANNEL);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_COMPRESSED_BIT_CHANNEL;
            HeaderName = ChunkHeader.W3D_CHUNK_COMPRESSED_BIT_CHANNEL.ToString();

            long beginPos = br.BaseStream.Position;
            default_val = 0;
            last_frame = br.ReadInt16();
            first_frame = br.ReadInt16();
            pivot = br.ReadInt16();
            flags = br.ReadInt16();
            default_val = br.ReadByte();

            if (dbg)
            {
                Console.Out.WriteLine("\t First Frame: " + first_frame);
                Console.Out.WriteLine("\t Last Frame: " + last_frame);
                Console.Out.WriteLine("\t Flags: " + flags);
                Console.Out.WriteLine("\t Pivot: " + pivot);
                Console.Out.WriteLine("\t Default Value: " + default_val);
            }

            //Skip over unkown structure.
            br.BaseStream.Position = beginPos + chunkLength;
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|---| " + ChunkHeader.W3D_CHUNK_AABTREE_NODES);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_AABTREE_NODES;
            HeaderName = ChunkHeader.W3D_CHUNK_AABTREE_NODES.ToString();

            num_nodes = chunkLength / 32;
            node_info = new object[NumNodes][];

            for (int i = 0; i < NumNodes; i++)
            {
                object[] info = new object[4];

                Vector3 Min = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle());
                Vector3 Max = new Vector3(br.ReadSingle(), br.ReadSingle(), br.ReadSingle());

                int Poly0 = br.ReadInt32();
                int PolyCount = br.ReadInt32();

                if (dbg)
                {
                    Console.Out.WriteLine("\t\t Node " + i + " Min: " + Min);
                    Console.Out.WriteLine("\t\t Node " + i + " Max: " + Min);
                    Console.Out.WriteLine("\t\t Node " + i + " Poly0: " + Poly0);
                    Console.Out.WriteLine("\t\t Node " + i + " PolyCount: " + PolyCount);
                }

                info[0] = Min;
                info[1] = Max;
                info[2] = Poly0;
                info[3] = PolyCount;
                node_info[i] = info;
            }
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int endPosition)
        {
            if (dbg) Console.Out.WriteLine("|---| " + ChunkHeader.W3D_CHUNK_TEXTURE);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_TEXTURE;
            HeaderName = ChunkHeader.W3D_CHUNK_TEXTURE.ToString();
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|--| " + ChunkHeader.W3D_CHUNK_PIVOTS);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_PIVOTS;
            HeaderName = ChunkHeader.W3D_CHUNK_PIVOTS.ToString();

            int NumPivots = chunkLength / 60;
            pivot_data = new object[NumPivots][];

            for (int i = 0; i < NumPivots ; i++)
            {
                byte[] pivotNameArray = br.ReadBytes(16);
                String PivotName = System.Text.ASCIIEncoding.ASCII.GetString(pivotNameArray);
                int ParentID = br.ReadInt32();

                Vector3 translation = new Vector3();
                translation.X = br.ReadSingle();
                translation.Y = br.ReadSingle();
                translation.Z = br.ReadSingle();

                Vector3 eularAngle = new Vector3();
                eularAngle.X = br.ReadSingle();
                eularAngle.Y = br.ReadSingle();
                eularAngle.Z = br.ReadSingle();

                float[] rotation = new float[4];
                rotation[0] = br.ReadSingle();
                rotation[1] = br.ReadSingle();
                rotation[2] = br.ReadSingle();
                rotation[3] = br.ReadSingle();

                Object[] pivotValues = new Object[5];
                pivotValues[0] = PivotName;
                pivotValues[1] = ParentID;
                pivotValues[2] = translation;
                pivotValues[3] = eularAngle;
                pivotValues[4] = rotation;

                pivot_data[i] = pivotValues;

                if (dbg)
                {
                    Console.Out.WriteLine("\t Pivot #" + i + " Name: " + PivotName);
                    Console.Out.WriteLine("\t Parent ID: " + ParentID);
                    Console.Out.WriteLine("\t Translation: (" + translation.X + ", "
                        + translation.Y + ", " + translation.Z + ")");
                    Console.Out.WriteLine("\t Eular Angles: (" + eularAngle.X + ", "
                            + eularAngle.Y + ", " + eularAngle.Z + ")");
                    Console.Out.WriteLine("\t Rotation: (" + rotation[0] + ", "
                            + rotation[1] + ", " + rotation[2] + ", " + rotation[3]
                            + ")");
                }
            }
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|--| " + ChunkHeader.W3D_CHUNK_EMITTER_ROTATION_KEYFRAMES);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_EMITTER_ROTATION_KEYFRAMES;
            HeaderName = ChunkHeader.W3D_CHUNK_EMITTER_ROTATION_KEYFRAMES.ToString();

            key_frame_count = br.ReadInt32();
            random = br.ReadSingle();
            orientation_random = br.ReadSingle();
            int reserved = br.ReadInt32();
            rotational_velocity_keyframe_data = new object[key_frame_count][];

            if(dbg){
                Console.Out.WriteLine("\t  Key Frame Count: "+key_frame_count);
                Console.Out.WriteLine("\t  Random: "+random);
                Console.Out.WriteLine("\t  Orientation Random: "+orientation_random);
            }

            float[] rotation = new float[key_frame_count];
            float[] time = new float[key_frame_count];
            object[] tmp = new object[2];

            if (key_frame_count == 0){

                time[0] = br.ReadSingle();
                rotation[0] = br.ReadSingle();

                tmp[0] = time;
                tmp[1] = rotation;
                rotational_velocity_keyframe_data[0] = tmp;

                if(dbg){
                    Console.Out.WriteLine("\t  ********** Rotational Velocity KeyFrame 0 **********");
                    Console.Out.WriteLine("\t  Time: "+time);
                    Console.Out.WriteLine("\t  Rotation Velocity: "+rotation);
                }

            }else{
                for (int i = 0; i < key_frame_count; i++) {
                    time[i] = br.ReadSingle();
                    rotation[i] = br.ReadSingle();

                    tmp[0] = time;
                    tmp[1] = rotation;
                    rotational_velocity_keyframe_data[i] = tmp;

                    if(dbg){
                        Console.Out.WriteLine("\t  ********** Rotational Velocity KeyFrame "+i+"**********");
                        Console.Out.WriteLine("\t  Time: "+time);
                        Console.Out.WriteLine("\t  Rotation Velocity: "+rotation);
                    }
                }
            }
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|--| " + ChunkHeader.W3D_CHUNK_EMITTER_FRAME_KEYFRAMES);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_EMITTER_FRAME_KEYFRAMES;
            HeaderName = ChunkHeader.W3D_CHUNK_EMITTER_FRAME_KEYFRAMES.ToString();

            key_frame_count = br.ReadInt32();
            random = br.ReadSingle();

            int[] reserved = new int[2];
            for (int i = 0; i < 2; i++) {
                reserved[i] = br.ReadInt32();
            }

            if(dbg){
                Console.Out.WriteLine("\t  Key Frame Count: " + key_frame_count);
                Console.Out.WriteLine("\t  Random: "+random);
            }

            if (key_frame_count == 0)
            {

                time = new float[1];
                frame_index = new float[1];

                frame_index[0] = br.ReadSingle();
                time[0] = br.ReadSingle();

                if(dbg){
                    Console.Out.WriteLine("\t  ********** Frame KeyFrame 0 **********");
                    Console.Out.WriteLine("\t  Time: "+time[0]);
                    Console.Out.WriteLine("\t  Frame (sub-texture Index): " + frame_index[0]);
                }

            }else{
                int Count = (chunkLength - 16) / 8;
                time = new float[Count];
                frame_index = new float[Count];

                for (int i = 0; i < Count; i++) {
                    frame_index[i] = br.ReadSingle();
                    time[i] = br.ReadSingle();

                    if(dbg){
                        Console.Out.WriteLine("\t  ********** Frame KeyFrame "+i+"**********");
                        Console.Out.WriteLine("\t  Time: "+time[i]);
                        Console.Out.WriteLine("\t  Frame (sub-texture Index): " + frame_index[i]);
                    }
                }
            }
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|-|" + ChunkHeader.W3D_CHUNK_DEFORM);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_DEFORM;
            HeaderName = ChunkHeader.W3D_CHUNK_DEFORM.ToString();

            set_count = br.ReadInt32();
            alpha_passes = br.ReadInt32();

            //reserved
            br.ReadBytes(chunkLength - 8);
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|--| " + ChunkHeader.W3D_CHUNK_TEXTURE_REPLACER_INFO);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_TEXTURE_REPLACER_INFO;
            HeaderName = ChunkHeader.W3D_CHUNK_TEXTURE_REPLACER_INFO.ToString();

            replaced_textures_count = br.ReadInt32();

            if (dbg)
            {
                Console.Out.WriteLine("\t Replaced Textures Count: " + replaced_textures_count);
            }
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|----| " + ChunkHeader.W3D_CHUNK_VERTEX_MAPPER_ARGS1);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_VERTEX_MAPPER_ARGS1;
            HeaderName = ChunkHeader.W3D_CHUNK_VERTEX_MAPPER_ARGS1.ToString();

            mapper_args = br.ReadChars(chunkLength).ToString();

            if (dbg)
            {
                Console.Out.WriteLine("\t\t Stage1 Mapper Args: " + mapper_args);
            }
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|----| " + ChunkHeader.W3D_CHUNK_VERTEX_MAPPER_ARGS0);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_VERTEX_MAPPER_ARGS0;
            HeaderName = ChunkHeader.W3D_CHUNK_VERTEX_MAPPER_ARGS0.ToString();

            byte[] MapperArgsArray = br.ReadBytes(chunkLength);
            mapper_args = System.Text.ASCIIEncoding.ASCII.GetString(MapperArgsArray);

            if (dbg)
            {
                Console.Out.WriteLine("\t\t Stage0 Mapper Args: " + mapper_args);
            }
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|--| " + ChunkHeader.W3D_CHUNK_DAZZLE_NAME);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_DAZZLE_NAME;
            HeaderName = ChunkHeader.W3D_CHUNK_DAZZLE_NAME.ToString();

            byte[] nameArray = br.ReadBytes(chunkLength);
            name = System.Text.ASCIIEncoding.ASCII.GetString(nameArray);

            if (dbg)
            {
                Console.Out.WriteLine("\t Dazzle Name: " + Name.Trim());
            }
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|----| " + ChunkHeader.W3D_CHUNK_TEXTURE_NAME);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_TEXTURE_NAME;
            HeaderName = ChunkHeader.W3D_CHUNK_TEXTURE_NAME.ToString();

            byte[] textureNameArray = br.ReadBytes(chunkLength);
            texture_name = System.Text.ASCIIEncoding.ASCII.GetString(textureNameArray);

            if (dbg)
            {
                Console.Out.WriteLine("\t\t Texture Name: " + texture_name);
            }
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|--| " + ChunkHeader.W3D_CHUNK_MESH_USER_TEXT);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_MESH_USER_TEXT;
            HeaderName = ChunkHeader.W3D_CHUNK_MESH_USER_TEXT.ToString();

            byte[] nameArray = br.ReadBytes(chunkLength);
            user_text = System.Text.ASCIIEncoding.ASCII.GetString(nameArray);

            if (dbg)
            {
                Console.Out.WriteLine("\t\t Mesh User Text: " + UserText.Trim());
            }
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|----| " + ChunkHeader.W3D_CHUNK_VERTEX_MATERIAL_NAME);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_VERTEX_MATERIAL_NAME;
            HeaderName = ChunkHeader.W3D_CHUNK_VERTEX_MATERIAL_NAME.ToString();

            byte[] MaterialNameArray = br.ReadBytes(chunkLength);
            material_name = System.Text.ASCIIEncoding.ASCII.GetString(MaterialNameArray);

            if (dbg)
            {
                Console.Out.WriteLine("\t\t Material Name: " + MaterialName);
            }
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|--| " + ChunkHeader.W3D_CHUNK_TRANSFORM_NODE);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_TRANSFORM_NODE;
            HeaderName = ChunkHeader.W3D_CHUNK_TRANSFORM_NODE.ToString();

            byte[] nameArray = br.ReadBytes(chunkLength);
            name = System.Text.ASCIIEncoding.ASCII.GetString(nameArray);

            if (dbg)
            {
                Console.Out.WriteLine("\t\t Transform Node W3D FileName: " + name.Trim());
            }
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|--| " + ChunkHeader.W3D_CHUNK_EMITTER_BLUR_TIME_KEYFRAMES);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_EMITTER_BLUR_TIME_KEYFRAMES;
            HeaderName = ChunkHeader.W3D_CHUNK_EMITTER_BLUR_TIME_KEYFRAMES.ToString();

            key_frame_count = br.ReadInt32();
            random = br.ReadSingle();
            reserved = br.ReadInt32();

            if(dbg){
                Console.Out.WriteLine("\t  Key Frame Count: " + key_frame_count);
                Console.Out.WriteLine("\t  Random: "+random);
            }

            if (key_frame_count == 0)
            {

                time = new float[1];
                blur_time = new float[1];

                time[0] = br.ReadSingle();
                blur_time[0] = br.ReadSingle();

                if(dbg){
                    Console.Out.WriteLine("\t  ********** Blur Time KeyFrame 0 **********");
                    Console.Out.WriteLine("\t  Time: "+time);
                    Console.Out.WriteLine("\t  Blur Time: "+blur_time);
                }

            }else{
                time = new float[key_frame_count];
                blur_time = new float[key_frame_count];

                for (int i = 0; i < key_frame_count; i++)
                {
                    time[i] = br.ReadSingle();
                    blur_time[i] = br.ReadSingle();

                    if(dbg){
                        Console.Out.WriteLine("\t  ********** Blur Time KeyFrame "+i+"**********");
                        Console.Out.WriteLine("\t  Time: "+time);
                        Console.Out.WriteLine("\t  Blur Time: "+blur_time);
                    }
                }
            }
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|--|" + ChunkHeader.W3D_CHUNK_DEFORM_SET);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_DEFORM_SET;
            HeaderName = ChunkHeader.W3D_CHUNK_DEFORM_SET.ToString();

            for (int i = 0; i < chunkLength / 12; i++)
            {
                keyframe_count = br.ReadInt32();
                flags = br.ReadInt32();

                //reserved
                br.ReadInt32();
            }
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int endPosition)
        {
            if (dbg) Console.Out.WriteLine("|---| " + ChunkHeader.W3D_CHUNK_HLOD_SUB_OBJECT_ARRAY_HEADER);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_HLOD_SUB_OBJECT_ARRAY_HEADER;
            HeaderName = ChunkHeader.W3D_CHUNK_HLOD_SUB_OBJECT_ARRAY_HEADER.ToString();

            model_count = br.ReadInt32();
            max_screen_size = br.ReadSingle();

            if (dbg)
            {
                Console.Out.WriteLine("\t\t Model Count: " + model_count);
                Console.Out.WriteLine("\t\t Max Screen Size: " + max_screen_size);
            }
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int endPosition)
        {
            if (dbg) Console.Out.WriteLine("|--| " + ChunkHeader.W3D_CHUNK_AGGREGATE_HEADER);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_AGGREGATE_HEADER;
            HeaderName = ChunkHeader.W3D_CHUNK_AGGREGATE_HEADER.ToString();

            version = br.ReadInt32();
            byte[] nameArray = br.ReadBytes(16);
            name = System.Text.ASCIIEncoding.ASCII.GetString(nameArray);

            if (dbg)
            {
                Console.Out.WriteLine("\t Version: " + version);
                Console.Out.WriteLine("\t Name: " + name);
            }
        }
Esempio n. 29
0
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|--| " + ChunkHeader.W3D_CHUNK_NODE);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_NODE;
            HeaderName = ChunkHeader.W3D_CHUNK_NODE.ToString();

            byte[] renderObjNameArray = br.ReadBytes(chunkLength - 2);
            render_object_name = System.Text.ASCIIEncoding.ASCII.GetString(renderObjNameArray);
            pivot_id = br.ReadInt16();

            if (dbg)
            {
                Console.Out.WriteLine("\t Render Object Name: " + render_object_name);
                Console.Out.WriteLine("\t Pivot Id: " + pivot_id);
            }
        }
        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int chunkLength)
        {
            if (dbg) Console.Out.WriteLine("|----| " + ChunkHeader.W3D_CHUNK_TEXTURE_INFO);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_TEXTURE_INFO;
            HeaderName = ChunkHeader.W3D_CHUNK_TEXTURE_INFO.ToString();

            attributes = br.ReadInt32();
            frame_count = br.ReadInt32();
            frame_rate = br.ReadSingle();

            if (dbg)
            {
                Console.Out.WriteLine("\t\t   Attributes: " + attributes);
                Console.Out.WriteLine("\t\t   Frame Count: " + frame_count);
                Console.Out.WriteLine("\t\t   Frame Rate: " + frame_rate);
            }
        }