refactor: standardize object type identification using uLibTypeMacro and update serialization macros

This commit is contained in:
AndreaRigoni
2026-04-02 10:33:14 +00:00
parent a1c5fc2600
commit 4435776484
32 changed files with 229 additions and 99 deletions

View File

@@ -188,9 +188,12 @@ public:
typedef Eigen::Affine3f AffineMatrix;
class TRS : public AffineTransform {
public:
uLibTypeMacro(TRS, AffineTransform)
ULIB_SERIALIZE_ACCESS
// ULIB_DECLARE_PROPERTIES(TRS)
public:
Vector3f position = Vector3f::Zero();
Vector3f rotation = Vector3f::Zero();
@@ -259,6 +262,7 @@ public:
ar & HRPU(rotation, "rad");
ar & HRP(scaling);
}
AffineMatrix GetAffineMatrix() const {
AffineMatrix m = AffineMatrix::Identity();
@@ -273,6 +277,10 @@ public:
Matrix4f GetMatrix() const {
return this->GetAffineMatrix().matrix();
}
};