11/* *
22 * Widget de saisie d'une ellipsoïde dans l'espace.
33 * @author Charles PIGNEROL, CEA/DAM/DCLC
4- * @date 09 /12/2025
4+ * @date 12 /12/2025
55 */
66
77#include " VtkContrib/vtkEllipsoidWidget.h"
1212#include < vtkMath.h>
1313#include < vtkProperty.h>
1414#include < vtkRenderer.h>
15+ #include < vtkRenderWindow.h>
1516#include < vtkRenderWindowInteractor.h>
1617#include < vtkSphereSource.h>
1718#include < vtkTransform.h>
@@ -106,13 +107,14 @@ void vtkEllipsoidWidget::SetEnabled (int enabled)
106107 {
107108 if (0 != renderer)
108109 renderer->RemoveActor (_ellipsoidActor);
110+ if ((0 != GetInteractor ( )) && (0 != GetInteractor ( )->GetRenderWindow ( )))
111+ GetInteractor ( )->GetRenderWindow ( )->Render ( );
109112 }
110113} // vtkEllipsoidWidget::SetEnabled
111114
112115
113116void vtkEllipsoidWidget::PlaceWidget (double bounds [6 ])
114117{
115- cout << __FILE__ << ' ' << __LINE__ << " vtkEllipsoidWidget::PlaceWidget" << endl;
116118 vtkBoxWidget::PlaceWidget (bounds);
117119
118120 UpdateEllipsoid ( );
@@ -121,7 +123,6 @@ cout << __FILE__ << ' ' << __LINE__ << " vtkEllipsoidWidget::PlaceWidget" << end
121123
122124void vtkEllipsoidWidget::PlaceWidget (double xRadius, double yRadius, double zRadius, vtkTransform* transform)
123125{
124- cout << __FILE__ << ' ' << __LINE__ << " vtkEllipsoidWidget::PlaceWidget" << endl;
125126 const double x = 0 == transform ? 0 . : transform->GetPosition ( )[0 ];
126127 const double y = 0 == transform ? 0 . : transform->GetPosition ( )[1 ];
127128 const double z = 0 == transform ? 0 . : transform->GetPosition ( )[2 ];
@@ -154,7 +155,6 @@ void vtkEllipsoidWidget::GetPosition (double& x, double& y, double& z)
154155 x = this ->HandleGeometry [6 ]->GetCenter ( )[0 ];
155156 y = this ->HandleGeometry [6 ]->GetCenter ( )[1 ];
156157 z = this ->HandleGeometry [6 ]->GetCenter ( )[2 ];
157- cout << __FILE__ << ' ' << __LINE__ << " vtkEllipsoidWidget::GetPosition : " << x << " , " << y << " , " << z << endl;
158158} // vtkEllipsoidWidget::GetPosition
159159
160160
0 commit comments