refactor: update transformation system, improve template readability, and reorganize VTK assembly management
This commit is contained in:
@@ -547,16 +547,14 @@ void vtkHandlerWidget::OnMouseMove() {
|
||||
total->Concatenate(op);
|
||||
|
||||
if (this->Prop3D) {
|
||||
double p[3], r[3], s[3];
|
||||
total->GetPosition(p);
|
||||
total->GetOrientation(r);
|
||||
total->GetScale(s);
|
||||
this->Prop3D->SetPosition(p);
|
||||
// VTK GetOrientation already returned degrees, so r is in degrees.
|
||||
// We apply it directly back to VTK.
|
||||
this->Prop3D->SetOrientation(r);
|
||||
this->Prop3D->SetScale(s);
|
||||
this->Prop3D->SetUserMatrix(nullptr);
|
||||
vtkNew<vtkMatrix4x4> result;
|
||||
total->GetMatrix(result);
|
||||
this->Prop3D->SetUserMatrix(result);
|
||||
|
||||
// Reset individual TRS components so UserMatrix is the single source of truth
|
||||
this->Prop3D->SetPosition(0, 0, 0);
|
||||
this->Prop3D->SetOrientation(0, 0, 0);
|
||||
this->Prop3D->SetScale(1, 1, 1);
|
||||
}
|
||||
|
||||
this->Prop3D->Modified();
|
||||
|
||||
Reference in New Issue
Block a user