refactor: unify vtkBoxSolid architecture with Puppet base and update build documentation

This commit is contained in:
AndreaRigoni
2026-04-03 16:44:00 +00:00
parent 74ba67f072
commit e0fb2f4dae
7 changed files with 57 additions and 82 deletions

View File

@@ -72,8 +72,8 @@ void vtkCylinder::Update() {
// Apply Axis alignment
int axis = m_Content->GetAxis();
if (axis == 0) alignment->RotateZ(-90); // Y -> X
else if (axis == 1) ; // Y -> Y (identity)
if (axis == 0) alignment->RotateZ(-90); // Y -> X
else if (axis == 1) ; // Y -> Y (identity)
else if (axis == 2) alignment->RotateX(90); // Y -> Z
}
@@ -92,19 +92,11 @@ void vtkCylinder::SyncFromVtk() {
if (!root) return;
// VTK -> Model: Extract new world TRS from proxy
vtkMatrix4x4* rootMat = root->GetUserMatrix();
if (rootMat) {
std::cout << "[vtkCylinder::SyncFromVtk] Read Proxy UserMatrix:" << std::endl;
rootMat->Print(std::cout);
}
vtkMatrix4x4* rootMat = root->GetUserMatrix();
Matrix4f vtkWorld = VtkToMatrix4f(rootMat);
// Directly sync model from the world matrix
m_Content->FromMatrix(vtkWorld);
std::cout << "[vtkCylinder::SyncFromVtk] New Model WorldMatrix:" << std::endl << m_Content->GetWorldMatrix() << std::endl;
m_Content->Updated();
}