refactor: rename Vtk classes by removing the vtk prefix to follow project naming conventions
This commit is contained in:
@@ -24,28 +24,28 @@
|
||||
namespace uLib {
|
||||
namespace Vtk {
|
||||
|
||||
vtkBoxSolid::vtkBoxSolid(Geant::BoxSolid *content)
|
||||
: vtkGeantSolid(content), m_BoxContent(content) {
|
||||
BoxSolid::BoxSolid(Geant::BoxSolid *content)
|
||||
: GeantSolid(content), m_BoxContent(content) {
|
||||
this->InstallPipe();
|
||||
|
||||
// Connect the model's Updated event to updateTransform to ensure VTK sync
|
||||
m_UpdateConnection = Object::connect(m_BoxContent, &uLib::Object::Updated, this, &vtkBoxSolid::Update);
|
||||
m_UpdateConnection = Object::connect(m_BoxContent, &uLib::Object::Updated, this, &BoxSolid::Update);
|
||||
|
||||
// Initial sync
|
||||
this->Update();
|
||||
}
|
||||
|
||||
vtkBoxSolid::~vtkBoxSolid() {
|
||||
BoxSolid::~BoxSolid() {
|
||||
}
|
||||
|
||||
void vtkBoxSolid::Update() {
|
||||
void BoxSolid::Update() {
|
||||
ConnectionBlock blocker(m_UpdateConnection);
|
||||
this->UpdateGeometry();
|
||||
// Ensure base Puppet properties (color, opacity, etc) and transform are applied
|
||||
this->Puppet::Update();
|
||||
}
|
||||
|
||||
void vtkBoxSolid::SyncFromVtk() {
|
||||
void BoxSolid::SyncFromVtk() {
|
||||
this->Puppet::SyncFromVtk();
|
||||
if (auto* proxy = vtkProp3D::SafeDownCast(this->GetProxyProp())) {
|
||||
if (vtkMatrix4x4* mat = proxy->GetUserMatrix()) {
|
||||
@@ -54,17 +54,17 @@ void vtkBoxSolid::SyncFromVtk() {
|
||||
}
|
||||
}
|
||||
|
||||
void vtkBoxSolid::UpdateGeometry() {
|
||||
// Sync geometry from G4VSolid provided by vtkGeantSolid (tessellation)
|
||||
vtkGeantSolid::UpdateGeometry();
|
||||
void BoxSolid::UpdateGeometry() {
|
||||
// Sync geometry from G4VSolid provided by GeantSolid (tessellation)
|
||||
GeantSolid::UpdateGeometry();
|
||||
}
|
||||
|
||||
void vtkBoxSolid::UpdateTransform() {
|
||||
void BoxSolid::UpdateTransform() {
|
||||
// Take transform from Puppet base (which uses GetContent() -> ContainerBox TRS)
|
||||
this->Puppet::Update();
|
||||
}
|
||||
|
||||
void vtkBoxSolid::serialize_display(uLib::Archive::display_properties_archive &ar,
|
||||
void BoxSolid::serialize_display(uLib::Archive::display_properties_archive &ar,
|
||||
const unsigned int version) {
|
||||
// Expose Geant solid properties and underlying Box/TRS properties
|
||||
this->Puppet::serialize_display(ar, version);
|
||||
@@ -76,8 +76,8 @@ void vtkBoxSolid::serialize_display(uLib::Archive::display_properties_archive &a
|
||||
}
|
||||
}
|
||||
|
||||
void vtkBoxSolid::InstallPipe() {
|
||||
vtkGeantSolid::InstallPipe();
|
||||
void BoxSolid::InstallPipe() {
|
||||
GeantSolid::InstallPipe();
|
||||
}
|
||||
|
||||
} // namespace Vtk
|
||||
|
||||
Reference in New Issue
Block a user