feat: implement MultiSelectionProp to support grouped object transformation and selection in Viewport

This commit is contained in:
AndreaRigoni
2026-04-10 20:42:24 +00:00
parent f8f92ebf3d
commit e320c932d2
7 changed files with 305 additions and 15 deletions

View File

@@ -29,6 +29,7 @@ namespace Vtk {
struct ViewportData;
class HandlerWidget;
class MultiSelectionProp;
class ObjectsContext;
/**
@@ -49,7 +50,11 @@ public:
// Prop3D / prop management
void AddProp3D(Prop3D &prop);
void RemoveProp3D(Prop3D &prop);
void SelectProp3D(Prop3D *prop);
/** @brief Selects a specific Prop3D. If multi is true, it toggles selection in a group. */
void SelectProp3D(Prop3D* target, bool multi = false);
/** @brief Creates a persistent Selection Group from the current multi-selection. */
void GroupSelection(uLib::ObjectsContext* targetCtx);
void addProp(vtkProp *prop);
void RemoveProp(vtkProp *prop);
@@ -91,6 +96,8 @@ protected:
struct ViewportData *pv;
Axis m_GridAxis;
std::vector<Prop3D*> m_Prop3Ds;
std::vector<Prop3D*> m_SelectedProps;
MultiSelectionProp* m_MultiSelectionProp;
std::map<uLib::Object*, Prop3D*> m_ObjectToProp3D;
};