ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ccInteractor.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 <pybind11/pybind11.h>
9 #include <pybind11/stl.h>
10 #include <pybind11/stl_bind.h>
11 
12 #include <ecv2DLabel.h>
13 
14 namespace py = pybind11;
15 using namespace pybind11::literals;
16 
17 void define_ccInteractor(py::module &m)
18 {
19  py::class_<ccInteractor>(m, "ccInteractor")
20  .def("acceptClick", &ccInteractor::acceptClick, "x"_a, "y"_a, "button"_a)
21  .def("move2D",
23  "x"_a,
24  "y"_a,
25  "dx"_a,
26  "dy"_a,
27  "screenWidth"_a,
28  "screenHeight"_a)
29  .def("move3D", &ccInteractor::move3D, "u"_a);
30 }
void define_ccInteractor(py::module &m)
virtual bool acceptClick(int x, int y, Qt::MouseButton button)
Called on mouse click.
Definition: ecvInteractor.h:25
virtual bool move3D(const CCVector3d &u)
Called on mouse move (for 3D interactors)
Definition: ecvInteractor.h:40
virtual bool move2D(int x, int y, int dx, int dy, int screenWidth, int screenHeight)
Called on mouse move (for 2D interactors)
Definition: ecvInteractor.h:32