ace/Source/ACE.DatLoader/Entity/Sphere.cs
gmriggs 4619970f80
Refactoring LandblockManager, improving VitalTick performance (#1079)
* Physics Cache cleanup (Mostly cosmetic)

* Vertex/Polygon/BSP CacneEnabled flags added, default to false

Testing results:

Debug mode, loading 31,329 landblocks (x = 0x20-0xD0, y = 0x20-0xD0)

With Vertex, Polygon & BSP Cache:
2018-10-25 10:05:12,121 DEBUG: Loaded Landblocks in 120.39 seconds
2018-10-25 10:05:12,218 DEBUG: 13759 MB used

2018-10-25 10:08:00,330 DEBUG: Loaded Landblocks in 101.11 seconds
2018-10-25 10:08:00,427 DEBUG: 13667 MB used

2018-10-25 10:13:08,448 DEBUG: Loaded Landblocks in 104.36 seconds
2018-10-25 10:13:08,507 DEBUG: 13666 MB used

With Vertex, Polygon & BSP Cache Disabled:
2018-10-25 10:17:55,339 DEBUG: Loaded Landblocks in 100.63 seconds
2018-10-25 10:17:55,404 DEBUG: 14175 MB used

2018-10-25 10:21:11,596 DEBUG: Loaded Landblocks in 89.23 seconds
2018-10-25 10:21:11,666 DEBUG: 14220 MB used

2018-10-25 10:27:22,145 DEBUG: Loaded Landblocks in 93.74 seconds
2018-10-25 10:27:22,200 DEBUG: 14206 MB used

* PhysicsCaches, remove redundant null check

* Improved GfxObjCache model

* DBObj Boxing/Unboxing improvements

* Add thread safety to GfxObjCache

* Landblock phsyics loading async

* Adding setup "caching"

* Redirecting properties to DatLoader

* Refactoring LandblockManager, resolving Physics Landblock loading bug

* Tabs vs. spaces

* Improving VitalTick performance

* Adding refactored AttributeFormula to CreatureSkill

* Disabling BSP cache
2018-10-28 09:56:48 -04:00

24 lines
560 B
C#

using System.IO;
using System.Numerics;
namespace ACE.DatLoader.Entity
{
public class Sphere : IUnpackable
{
public Vector3 Origin { get; private set; }
public float Radius { get; private set; }
public void Unpack(BinaryReader reader)
{
Origin = reader.ReadVector3();
Radius = reader.ReadSingle();
}
public static Sphere CreateDummySphere()
{
var sphere = new Sphere();
sphere.Origin = Vector3.Zero;
return sphere;
}
}
}