[vtkusers] How to use vtkAngleWidget only once ?
yarram
somasekhar.vit at gmail.com
Fri Aug 3 10:54:55 EDT 2012
Here is my code that is placed in MouseMoveEvent of callback class:
if(this->readyAngle == 1)
{
vtkSmartPointer<vtkAngleRepresentation2D> rep =
vtkSmartPointer<vtkAngleRepresentation2D>::New();
rep->ArcVisibilityOff();
vtkSmartPointer<vtkAngleWidget> angleWidget =
vtkSmartPointer<vtkAngleWidget>::New();
angleWidget->SetRepresentation(rep);
angleWidget->SetInteractor(iren);
angleWidget->CreateDefaultRepresentation();
angleWidget->On();
iren->Start();
}
And I use the following code to deactivate the widget in
LeftButtonReleaseEvent:
if(this->readyAngle == 1)
{
angleWidget->Off();
this->readyAngle = 0;
}
And the variable "this->readyAngle" equal to 1, when a button is pressed.
The widget is working only when the last statement "iren->Start();" is used.
And I want to deactivate the widget immediately after I use the widget for
first time. Please help me.
--
View this message in context: http://vtk.1045678.n5.nabble.com/How-to-use-vtkAngleWidget-only-once-tp5715078p5715084.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list