refactor: update Puppet transform logic to support AffineTransform world matrices and improve selection highlighting

This commit is contained in:
AndreaRigoni
2026-03-30 15:24:37 +00:00
parent 46c39bc26e
commit 22d0041942
24 changed files with 469 additions and 331 deletions

View File

@@ -21,7 +21,7 @@ namespace uLib {
Assembly::Assembly()
: ObjectsContext(),
AffineTransform(),
TRS(),
m_BBoxMin(Vector3f::Zero()),
m_BBoxMax(Vector3f::Zero()),
m_ShowBoundingBox(false),
@@ -31,7 +31,7 @@ Assembly::Assembly()
Assembly::Assembly(const Assembly &copy)
: ObjectsContext(copy),
AffineTransform(copy),
TRS(copy),
m_BBoxMin(copy.m_BBoxMin),
m_BBoxMax(copy.m_BBoxMax),
m_ShowBoundingBox(copy.m_ShowBoundingBox),
@@ -55,6 +55,10 @@ void Assembly::AddObject(Object *obj) {
this->ComputeBoundingBox();
this->Updated(); // Signal that assembly itself changed (AABB-wise)
});
// Parent -> Child propagation for world matrix updates
Object::connect(this, &Object::Updated, obj, &Object::Updated);
this->ComputeBoundingBox();
}