refactor: Simplify vtkDetectorChamber by removing redundant transform management and improve vtkHandlerWidget rotation calculation using ray-plane intersection.
This commit is contained in:
@@ -74,9 +74,19 @@ void vtkStructuredGrid::Update() {
|
||||
if (!vmat) return;
|
||||
|
||||
Matrix4f transform = VtkToMatrix4f(vmat);
|
||||
m_Content->SetMatrix(transform);
|
||||
|
||||
// Update uLib model's affine transform
|
||||
if (m_Content->GetParent()) {
|
||||
Matrix4f localT = m_Content->GetParent()->GetWorldMatrix().inverse() * transform;
|
||||
m_Content->SetMatrix(localT);
|
||||
} else {
|
||||
m_Content->SetMatrix(transform);
|
||||
}
|
||||
|
||||
m_Content->Updated(); // Notify others (like raytracer)
|
||||
|
||||
// Debug output
|
||||
std::cout << "vtkStructuredGrid::Update matrix:\n" << transform << std::endl;
|
||||
}
|
||||
|
||||
void vtkStructuredGrid::InstallPipe() {
|
||||
|
||||
Reference in New Issue
Block a user