Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NiTextureEffect"/> class.
 /// </summary>
 /// <param name="file">The file.</param>
 /// <param name="reader">The reader.</param>
 /// <exception cref="Exception">NOT SUPPORTED!</exception>
 public NiTextureEffect(NiFile file, BinaryReader reader) : base(file, reader)
 {
     this.ModelProjectionMatrix    = reader.ReadMatrix33();
     this.ModelProjectionTransform = reader.ReadVector3();
     this.TextureFiltering         = (eTexFilterMode)reader.ReadUInt32();
     this.TextureClamping          = (eTexClampMode)reader.ReadUInt32();
     this.EffectType   = (eEffectType)reader.ReadUInt32();
     this.CoordGenType = (eCoordGenType)reader.ReadUInt32();
     if (base.Version <= eNifVersion.VER_3_1)
     {
         throw new Exception("NOT SUPPORTED!");
     }
     if (base.Version >= eNifVersion.VER_4_0_0_0)
     {
         this.SourceTexture = new NiRef <NiSourceTexture>(reader);
     }
     this.ClippingPlane = reader.ReadBoolean(Version);
     this.unknownVector = new Vector3(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle());
     this.Unknown2      = reader.ReadSingle();
     if (this.File.Header.Version <= eNifVersion.VER_10_2_0_0)
     {
         this.PS2L = reader.ReadInt16();
         this.PS2K = reader.ReadInt16();
     }
     if (this.File.Header.Version <= eNifVersion.VER_4_1_0_12)
     {
         this.Unknown3 = reader.ReadUInt16();
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NiTextureEffect"/> class.
        /// </summary>
        /// <param name="file">The file.</param>
        /// <param name="reader">The reader.</param>
        /// <exception cref="Exception">NOT SUPPORTED!</exception>
        public NiTextureEffect(NiFile file, BinaryReader reader) : base(file, reader)
		{
			this.ModelProjectionMatrix = reader.ReadMatrix33();
			this.ModelProjectionTransform = reader.ReadVector3();
			this.TextureFiltering = (eTexFilterMode)reader.ReadUInt32();
			this.TextureClamping = (eTexClampMode)reader.ReadUInt32();
			this.EffectType = (eEffectType)reader.ReadUInt32();
			this.CoordGenType = (eCoordGenType)reader.ReadUInt32();
			if (base.Version <= eNifVersion.VER_3_1)
			{
				throw new Exception("NOT SUPPORTED!");
			}
			if (base.Version >= eNifVersion.VER_4_0_0_0)
			{
				this.SourceTexture = new NiRef<NiSourceTexture>(reader);
			}
			this.ClippingPlane = reader.ReadBoolean(Version);
			this.unknownVector = new Vector3(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle());
			this.Unknown2 = reader.ReadSingle();
			if (this.File.Header.Version <= eNifVersion.VER_10_2_0_0)
			{
				this.PS2L = reader.ReadInt16();
				this.PS2K = reader.ReadInt16();
			}
			if (this.File.Header.Version <= eNifVersion.VER_4_1_0_12)
			{
				this.Unknown3 = reader.ReadUInt16();
			}
		}