Skip to content

Commit

Permalink
module_local()
Browse files Browse the repository at this point in the history
  • Loading branch information
B1ueber2y committed Jan 7, 2025
1 parent 96742e6 commit e969cb1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions limap/base/bindings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,8 @@ void bind_base_pycolmap(py::module &m_parent) {
py::module_ m = m_parent.def_submodule("pycolmap");

// The following copied from pycolmap
py::class_<Eigen::Quaterniond> PyRotation3d(m, "Rotation3d");
py::class_<Eigen::Quaterniond> PyRotation3d(m, "Rotation3d",
py::module_local());
PyRotation3d.def(py::init([]() { return Eigen::Quaterniond::Identity(); }))
.def(py::init<const Eigen::Vector4d &>(), "xyzw"_a,
"Quaternion in [x,y,z,w] format.")
Expand Down Expand Up @@ -1405,7 +1406,7 @@ void bind_base_pycolmap(py::module &m_parent) {
py::implicitly_convertible<py::array, Eigen::Quaterniond>();
MakeDataclass(PyRotation3d);

py::class_<colmap::Rigid3d> PyRigid3d(m, "Rigid3d");
py::class_<colmap::Rigid3d> PyRigid3d(m, "Rigid3d", py::module_local());
PyRigid3d.def(py::init<>())
.def(py::init<const Eigen::Quaterniond &, const Eigen::Vector3d &>(),
"rotation"_a, "translation"_a)
Expand Down Expand Up @@ -1436,7 +1437,7 @@ void bind_base_pycolmap(py::module &m_parent) {
py::implicitly_convertible<py::array, Rigid3d>();
MakeDataclass(PyRigid3d);

py::class_<colmap::Sim3d> PySim3d(m, "Sim3d");
py::class_<colmap::Sim3d> PySim3d(m, "Sim3d", py::module_local());
PySim3d.def(py::init<>())
.def(py::init<double, const Eigen::Quaterniond &,
const Eigen::Vector3d &>(),
Expand Down

0 comments on commit e969cb1

Please sign in to comment.