ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
GenericCloud.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/functional.h>
9 #include <pybind11/pybind11.h>
10 
11 #include <GenericCloud.h>
12 
13 namespace py = pybind11;
14 using namespace pybind11::literals;
15 
16 void define_GenericCloud(py::module &cccorelib)
17 {
18  py::class_<cloudViewer::GenericCloud>(cccorelib, "GenericCloud")
19  .def("size", &cloudViewer::GenericCloud::size)
20  .def("forEach", &cloudViewer::GenericCloud::forEach, "action"_a)
21  .def("getBoundingBox", &cloudViewer::GenericCloud::getBoundingBox, "bbMin"_a, "bbMax"_a)
22  .def("testVisibility", &cloudViewer::GenericCloud::testVisibility, "P"_a)
23  .def("placeIteratorAtBeginning", &cloudViewer::GenericCloud::placeIteratorAtBeginning)
24  .def("getNextPoint", &cloudViewer::GenericCloud::getNextPoint, py::return_value_policy::reference)
25  .def("enableScalarField", &cloudViewer::GenericCloud::enableScalarField)
26  .def("isScalarFieldEnabled", &cloudViewer::GenericCloud::enableScalarField)
27  .def(
28  "setPointScalarValue", &cloudViewer::GenericCloud::setPointScalarValue, "pointIndex"_a, "value"_a)
29  .def("getPointScalarValue", &cloudViewer::GenericCloud::getPointScalarValue, "pointIndex"_a);
30 }
void define_GenericCloud(py::module &cccorelib)
virtual void getBoundingBox(CCVector3 &bbMin, CCVector3 &bbMax)=0
Returns the cloud bounding box.
virtual bool enableScalarField()=0
Enables the scalar field associated to the cloud.
virtual void forEach(genericPointAction action)=0
Fast iteration mechanism.
virtual void placeIteratorAtBeginning()=0
Sets the cloud iterator at the beginning.
virtual unsigned char testVisibility(const CCVector3 &P) const
Definition: GenericCloud.h:65
virtual const CCVector3 * getNextPoint()=0
Returns the next point (relatively to the global iterator position)
virtual unsigned size() const =0
Returns the number of points.
virtual ScalarType getPointScalarValue(unsigned pointIndex) const =0
Returns the ith point associated scalar value.
virtual void setPointScalarValue(unsigned pointIndex, ScalarType value)=0
Sets the ith point associated scalar value.