ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
GenericMesh.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 
10 #include <GenericMesh.h>
11 #include <GenericTriangle.h>
12 
13 namespace py = pybind11;
14 using namespace pybind11::literals;
15 
16 void define_GenericMesh(py::module &cccorelib)
17 {
18  py::class_<cloudViewer::GenericMesh>(cccorelib, "GenericMesh", R"pbdoc(
19  A generic mesh interface for data communication between library and client applications
20 )pbdoc")
21  .def("size", &cloudViewer::GenericMesh::size, R"pbdoc(
22  Returns the number of triangles
23 )pbdoc")
24  .def("forEach", &cloudViewer::GenericMesh::forEach, "action"_a)
25  .def("getBoundingBox", &cloudViewer::GenericMesh::getBoundingBox, "bbMin"_a, "bbMax"_a, R"pbdoc(
26  Returns the mesh bounding-box
27 
28  Parameters
29  ----------
30  bbMin: out parameter, lower bounding-box limits (Xmin,Ymin,Zmin)
31  bbMax: out parameter, higher bounding-box limits (Xmax,Ymax,Zmax)
32 )pbdoc")
33  .def("placeIteratorAtBeginning", &cloudViewer::GenericMesh::placeIteratorAtBeginning)
34  .def("_getNextTriangle",
36  py::return_value_policy::reference);
37 }
void define_GenericMesh(py::module &cccorelib)
Definition: GenericMesh.cpp:16
virtual unsigned size() const =0
Returns the number of triangles.
virtual void getBoundingBox(CCVector3 &bbMin, CCVector3 &bbMax)=0
Returns the mesh bounding-box.
virtual GenericTriangle * _getNextTriangle()=0
Returns the next triangle (relatively to the global iterator position)
virtual void placeIteratorAtBeginning()=0
Places the mesh iterator at the beginning.
virtual void forEach(genericTriangleAction action)=0
Fast iteration mechanism.