本文整理汇总了C#中libJT.Utilities.ByteReader类的典型用法代码示例。如果您正苦于以下问题:C# ByteReader类的具体用法?C# ByteReader怎么用?C# ByteReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ByteReader类属于libJT.Utilities命名空间,在下文中一共展示了ByteReader类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: Read
public void Read(ByteReader reader, int version)
{
if (version < 9)
ReadV8(reader);
else if (version < 10)
ReadV9(reader);
else
ReadV10(reader);
}
开发者ID:doug8679,项目名称:libJT,代码行数:9,代码来源:ElementHeader.cs
示例17: ReadV8
protected override void ReadV8(ByteReader reader)
{
base.ReadV8( reader );
Direction = reader.ReadDirF32();
VersionNumber = reader.ReadI16();
if (VersionNumber == 1) {
CoordSystem = reader.ReadI32();
}
}
开发者ID:doug8679,项目名称:libJT,代码行数:9,代码来源:InfiniteLightAttributeElement.cs
示例18: ReadV8
protected override void ReadV8(ByteReader reader)
{
base.ReadV8(reader);
Vers0DataFlags = reader.ReadU8();
VersionNumber = reader.ReadI16();
if (VersionNumber > 0) {
Vers1DataFlags = reader.ReadU8();
}
}
开发者ID:doug8679,项目名称:libJT,代码行数:9,代码来源:DrawStyleAttributeElement.cs
示例19: ReadV8
protected override void ReadV8(ByteReader reader)
{
base.ReadV8( reader );
Year = reader.ReadI16();
Month = reader.ReadI16();
Day = reader.ReadI16();
Hour = reader.ReadI16();
Minute = reader.ReadI16();
Second = reader.ReadI16();
}
开发者ID:doug8679,项目名称:libJT,代码行数:10,代码来源:DatePropertyAtom.cs
示例20: ReadV8
protected override void ReadV8(ByteReader reader)
{
/*base.ReadV8(reader);
VersionNumber = reader.ReadI16();
Version1Format = new Vers1ImageFormat(reader);
if (VersionNumber == 2) {
Version2Format = new Vers2ImageFormat(reader);
}*/
reader.Skip(Header.Length);
}
开发者ID:doug8679,项目名称:libJT,代码行数:11,代码来源:TextureImage.cs
注:本文中的libJT.Utilities.ByteReader类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论