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

Method vtkPointWidget

Interaction/Widgets/vtkPointWidget.cxx:23–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21vtkStandardNewMacro(vtkPointWidget);
22
23vtkPointWidget::vtkPointWidget()
24{
25 this->State = vtkPointWidget::Start;
26 this->EventCallbackCommand->SetCallback(vtkPointWidget::ProcessEvents);
27
28 // Represent the line
29 this->Cursor3D = vtkCursor3D::New();
30 this->Mapper = vtkPolyDataMapper::New();
31 this->Mapper->SetInputConnection(this->Cursor3D->GetOutputPort());
32 this->Actor = vtkActor::New();
33 this->Actor->SetMapper(this->Mapper);
34
35 // Define the point coordinates
36 double bounds[6];
37 bounds[0] = -0.5;
38 bounds[1] = 0.5;
39 bounds[2] = -0.5;
40 bounds[3] = 0.5;
41 bounds[4] = -0.5;
42 bounds[5] = 0.5;
43
44 // Initial creation of the widget, serves to initialize it
45 this->PlaceWidget(bounds);
46
47 // Manage the picking stuff
48 this->CursorPicker = vtkCellPicker::New();
49 this->CursorPicker->PickFromListOn();
50 this->CursorPicker->AddPickList(this->Actor);
51 this->CursorPicker->SetTolerance(0.005); // need some fluff
52
53 // Set up the initial properties
54 this->CreateDefaultProperties();
55
56 // Constraints not set
57 this->ConstraintAxis = -1;
58
59 // Override superclass'
60 this->PlaceFactor = 1.0;
61
62 // The size of the hot spot
63 this->HotSpotSize = 0.05;
64 this->WaitingForMotion = 0;
65}
66
67vtkPointWidget::~vtkPointWidget()
68{

Callers

nothing calls this directly

Calls 8

PlaceWidgetMethod · 0.95
NewFunction · 0.50
SetInputConnectionMethod · 0.45
GetOutputPortMethod · 0.45
SetMapperMethod · 0.45
AddPickListMethod · 0.45
SetToleranceMethod · 0.45

Tested by

no test coverage detected