Skip to content

Commit

Permalink
Change how variant buckets are allocated to optimize memory.
Browse files Browse the repository at this point in the history
  • Loading branch information
RadiantUwU committed Dec 18, 2024
1 parent eb51030 commit 242208a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions core/variant/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,18 @@ class Variant {
union BucketSmall {
BucketSmall() {}
~BucketSmall() {}
Transform2D _transform2d;
::AABB _aabb;
union {
Transform2D _transform2d;
::AABB _aabb;
};
};
union BucketMedium {
BucketMedium() {}
~BucketMedium() {}
Basis _basis;
Transform3D _transform3d;
union {
Basis _basis;
Transform3D _transform3d;
};
};
union BucketLarge {
BucketLarge() {}
Expand Down

0 comments on commit 242208a

Please sign in to comment.