ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
pointwidgetobserver.cpp
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #include "pointwidgetobserver.h"
9 
10 #include <vtkPointWidget.h>
11 
12 namespace VtkUtils {
13 
15  : AbstractWidgetObserver(parent) {}
16 
17 void PointWidgetObserver::Execute(vtkObject* caller,
18  unsigned long eventId,
19  void* callData) {
20  Q_UNUSED(eventId)
21  Q_UNUSED(callData)
22 
23  vtkPointWidget* widget = reinterpret_cast<vtkPointWidget*>(caller);
24  if (widget) emit positionChanged(widget->GetPosition());
25 }
26 
27 } // namespace VtkUtils
void Execute(vtkObject *caller, unsigned long eventId, void *callData)
PointWidgetObserver(QObject *parent=nullptr)
void positionChanged(double *position)