コード例 #1
0
ファイル: LogicalSceneGraph.cs プロジェクト: doug8679/libJT
        protected override void ReadV10(ByteReader reader)
        {
            // First, read the compression header (first element in segment data)
            ElementHeader head = new LogicalElementHeaderZlib();
            head.Read( reader, 10 );
            Element e = Element.Create( head, reader, head.ObjectTypeID, 10 );
            e.Read( reader, 10 );
            Elements.Add( e );

            // Read Graph Elements
            head = new LogicalElementHeader();
            head.Read( reader, 10 );
            while ( !head.ObjectTypeID.Equals( Element.EndOfElements ) ) {
                e = Element.Create( head, reader, head.ObjectTypeID, 10 );
                e.Read( reader, 10 );
                Elements.Add( e );
                head = new LogicalElementHeader();
                head.Read( reader, 10 );
            }

            // Read Property Atoms
            head = new LogicalElementHeader();
            head.Read( reader, 10 );
            while ( !head.ObjectTypeID.Equals( Element.EndOfElements ) ) {
                e = Element.Create( head, reader, head.ObjectTypeID, 10 );
                e.Read( reader, 10 );
                Properties.Add( e );
                head = new LogicalElementHeader();
                head.Read( reader, 10 );
            }

            // Attempt to read property table:
            PropertyTable.Read( reader);
            reader.Inflate();
        }
コード例 #2
0
ファイル: FileSegment.cs プロジェクト: doug8679/libJT
 protected override void ReadV8(ByteReader reader)
 {
     int len = 24;
     // First, read the compression header (first element in segment data)
     ElementHeader head = new LogicalElementHeader();
     head.Read(reader, 8);
     Element e = Element.Create( head, reader, head.ObjectTypeID, 8 );
     e.Read( reader, 8 );
     Elements.Add( e );
     len += head.Length;
     while ( len < Header.SegmentLength ) {
         head = new LogicalElementHeader();
         head.Read( reader, 8 );
         if ( head.ObjectTypeID.Equals( Element.EndOfElements ) )
             break;
         e = Element.Create( head, reader, head.ObjectTypeID, 8 );
         e.Read( reader, 8 );
         Elements.Add( e );
         len += head.Length;
     }
 }