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

Method vtkVRControlsHelper

Rendering/VR/vtkVRControlsHelper.cxx:18–69  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

16
17//------------------------------------------------------------------------------
18VTK_ABI_NAMESPACE_BEGIN
19vtkVRControlsHelper::vtkVRControlsHelper()
20{
21 // The text
22 this->Text = {};
23 this->TextActor = vtkTextActor3D::New();
24 this->TextActor->GetTextProperty()->SetFontSize(30);
25 this->TextActor->SetInput(this->Text.c_str());
26
27 vtkTextProperty* prop = this->TextActor->GetTextProperty();
28 this->TextActor->ForceOpaqueOn();
29
30 prop->SetFontFamilyToTimes();
31 prop->SetFrame(1);
32 prop->SetFrameWidth(12);
33 prop->SetFrameColor(0.0, 0.0, 0.0);
34 prop->SetBackgroundOpacity(1.0);
35 prop->SetBackgroundColor(0.0, 0.0, 0.0);
36 prop->SetFontSize(20);
37
38 // The line
39 this->LineSource = vtkLineSource::New();
40 this->LineSource->SetPoint1(0, 0, 0);
41 this->LineSource->SetPoint2(0, 0, -1);
42 this->LineMapper = vtkPolyDataMapper::New();
43 this->LineActor = vtkActor::New();
44 this->LineMapper->SetInputConnection(this->LineSource->GetOutputPort());
45 this->LineActor->SetMapper(this->LineMapper);
46
47 // Tooltip default option
48 this->ComponentName = "trigger";
49 this->DrawSide = vtkVRControlsHelper::Right;
50 this->ButtonSide = vtkVRControlsHelper::Back;
51
52 this->EnabledOff();
53 this->VisibilityOff();
54
55 this->ControlPositionLC[0] = 0.;
56 this->ControlPositionLC[1] = 0.;
57 this->ControlPositionLC[2] = 0.;
58
59 this->MoveCallbackCommand = vtkCallbackCommand::New();
60 this->MoveCallbackCommand->SetClientData(this);
61 this->MoveCallbackCommand->SetCallback(vtkVRControlsHelper::MoveEvent);
62 this->MoveCallbackCommand->SetPassiveObserver(1);
63
64 this->Device = vtkEventDataDevice::Unknown;
65 this->Renderer = nullptr;
66
67 this->NeedUpdate = false;
68 this->LabelVisible = false;
69}
70
71//------------------------------------------------------------------------------
72vtkVRControlsHelper::~vtkVRControlsHelper()

Callers

nothing calls this directly

Calls 13

SetFontSizeMethod · 0.80
SetClientDataMethod · 0.80
NewFunction · 0.50
GetTextPropertyMethod · 0.45
SetInputMethod · 0.45
c_strMethod · 0.45
ForceOpaqueOnMethod · 0.45
SetBackgroundColorMethod · 0.45
SetPoint1Method · 0.45
SetPoint2Method · 0.45
SetInputConnectionMethod · 0.45
GetOutputPortMethod · 0.45

Tested by

no test coverage detected