/// <summary> /// Parses SceneCachedValues from given GameBitBuffer. /// </summary> /// <param name="buffer">The GameBitBuffer to parse from.</param> public void Parse(GameBitBuffer buffer) { Unknown1 = buffer.ReadInt(32); Unknown2 = buffer.ReadInt(32); Unknown3 = buffer.ReadInt(32); AABB1 = new AABB(); AABB1.Parse(buffer); AABB2 = new AABB(); AABB2.Parse(buffer); Unknown4 = new int[4]; for (int i = 0; i < Unknown4.Length; i++) Unknown4[i] = buffer.ReadInt(32); Unknown5 = buffer.ReadInt(32); }
/// <summary> /// Reads SceneCachedValues from given MPQFileStream. /// </summary> /// <param name="stream">The MPQFileStream to read from.</param> public SceneCachedValues(MpqFileStream stream) { Unknown1 = stream.ReadValueS32(); Unknown2 = stream.ReadValueS32(); Unknown3 = stream.ReadValueS32(); AABB1 = new AABB(stream); AABB2 = new AABB(stream); Unknown4 = new int[4]; for (int i = 0; i < Unknown4.Length; i++) { Unknown4[i] = stream.ReadValueS32(); } Unknown5 = stream.ReadValueS32(); }
public bool Intersects(AABB other) { if (// Max < o.Min this.Max.X < other.Min.X || this.Max.Y < other.Min.Y || this.Max.Z < other.Min.Z || // Min > o.Max this.Min.X > other.Max.X || this.Min.Y > other.Max.Y || this.Min.Z > other.Max.Z) { return false; } return true; // Intersects if above fails }
public ActorCollisionData(MpqFileStream stream) { ColFlags = new ActorCollisionFlags(stream); I0 = stream.ReadValueS32(); Cylinder = new AxialCylinder(stream); AABB = new AABB(stream); F0 = stream.ReadValueF32(); stream.ReadValueS32();// Testing - DarkLotus }