refactor: improve Geant4 solid synchronization and update documentation for VTK integration
This commit is contained in:
@@ -40,13 +40,15 @@ BoxSolid::~BoxSolid() {
|
||||
|
||||
void BoxSolid::Update() {
|
||||
ConnectionBlock blocker(m_UpdateConnection);
|
||||
this->UpdateGeometry();
|
||||
// Ensure base Prop3D properties (color, opacity, etc) and transform are applied
|
||||
// Ensure base GeantSolid logic (G4Polyhedron and Transform) runs
|
||||
this->GeantSolid::Update();
|
||||
// Ensure base Prop3D properties (color, opacity, etc) are applied
|
||||
this->Prop3D::Update();
|
||||
}
|
||||
|
||||
void BoxSolid::SyncFromVtk() {
|
||||
this->Prop3D::SyncFromVtk();
|
||||
|
||||
if (auto* proxy = vtkProp3D::SafeDownCast(this->GetProxyProp())) {
|
||||
if (vtkMatrix4x4* mat = proxy->GetUserMatrix()) {
|
||||
m_BoxContent->SetTransform(VtkToMatrix4f(mat));
|
||||
@@ -54,16 +56,6 @@ void BoxSolid::SyncFromVtk() {
|
||||
}
|
||||
}
|
||||
|
||||
void BoxSolid::UpdateGeometry() {
|
||||
// Sync geometry from G4VSolid provided by GeantSolid (tessellation)
|
||||
GeantSolid::UpdateGeometry();
|
||||
}
|
||||
|
||||
void BoxSolid::UpdateTransform() {
|
||||
// Take transform from Prop3D base (which uses GetContent() -> ContainerBox TRS)
|
||||
this->Prop3D::Update();
|
||||
}
|
||||
|
||||
void BoxSolid::serialize_display(uLib::Archive::display_properties_archive &ar,
|
||||
const unsigned int version) {
|
||||
// Expose Geant solid properties and underlying Box/TRS properties
|
||||
|
||||
@@ -49,8 +49,6 @@ public:
|
||||
virtual ~BoxSolid();
|
||||
|
||||
virtual void Update() override;
|
||||
virtual void UpdateGeometry() override;
|
||||
virtual void UpdateTransform() override;
|
||||
virtual void SyncFromVtk() override;
|
||||
|
||||
virtual uLib::Object *GetContent() const override {
|
||||
|
||||
Reference in New Issue
Block a user