Пример #1
0
        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();
        }
Пример #2
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();
     }
 }
Пример #3
0
 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();
     }
 }
Пример #4
0
 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8( reader );
     VersionNumber = reader.ReadI16();
     DataFlags = reader.ReadU8();
     PointSize = reader.ReadF32();
 }
Пример #5
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();
 }
Пример #6
0
 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8( reader );
     ushort storedMask = reader.ReadU16();
     for ( int i = 0; i < 16; i++ ) {
         if ( ( storedMask & 0x8000 ) == 0x8000 ) {
             Transform[i] = reader.ReadF32();
         }
         storedMask <<= 1;
     }
 }
Пример #7
0
 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8(reader);
     DataFlags = reader.ReadU8();
     LineWidth = reader.ReadF32();
 }
Пример #8
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();
            }
        }
Пример #9
0
 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8(reader);
     AreaFactor = reader.ReadF32();
 }
Пример #10
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();
        }
Пример #11
0
 protected override void ReadV8(ByteReader reader)
 {
     base.ReadV8( reader );
     Value = reader.ReadF32();
 }