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

@@ -39,20 +39,21 @@ namespace uLib {
* @brief Represents an oriented bounding box (OBB) within a hierarchical
* transformation system.
*
* ContainerBox inherits from AffineTransform, which defines its parent
* ContainerBox inherits from TRS, which defines its parent
* coordinate system. It contains an internal local transformation (m_LocalT)
* that defines the box's specific origin and size relative to its own
* coordinate system.
*/
class ContainerBox : public AffineTransform {
class ContainerBox : public TRS {
public:
uLibTypeMacro(ContainerBox, AffineTransform)
uLibTypeMacro(ContainerBox, TRS)
virtual const char * GetClassName() const override { return "ContainerBox"; }
////////////////////////////////////////////////////////////////////////////
// PROPERTIES //
Vector3f Size;
Vector3f Origin;
@@ -86,7 +87,7 @@ public:
*/
ContainerBox(const ContainerBox &copy)
: m_LocalT(this), // Reset parent to the new object
AffineTransform(copy),
TRS(copy),
Size(copy.Size),
Origin(copy.Origin) {
ULIB_ACTIVATE_PROPERTIES(*this);
@@ -98,6 +99,7 @@ public:
*/
template <class ArchiveT>
void serialize(ArchiveT & ar, const unsigned int version) {
ar & boost::serialization::make_nvp("TRS", boost::serialization::base_object<TRS>(*this));
ar & HRP(Size);
ar & HRP(Origin);
}