protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8( reader );
     LightCount = reader.ReadI32();
     for (int i = 0; i < LightCount; i++) {
         Lights.Add(reader.ReadI32());
     }
 }
Example #2
0
 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8(reader);
     int children = reader.ReadI32();
     for (int i = 0; i < children; i++) {
         Children.Add(reader.ReadI32());
     }
 }
Example #3
0
 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8(reader);
     NormalBinding = reader.ReadI32();
     TextureBinding = reader.ReadI32();
     ColorBinding = reader.ReadI32();
     QuantizationParameters = new QuantizationParameters(reader);
 }
Example #4
0
 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() );
     }
 }
Example #5
0
 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8(reader);
     VersionNumber = reader.ReadI16();
     if (VersionNumber == 1) {
         EnableFlag = reader.ReadU32();
         EnvMapTextureChannel = reader.ReadI32();
         EnvMapReflectivity = reader.ReadF32();
         BumpMapTextureChannel = reader.ReadI32();
         BumpinessFactor = reader.ReadF32();
         BumpMapNormalSpace = reader.ReadU32();
         PhongShadingFlag = reader.ReadU32();
         ReservedField = reader.ReadU32();
     }
 }
 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8( reader );
     Position = reader.ReadHCoordF32();
     ConstantAttenuation = reader.ReadF32();
     LinearAttenuation = reader.ReadF32();
     QuadraticAttenuation = reader.ReadF32();
     SpreadAngle = reader.ReadF32();
     SpotDirection = reader.ReadDirF32();
     SpotIntensity = reader.ReadI32();
     VersionNumber = reader.ReadI16();
     if ( VersionNumber == 1 ) {
         CoordSystem = reader.ReadI32();
     }
 }
Example #7
0
        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();
            }
        }
 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8( reader );
     Direction = reader.ReadDirF32();
     VersionNumber = reader.ReadI16();
     if (VersionNumber == 1) {
         CoordSystem = reader.ReadI32();
     }
 }
Example #9
0
 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8(reader);
     ObjectID = reader.ReadI32();
     AmbientColor = reader.ReadRGBA();
     DiffuseColor = reader.ReadRGBA();
     SpecularColor = reader.ReadRGBA();
     Brightness = reader.ReadF32();
 }
Example #10
0
        protected override void ReadV8(ByteReader reader)
        {
            base.ReadV8(reader);
            PartitionFlags = reader.ReadI32();
            FileName = reader.ReadMbString();

            // Read the box either way, if the mask is set, this is a reserved field...do we ignore it?
            TransformedBoundingBox = reader.ReadBBoxF32();

            Area = reader.ReadF32();
            MinVertexCount = reader.ReadI32();
            MaxVertexCount = reader.ReadI32();
            MinNodeCount= reader.ReadI32();
            MaxNodeCount = reader.ReadI32();
            MinPolygonCount = reader.ReadI32();
            MaxPolygonCount = reader.ReadI32();

            if ( ( PartitionFlags & 0x00000001 ) != 0 ) {
                UnTransformedBoundingBox = reader.ReadBBoxF32();
            }
        }
 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8( reader );
     Value = reader.ReadI32();
 }
Example #12
0
 private void ReadV8(ByteReader reader)
 {
     EmptyInt = reader.ReadI32();
     TocOffset = reader.ReadI32();
     LsgSegmentID = reader.ReadGuid();
 }
Example #13
0
 private void ReadV9(ByteReader reader)
 {
     EmptyInt = reader.ReadI32();
     TocOffset = reader.ReadI32();
     LsgSegmentID = reader.ReadGuid();
     if (EmptyInt != 0)
         EmptyGuid = reader.ReadGuid();
 }
Example #14
0
 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8(reader);
     _reservedVector = reader.ReadVecF32();
     _reservedInt = reader.ReadI32();
 }
Example #15
0
 protected override void ReadV9(ByteReader reader)
 {
     Compression = reader.ReadI32() == 2;
     CompressedLength = reader.ReadI32();
     Algorithm = reader.ReadByte();
     base.ReadV9( reader);
 }
Example #16
0
 protected override void ReadV8(ByteReader reader)
 {
     Length = reader.ReadI32();
     ObjectTypeID = reader.ReadGuid();
     if (!ObjectTypeID.Equals(Element.EndOfElements))
         ObjectBaseType = (ObjectBaseType)reader.ReadByte();
 }
Example #17
0
 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8(reader);
     SegmentID = reader.ReadGuid();
     SegmentType = reader.ReadI32();
 }
Example #18
0
 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8(reader);
     ChildObjectID = reader.ReadI32();
 }
Example #19
0
 private void ReadV8(ByteReader reader)
 {
     CODEC = (CODEC)reader.ReadU8();
     switch (CODEC) {
         case CODEC.Arithmetic:
         case CODEC.Huffman:
             ProbabilityContexts = new Int32ProbabilityContexts();
             OutOfBandValueCount = reader.ReadI32();
             if (OutOfBandValueCount > 0) {
                 OutOfBandData = new Int32CompressedDataPacket();
                 OutOfBandData.ReadV8(reader);
             }
             break;
     }
     if (CODEC != CODEC.Null) {
         CodeTextLength = reader.ReadI32();
         ValueElementCount = reader.ReadI32();
     }
 }
 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8(reader);
     TextureCoordBinging = reader.ReadI32();
     ColorBinding = reader.ReadI32();
     QuantizationParameters = new PrimitiveSetQuantizationParameters(reader);
     VersionNumber = reader.ReadI16();
     if (VersionNumber == 1) {
         TextureCoordGenType = reader.ReadI32();
     }
 }
Example #21
0
 private void ReadV8(ByteReader reader)
 {
     VersionNumber = reader.ReadI16();
     NodePropertyTableCount = reader.ReadI32();
     for (int i = 0; i < NodePropertyTableCount; i++) {
         var noid = reader.ReadI32();
         var keyId = reader.ReadI32();
         while (keyId != 0) {
             var valueId = reader.ReadI32();
             List<NodePropertyTableEntry> entries;
             if (Tables.TryGetValue(noid, out entries)) {
                 entries.Add(new NodePropertyTableEntry(keyId, valueId));
             } else {
                 entries = new List<NodePropertyTableEntry> {new NodePropertyTableEntry(keyId, valueId)};
                 Tables.Add(noid, entries);
             }
             keyId = reader.ReadI32();
         }
     }
 }
Example #22
0
        public Vers2ImageFormat(ByteReader reader)
        {
            TexCoordGenMode = new int[4];
            TexCoordRefPlane = new float[4][];

            TextureType = reader.ReadI32();

            BorderMode = reader.ReadI32();
            MipmapMagnificationFilter = reader.ReadI32();
            MipmapMinificationFilter = reader.ReadI32();
            SDimenWrapMode = reader.ReadI32();
            TDimenWrapMode = reader.ReadI32();
            RDimenWrapMode = reader.ReadI32();
            BlendType = reader.ReadI32();
            InternalCompressionLevel = reader.ReadI32();
            BlendColor = reader.ReadRGBA();
            BorderColor = reader.ReadRGBA();
            TextureTransform = reader.ReadMx4F32();

            for ( int i = 0; i < 4; i++ ) {
                TexCoordGenMode[i] = reader.ReadI32();
            }
            for ( int i = 0; i < 4; i++ ) {
                TexCoordRefPlane[i] = reader.ReadPlaneF32();
            }

            TextureChannel = reader.ReadI32();
            _reserved = reader.ReadU32();
            InlineImageStorageFlag = reader.ReadU32();
            ImageCount = reader.ReadI32();
        }
Example #23
0
        protected override void ReadV8(ByteReader reader)
        {
            base.ReadV8(reader);

            // Read the transformed box
            TransformedBoundingBox = reader.ReadBBoxF32();
            // Read the untransformed box
            UntransformedBoundingBox = reader.ReadBBoxF32();
            Area = reader.ReadF32();
            MinVertexCount = reader.ReadI32();
            MaxVertexCount = reader.ReadI32();
            MinNodeCount= reader.ReadI32();
            MaxNodeCount = reader.ReadI32();
            MinPolygonCount = reader.ReadI32();
            MaxPolygonCount = reader.ReadI32();
            Size = reader.ReadI32();
            CompressionLevel = reader.ReadF32();
        }
Example #24
0
 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8(reader);
     VersionNumber = reader.ReadI16();
     if (VersionNumber == 1) {
         ShaderLanguage = (ShaderLanguage)reader.ReadI32();
         InlineSourceFlag = reader.ReadU32();
         if (InlineSourceFlag == 1) {
             SourceCode = reader.ReadMbString();
         } else {
             SourceCodeLoc = reader.ReadMbString();
         }
         ShaderParamCount = reader.ReadI32();
         for (int i = 0; i < ShaderParamCount; i++) {
             var p = new ShaderParameter();
             p.ReadV8(reader);
             Parameters.Add(p);
         }
     }
 }
Example #25
0
 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8(reader);
     VersionNumber = reader.ReadI16();
     _reserved = reader.ReadI32();
 }
Example #26
0
 protected override void ReadV8(ByteReader reader)
 {
     VersionNumber = reader.ReadI16();
     BindingAttributes = reader.ReadI32();
     QuantizationParameters = new QuantizationParameters(reader);
 }
Example #27
0
        protected override void ReadV8(ByteReader reader)
        {
            Compression = reader.ReadU32() == 2;
            CompressedLength = reader.ReadI32();
            Algorithm = reader.ReadByte();
            reader.Inflate(true, CompressedLength - 1);

            // Decompress the remainder of the header
            Length = reader.ReadI32();
            ObjectTypeID = reader.ReadGuid();
            ObjectBaseType = (ObjectBaseType) reader.ReadByte();
        }
Example #28
0
 protected override void ReadV8(ByteReader reader)
 {
     ObjectID = reader.ReadI32();
     StateFlags = reader.ReadByte();
     FieldInhibitFlags = reader.ReadU32();
 }
Example #29
0
 protected override void ReadV10(ByteReader reader)
 {
     Length = reader.ReadI32();
     ObjectTypeID = reader.ReadGuid();
     ObjectBaseType = (ObjectBaseType)reader.ReadByte();
     ObjectID = reader.ReadI32();
 }
Example #30
0
 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8(reader);
     VersionNumber = reader.ReadI16();
     SelectedChild = reader.ReadI32();
 }