MCPcopy Create free account
hub / github.com/Kitware/VTK / vtkBiDimensionalWidget

Method vtkBiDimensionalWidget

Interaction/Widgets/vtkBiDimensionalWidget.cxx:44–122  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

42
43//------------------------------------------------------------------------------
44vtkBiDimensionalWidget::vtkBiDimensionalWidget()
45{
46 this->ManagesCursor = 1;
47
48 this->WidgetState = vtkBiDimensionalWidget::Start;
49 this->CurrentHandle = 0;
50
51 // Manage priorities, we want the handles to be lower priority
52 if (this->Priority <= 0.0)
53 {
54 this->Priority = 0.01;
55 }
56
57 // The widgets for moving the end points. They observe this widget (i.e.,
58 // this widget is the parent to the handles).
59 this->Point1Widget = vtkHandleWidget::New();
60 this->Point1Widget->SetPriority(this->Priority - 0.01);
61 this->Point1Widget->SetParent(this);
62 this->Point1Widget->ManagesCursorOff();
63
64 this->Point2Widget = vtkHandleWidget::New();
65 this->Point2Widget->SetPriority(this->Priority - 0.01);
66 this->Point2Widget->SetParent(this);
67 this->Point2Widget->ManagesCursorOff();
68
69 this->Point3Widget = vtkHandleWidget::New();
70 this->Point3Widget->SetPriority(this->Priority - 0.01);
71 this->Point3Widget->SetParent(this);
72 this->Point3Widget->ManagesCursorOff();
73
74 this->Point4Widget = vtkHandleWidget::New();
75 this->Point4Widget->SetPriority(this->Priority - 0.01);
76 this->Point4Widget->SetParent(this);
77 this->Point4Widget->ManagesCursorOff();
78
79 // Set up the callbacks on the two handles
80 this->BiDimensionalWidgetCallback1 = vtkBiDimensionalWidgetCallback::New();
81 this->BiDimensionalWidgetCallback1->BiDimensionalWidget = this;
82 this->Point1Widget->AddObserver(
83 vtkCommand::StartInteractionEvent, this->BiDimensionalWidgetCallback1, this->Priority);
84 this->Point1Widget->AddObserver(
85 vtkCommand::EndInteractionEvent, this->BiDimensionalWidgetCallback1, this->Priority);
86
87 this->BiDimensionalWidgetCallback2 = vtkBiDimensionalWidgetCallback::New();
88 this->BiDimensionalWidgetCallback2->BiDimensionalWidget = this;
89 this->Point2Widget->AddObserver(
90 vtkCommand::StartInteractionEvent, this->BiDimensionalWidgetCallback2, this->Priority);
91 this->Point2Widget->AddObserver(
92 vtkCommand::EndInteractionEvent, this->BiDimensionalWidgetCallback2, this->Priority);
93
94 this->BiDimensionalWidgetCallback3 = vtkBiDimensionalWidgetCallback::New();
95 this->BiDimensionalWidgetCallback3->BiDimensionalWidget = this;
96 this->Point3Widget->AddObserver(
97 vtkCommand::StartInteractionEvent, this->BiDimensionalWidgetCallback3, this->Priority);
98 this->Point3Widget->AddObserver(
99 vtkCommand::EndInteractionEvent, this->BiDimensionalWidgetCallback3, this->Priority);
100
101 this->BiDimensionalWidgetCallback4 = vtkBiDimensionalWidgetCallback::New();

Callers

nothing calls this directly

Calls 5

SetPriorityMethod · 0.80
SetCallbackMethodMethod · 0.80
NewFunction · 0.50
SetParentMethod · 0.45
AddObserverMethod · 0.45

Tested by

no test coverage detected