/// <summary> /// Initializes a new instance of the <see cref="Warcraft.ADT.Chunks.ModelPlacementEntry"/> class. /// </summary> /// <param name="data">ExtendedData.</param> public ModelPlacementEntry(byte[] data) { using var ms = new MemoryStream(data); using var br = new BinaryReader(ms); ModelEntryIndex = br.ReadUInt32(); UniqueID = br.ReadUInt32(); Position = br.ReadVector3(); Rotation = br.ReadRotator(); ScalingFactor = br.ReadUInt16(); Flags = (ModelPlacementFlags)br.ReadUInt16(); }
/// <summary> /// Initializes a new instance of the <see cref="Warcraft.ADT.Chunks.ModelPlacementEntry"/> class. /// </summary> /// <param name="data">Data.</param> public ModelPlacementEntry(byte[] data) { using (MemoryStream ms = new MemoryStream(data)) { using (BinaryReader br = new BinaryReader(ms)) { this.ModelEntryIndex = br.ReadUInt32(); this.UniqueID = br.ReadUInt32(); this.Position = br.ReadVector3f(); this.Rotation = br.ReadRotator(); this.ScalingFactor = br.ReadUInt16(); this.Flags = (ModelPlacementFlags)br.ReadUInt16(); } } }
/// <summary> /// Initializes a new instance of the <see cref="Warcraft.ADT.Chunks.ModelPlacementEntry"/> class. /// </summary> /// <param name="data">Data.</param> public ModelPlacementEntry(byte[] data) { using (MemoryStream ms = new MemoryStream(data)) { using (BinaryReader br = new BinaryReader(ms)) { this.ModelEntryIndex = br.ReadUInt32(); this.UniqueID = br.ReadUInt32(); this.Position = br.ReadVector3f(); this.Rotation = br.ReadRotator(); this.ScalingFactor = br.ReadUInt16(); this.Flags = (ModelPlacementFlags)br.ReadUInt16(); } } }