refactor: update Puppet transform logic to support AffineTransform world matrices and improve selection highlighting
This commit is contained in:
@@ -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 ©)
|
||||
: 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user