mirror of
https://github.com/ACEmulator/ACE
synced 2026-08-17 12:26:06 -04:00
* ACE.DatLoader: XpTable updated * ACE.DatLoader physics and environment using new unpack pattern * ACE.DatLoader ContractTable updated to IUnpackable * ACE.DatLoader EnvCell refactored to new IUnpackable * Update PackableExtensions.cs
25 lines
699 B
C#
25 lines
699 B
C#
using System.IO;
|
|
using System.Numerics;
|
|
|
|
namespace ACE.DatLoader.Entity
|
|
{
|
|
public class Frame : IUnpackable
|
|
{
|
|
public Vector3 Origin { get; private set; }
|
|
public Quaternion Orientation { get; private set; }
|
|
|
|
public void Unpack(BinaryReader reader)
|
|
{
|
|
var x = reader.ReadSingle();
|
|
var y = reader.ReadSingle();
|
|
var z = reader.ReadSingle();
|
|
Origin = new Vector3(x, y, z);
|
|
|
|
var qw = reader.ReadSingle();
|
|
var qx = reader.ReadSingle();
|
|
var qy = reader.ReadSingle();
|
|
var qz = reader.ReadSingle();
|
|
Orientation = new Quaternion(qx, qy, qz, qw);
|
|
}
|
|
}
|
|
}
|