当前位置: 首页>>代码示例>>C#>>正文


C# Utilities.ByteReader类代码示例

本文整理汇总了C#中libJT.Utilities.ByteReader的典型用法代码示例。如果您正苦于以下问题:C# ByteReader类的具体用法?C# ByteReader怎么用?C# ByteReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ByteReader类属于libJT.Utilities命名空间,在下文中一共展示了ByteReader类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: JTFile

 public JTFile(string filename)
     : this()
 {
     this.filename = filename;
     //reader = new BinaryReader(new FileStream(filename, FileMode.Open, FileAccess.Read));
     reader = new ByteReader(new BinaryReader(new FileStream(filename, FileMode.Open, FileAccess.Read)));
 }
开发者ID:doug8679,项目名称:libJT,代码行数:7,代码来源:JTFile.cs

示例2: Vers1ImageFormat

        public Vers1ImageFormat(ByteReader reader)
        {
            ImageTexelData = new List<byte>();
            _numBytes = reader.ReadI32();
            if ( _numBytes > 0 ) {
                PixelFormat = reader.ReadU32();
                PixelDataType = reader.ReadU32();
                Dimensionality = reader.ReadI16();
                Width = reader.ReadI32();
                Height = reader.ReadI32();
                MipmapsFlag = reader.ReadU32();
                SharedImageFlag = reader.ReadU32();

                for ( int i = 0; i < _numBytes; i++ ) {
                    ImageTexelData.Add( reader.ReadByte() );
                }

                MipmapMagnificationFilter = reader.ReadI32();
                MipmapMinificationFilter = reader.ReadI32();
                SDimenWrapMode = reader.ReadI32();
                TDimenWrapMode = reader.ReadI32();
                TextureFunctionData = reader.ReadI32();
                BlendColor = reader.ReadRGBA();
                TextureTransform = reader.ReadMx4F32();
            }
        }
开发者ID:doug8679,项目名称:libJT,代码行数:26,代码来源:TextureImage.cs

示例3: ReadV8

        protected override void ReadV8(ByteReader reader)
        {
            // First, read the compression header (first element in segment data)
            ElementHeader head = new LogicalElementHeaderZlib();
            head.Read(reader, 8);
            Element e = Element.Create(head, reader, head.ObjectTypeID, 8);
            e.Read(reader, 8);
            Elements.Add(e);

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

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

            // Attempt to read property table:
            PropertyTable.Read(reader, 8);
            reader.Inflate();
        }
开发者ID:doug8679,项目名称:libJT,代码行数:35,代码来源:LogicalSceneGraph.cs

示例4: ReadV8

        protected override void ReadV8(ByteReader reader)
        {
            base.ReadV8(reader);

            DataFlags = reader.ReadU16();
            if (( DataFlags & 0x0001 ) == 0x0001) {
                // Pattern bits are valid
                if (( DataFlags & 0x0002 ) == 0x0002) {
                    float c = reader.ReadF32();
                    AmbientColor = new[] {c, c, c, 1.0f};
                } else {
                    AmbientColor = reader.ReadRGBA();
                }
                DiffuseColor = reader.ReadRGBA();
                if ( ( DataFlags & 0x0004 ) == 0x0004 ) {
                    float c = reader.ReadF32();
                    SpecularColor = new[] { c, c, c, 1.0f };
                } else {
                    SpecularColor = reader.ReadRGBA();
                }
                if ( ( DataFlags & 0x0008 ) == 0x0008 ) {
                    float c = reader.ReadF32();
                    EmissionColor = new[] { c, c, c, 1.0f };
                } else {
                    EmissionColor = reader.ReadRGBA();
                }
            } else {
                AmbientColor = reader.ReadRGBA();
                DiffuseColor = reader.ReadRGBA();
                SpecularColor = reader.ReadRGBA();
                EmissionColor = reader.ReadRGBA();
            }
            Shininess = reader.ReadF32();
        }
开发者ID:doug8679,项目名称:libJT,代码行数:34,代码来源:MaterialBaseAttribute.cs

示例5: QuantizationParameters

 public QuantizationParameters(ByteReader reader)
 {
     BitsPerVertex = reader.ReadU8();
     NormalBitsFactor = reader.ReadU8();
     BitsPerTextureCoord = reader.ReadU8();
     BitsPerColor = reader.ReadU8();
 }
开发者ID:doug8679,项目名称:libJT,代码行数:7,代码来源:QuantizationParameters.cs

示例6: ReadV8

 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8( reader );
     VersionNumber = reader.ReadI16();
     DataFlags = reader.ReadU8();
     PointSize = reader.ReadF32();
 }
开发者ID:doug8679,项目名称:libJT,代码行数:7,代码来源:PointStyleAttribute.cs

示例7: ReadV8

 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8(reader);
     int children = reader.ReadI32();
     for (int i = 0; i < children; i++) {
         Children.Add(reader.ReadI32());
     }
 }
开发者ID:doug8679,项目名称:libJT,代码行数:8,代码来源:GroupNodeElement.cs

示例8: MaterialBaseAttribute

 public MaterialBaseAttribute(ElementHeader head, ByteReader reader, int version)
     : base(head, reader, version)
 {
     AmbientColor = new[] {0.5f, 0.5f, 0.5f, 1.0f};
     DiffuseColor = new[] { 0.5f, 0.5f, 0.5f, 1.0f };
     SpecularColor = new[] { 0.5f, 0.5f, 0.5f, 1.0f };
     EmissionColor = new[] { 0.5f, 0.5f, 0.5f, 1.0f };
 }
开发者ID:doug8679,项目名称:libJT,代码行数:8,代码来源:MaterialBaseAttribute.cs

示例9: ReadV8

 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8(reader);
     NormalBinding = reader.ReadI32();
     TextureBinding = reader.ReadI32();
     ColorBinding = reader.ReadI32();
     QuantizationParameters = new QuantizationParameters(reader);
 }
开发者ID:doug8679,项目名称:libJT,代码行数:8,代码来源:VertexShapeNodeElement.cs

示例10: ReadV8

 private void ReadV8(ByteReader reader)
 {
     VersionNumber = reader.ReadI16();
     NormalBinding = (Binding)reader.ReadByte();
     TextureCoordBinding = (Binding)reader.ReadByte();
     ColorBinding = (Binding)reader.ReadByte();
     QuantizationParameters = new QuantizationParameters(reader);
 }
开发者ID:doug8679,项目名称:libJT,代码行数:8,代码来源:VertexBasedShapeCompressedRepData.cs

示例11: ReadV8

 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8( reader );
     LightCount = reader.ReadI32();
     for (int i = 0; i < LightCount; i++) {
         Lights.Add(reader.ReadI32());
     }
 }
开发者ID:doug8679,项目名称:libJT,代码行数:8,代码来源:LightSetAttributeElement.cs

示例12: ReadV8

 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8(reader);
     ObjectID = reader.ReadI32();
     AmbientColor = reader.ReadRGBA();
     DiffuseColor = reader.ReadRGBA();
     SpecularColor = reader.ReadRGBA();
     Brightness = reader.ReadF32();
 }
开发者ID:doug8679,项目名称:libJT,代码行数:9,代码来源:BaseLight.cs

示例13: ReadV9

 protected override void ReadV9(ByteReader reader)
 {
     VersionNumber = reader.ReadI16();
     NodeFlagsPMI = reader.ReadU32();
     var aCount = reader.ReadI32();
     for ( int i = 0; i < aCount; i++ ) {
         Attributes.Add( reader.ReadI32() );
     }
 }
开发者ID:doug8679,项目名称:libJT,代码行数:9,代码来源:BaseNodeElement.cs

示例14: FileSegment

 protected FileSegment(ByteReader reader, TocEntry entry, int version)
     : this()
 {
     // Postion the file stream:
     reader.Position = (long)entry.SegmentOffset;
     // Read the segment header:
     Header.Read(reader);
     //Read(reader, version);
 }
开发者ID:doug8679,项目名称:libJT,代码行数:9,代码来源:FileSegment.cs

示例15: VertexBasedShapeCompressedRepData

 public VertexBasedShapeCompressedRepData(ByteReader reader, int version)
 {
     if (version < 9)
         ReadV8(reader);
     else if (version < 10)
         ReadV9(reader);
     else
         ReadV10(reader);
 }
开发者ID:doug8679,项目名称:libJT,代码行数:9,代码来源:VertexBasedShapeCompressedRepData.cs


注:本文中的libJT.Utilities.ByteReader类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。