8 #include <pybind11/pybind11.h>
9 #include <pybind11/stl.h>
10 #include <pybind11/stl_bind.h>
15 #include "../../wrapper/pycc/src/casters.h"
18 using namespace pybind11::literals;
26 py::bind_vector<std::vector<CLCloudDesc>>(m,
"CLCloudDescVector");
27 py::bind_vector<std::vector<CLMeshDesc>>(m,
"CLMeshDescVector");
29 py::enum_<CL_ENTITY_TYPE>(m,
"CL_ENTITY_TYPE")
34 py::class_<CLEntityDesc>(m,
"CLEntityDesc")
40 py::return_value_policy::reference);
42 py::class_<CLGroupDesc, CLEntityDesc>(m,
"CLGroupDesc")
45 py::class_<CLCloudDesc, CLEntityDesc>(m,
"CLCloudDesc")
46 .def_readonly(
"pc", &
CLCloudDesc::pc, py::return_value_policy::reference);
48 py::class_<CLMeshDesc, CLEntityDesc>(m,
"CLMeshDesc")
49 .def_readonly(
"mesh", &
CLMeshDesc::mesh, py::return_value_policy::reference);
51 py::class_<ccCommandLineInterface> PyccCommandLineInterface(m,
"ccCommandLineInterface");
53 py::enum_<ccCommandLineInterface::ExportOption>(PyccCommandLineInterface,
"ExportOption");
55 py::class_<ccCommandLineInterface::GlobalShiftOptions> PyGlobalShiftOptions(
56 PyccCommandLineInterface,
"GlobalShiftOptions");
58 py::enum_<ccCommandLineInterface::GlobalShiftOptions::Mode>(PyGlobalShiftOptions,
"Mode")
59 .value(
"NO_GLOBAL_SHIFT", ccCommandLineInterface::GlobalShiftOptions::Mode::NO_GLOBAL_SHIFT)
60 .value(
"AUTO_GLOBAL_SHIFT",
61 ccCommandLineInterface::GlobalShiftOptions::Mode::AUTO_GLOBAL_SHIFT)
62 .value(
"FIRST_GLOBAL_SHIFT",
63 ccCommandLineInterface::GlobalShiftOptions::Mode::FIRST_GLOBAL_SHIFT)
64 .value(
"CUSTOM_GLOBAL_SHIFT",
65 ccCommandLineInterface::GlobalShiftOptions::Mode::CUSTOM_GLOBAL_SHIFT)
69 .def_readwrite(
"customGlobalShift",
73 PyccCommandLineInterface
75 (std::vector<CLCloudDesc> &
77 py::return_value_policy::reference)
79 (std::vector<CLMeshDesc> &
81 .def(
"getExportFilename",
84 "extension"_a = QString(),
85 "suffix"_a = QString(),
86 "baseOutputFilename"_a =
nullptr,
87 "forceNoTimestamp"_a =
false)
91 "suffix"_a = QString(),
92 "outputFilename"_a =
nullptr,
96 "suffix"_a = QString(),
97 "allAtOnce"_a =
false,
98 "allAtOnceFileName"_a =
nullptr)
101 "suffix"_a = QString(),
102 "allAtOnce"_a =
false,
103 "allAtOnceFileName"_a =
nullptr)
109 {
return self.importFile(
filename, opts); },
void define_ccCommandLine(py::module &m)
PYBIND11_MAKE_OPAQUE(std::vector< CLCloudDesc >)
virtual bool saveClouds(QString suffix=QString(), bool allAtOnce=false, const QString *allAtOnceFileName=nullptr)=0
Saves all clouds.
virtual QString getExportFilename(const CLEntityDesc &entityDesc, QString extension=QString(), QString suffix=QString(), QString *baseOutputFilename=nullptr, bool forceNoTimestamp=false) const =0
Returns the name of a to-be-exported entity.
virtual QString exportEntity(CLEntityDesc &entityDesc, const QString &suffix=QString(), QString *outputFilename=nullptr, ccCommandLineInterface::ExportOptions options=ExportOption::NoOptions)=0
Exports a cloud or a mesh.
virtual std::vector< CLMeshDesc > & meshes()
Currently opened meshes and their filename.
virtual bool saveMeshes(QString suffix=QString(), bool allAtOnce=false, const QString *allAtOnceFileName=nullptr)=0
Saves all meshes.
virtual std::vector< CLCloudDesc > & clouds()
Currently opened point clouds and their filename.
Hierarchical CLOUDVIEWER Object.
Loaded entity description.
virtual ccHObject * getEntity()=0
CCVector3d customGlobalShift