cleanup
This commit is contained in:
@@ -222,16 +222,16 @@ namespace SplashEdit.RuntimeCode
|
||||
{
|
||||
if (bvh == null) return 0;
|
||||
// BVH nodes: each node has AABB (24 bytes) + child/tri info (8 bytes) = 32 bytes
|
||||
// Triangle refs: 2 bytes each (uint16)
|
||||
return (long)bvh.NodeCount * 32 + (long)bvh.TriangleRefCount * 2;
|
||||
// Triangle refs: 4 bytes each (uint32)
|
||||
return (long)bvh.NodeCount * 32 + (long)bvh.TriangleRefCount * 4;
|
||||
}
|
||||
|
||||
private static long EstimateCollisionSize(PSXCollisionExporter collision)
|
||||
{
|
||||
if (collision == null || collision.MeshCount == 0) return 0;
|
||||
// Each collision mesh header: AABB + triangle count (28 bytes)
|
||||
// Each collision triangle: 3 vertices * 6 bytes = 18 bytes + normal 6 bytes = 24 bytes
|
||||
return (long)collision.MeshCount * 28 + (long)collision.TriangleCount * 24;
|
||||
// Each collision mesh header: AABB (24) + tri count (2) + flags (2) + offset (4) = 32 bytes
|
||||
// Each collision triangle: 3 verts * 12 bytes + normal 12 bytes + flags 4 bytes = 52 bytes
|
||||
return (long)collision.MeshCount * 32 + (long)collision.TriangleCount * 52;
|
||||
}
|
||||
|
||||
private static long EstimateNavRegionSize(PSXNavRegionBuilder nav)
|
||||
|
||||
Reference in New Issue
Block a user