Skip to content

Commit

Permalink
Adapt win (unsigned long->size_t)
Browse files Browse the repository at this point in the history
  • Loading branch information
Miraclelzk authored and LiangliangNan committed Dec 30, 2024
1 parent 0a4f949 commit af7da3c
Show file tree
Hide file tree
Showing 9 changed files with 156 additions and 156 deletions.
2 changes: 1 addition & 1 deletion easy3d/util/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ namespace easy3d {
#define EASY3D_VERSION_NR 1020504

/// Easy3D release date, in the format YYYYMMDD.
#define EASY3D_RELEASE_DATE 20241229
#define EASY3D_RELEASE_DATE 20241230


#endif // EASY3D_UTIL_VERSION_H
6 changes: 3 additions & 3 deletions python/bindings/easy3d/algo/surface_mesh_simplification.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <easy3d/algo/surface_mesh_components.h>
#include <easy3d/algo/surface_mesh_components.h>
#include <easy3d/algo/surface_mesh_simplification.h>
#include <easy3d/algo/surface_mesh_stitching.h>
#include <easy3d/algo/surface_mesh_subdivision.h>
Expand Down Expand Up @@ -36,7 +36,7 @@
struct PyCallBack_easy3d_Property_easy3d_Quadric_t : public easy3d::Property<easy3d::Quadric> {
using easy3d::Property<easy3d::Quadric>::Property;

class easy3d::Quadric & operator[](unsigned long a0) override {
class easy3d::Quadric & operator[](size_t a0) override {
pybind11::gil_scoped_acquire gil;
pybind11::function overload = pybind11::get_overload(static_cast<const easy3d::Property<easy3d::Quadric> *>(this), "__getitem__");
if (overload) {
Expand All @@ -55,7 +55,7 @@ struct PyCallBack_easy3d_Property_easy3d_Quadric_t : public easy3d::Property<eas
struct PyCallBack_easy3d_Property_easy3d_NormalCone_t : public easy3d::Property<easy3d::NormalCone> {
using easy3d::Property<easy3d::NormalCone>::Property;

class easy3d::NormalCone & operator[](unsigned long a0) override {
class easy3d::NormalCone & operator[](size_t a0) override {
pybind11::gil_scoped_acquire gil;
pybind11::function overload = pybind11::get_overload(static_cast<const easy3d::Property<easy3d::NormalCone> *>(this), "__getitem__");
if (overload) {
Expand Down
46 changes: 23 additions & 23 deletions python/bindings/easy3d/core/graph.cpp

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions python/bindings/easy3d/core/mat.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <easy3d/core/types.h>
#include <easy3d/core/types.h>

#include <pybind11/pybind11.h>
#include <string>
Expand All @@ -25,7 +25,7 @@ void bind_easy3d_core_mat(pybind11::module_& m)
cl.def("num_columns", (unsigned long (easy3d::Mat<3UL,3UL,float>::*)() const) &easy3d::Mat<3, 3, float>::num_columns, "C++: easy3d::Mat<3, 3, float>::num_columns() const --> unsigned long");
cl.def("row", (class easy3d::Vec<3, float> (easy3d::Mat<3UL,3UL,float>::*)(unsigned long) const) &easy3d::Mat<3, 3, float>::row, "C++: easy3d::Mat<3, 3, float>::row(unsigned long) const --> class easy3d::Vec<3, float>", pybind11::arg("r"));
cl.def("col", (class easy3d::Vec<3, float> (easy3d::Mat<3UL,3UL,float>::*)(unsigned long) const) &easy3d::Mat<3, 3, float>::col, "C++: easy3d::Mat<3, 3, float>::col(unsigned long) const --> class easy3d::Vec<3, float>", pybind11::arg("c"));
cl.def("__call__", (float & (easy3d::Mat<3UL,3UL,float>::*)(unsigned long, unsigned long)) &easy3d::Mat<3, 3, float>::operator(), "C++: easy3d::Mat<3, 3, float>::operator()(unsigned long, unsigned long) --> float &", pybind11::return_value_policy::automatic, pybind11::arg("row"), pybind11::arg("col"));
cl.def("__call__", (float & (easy3d::Mat<3UL,3UL,float>::*)(size_t, size_t)) &easy3d::Mat<3, 3, float>::operator(), "C++: easy3d::Mat<3, 3, float>::operator()(size_t, size_t) --> float &", pybind11::return_value_policy::automatic, pybind11::arg("row"), pybind11::arg("col"));
cl.def("load_zero", (void (easy3d::Mat<3UL,3UL,float>::*)()) &easy3d::Mat<3, 3, float>::load_zero, "C++: easy3d::Mat<3, 3, float>::load_zero() --> void");
cl.def("load_identity", [](easy3d::Mat<3UL,3UL,float> &o) -> void { return o.load_identity(); }, "");
cl.def("load_identity", (void (easy3d::Mat<3UL,3UL,float>::*)(float)) &easy3d::Mat<3, 3, float>::load_identity, "C++: easy3d::Mat<3, 3, float>::load_identity(float) --> void", pybind11::arg("s"));
Expand Down Expand Up @@ -59,7 +59,7 @@ void bind_easy3d_core_mat(pybind11::module_& m)
cl.def("num_columns", (unsigned long (easy3d::Mat<4UL,4UL,float>::*)() const) &easy3d::Mat<4, 4, float>::num_columns, "C++: easy3d::Mat<4, 4, float>::num_columns() const --> unsigned long");
cl.def("row", (class easy3d::Vec<4, float> (easy3d::Mat<4UL,4UL,float>::*)(unsigned long) const) &easy3d::Mat<4, 4, float>::row, "C++: easy3d::Mat<4, 4, float>::row(unsigned long) const --> class easy3d::Vec<4, float>", pybind11::arg("r"));
cl.def("col", (class easy3d::Vec<4, float> (easy3d::Mat<4UL,4UL,float>::*)(unsigned long) const) &easy3d::Mat<4, 4, float>::col, "C++: easy3d::Mat<4, 4, float>::col(unsigned long) const --> class easy3d::Vec<4, float>", pybind11::arg("c"));
cl.def("__call__", (float & (easy3d::Mat<4UL,4UL,float>::*)(unsigned long, unsigned long)) &easy3d::Mat<4, 4, float>::operator(), "C++: easy3d::Mat<4, 4, float>::operator()(unsigned long, unsigned long) --> float &", pybind11::return_value_policy::automatic, pybind11::arg("r"), pybind11::arg("c"));
cl.def("__call__", (float & (easy3d::Mat<4UL,4UL,float>::*)(size_t, size_t)) &easy3d::Mat<4, 4, float>::operator(), "C++: easy3d::Mat<4, 4, float>::operator()(size_t, size_t) --> float &", pybind11::return_value_policy::automatic, pybind11::arg("r"), pybind11::arg("c"));
cl.def("load_zero", (void (easy3d::Mat<4UL,4UL,float>::*)()) &easy3d::Mat<4, 4, float>::load_zero, "C++: easy3d::Mat<4, 4, float>::load_zero() --> void");
cl.def("load_identity", [](easy3d::Mat<4UL,4UL,float> &o) -> void { return o.load_identity(); }, "");
cl.def("load_identity", (void (easy3d::Mat<4UL,4UL,float>::*)(float)) &easy3d::Mat<4, 4, float>::load_identity, "C++: easy3d::Mat<4, 4, float>::load_identity(float) --> void", pybind11::arg("s"));
Expand Down Expand Up @@ -107,7 +107,7 @@ void bind_easy3d_core_mat(pybind11::module_& m)
cl.def("num_columns", (unsigned long (easy3d::Mat<3UL,3UL,float>::*)() const) &easy3d::Mat<3, 3, float>::num_columns, "C++: easy3d::Mat<3, 3, float>::num_columns() const --> unsigned long");
cl.def("row", (class easy3d::Vec<3, float> (easy3d::Mat<3UL,3UL,float>::*)(unsigned long) const) &easy3d::Mat<3, 3, float>::row, "C++: easy3d::Mat<3, 3, float>::row(unsigned long) const --> class easy3d::Vec<3, float>", pybind11::arg("r"));
cl.def("col", (class easy3d::Vec<3, float> (easy3d::Mat<3UL,3UL,float>::*)(unsigned long) const) &easy3d::Mat<3, 3, float>::col, "C++: easy3d::Mat<3, 3, float>::col(unsigned long) const --> class easy3d::Vec<3, float>", pybind11::arg("c"));
cl.def("__call__", (float & (easy3d::Mat<3UL,3UL,float>::*)(unsigned long, unsigned long)) &easy3d::Mat<3, 3, float>::operator(), "C++: easy3d::Mat<3, 3, float>::operator()(unsigned long, unsigned long) --> float &", pybind11::return_value_policy::automatic, pybind11::arg("row"), pybind11::arg("col"));
cl.def("__call__", (float & (easy3d::Mat<3UL,3UL,float>::*)(size_t, size_t)) &easy3d::Mat<3, 3, float>::operator(), "C++: easy3d::Mat<3, 3, float>::operator()(size_t, size_t) --> float &", pybind11::return_value_policy::automatic, pybind11::arg("row"), pybind11::arg("col"));
cl.def("load_zero", (void (easy3d::Mat<3UL,3UL,float>::*)()) &easy3d::Mat<3, 3, float>::load_zero, "C++: easy3d::Mat<3, 3, float>::load_zero() --> void");
cl.def("load_identity", [](easy3d::Mat<3UL,3UL,float> &o) -> void { return o.load_identity(); }, "");
cl.def("load_identity", (void (easy3d::Mat<3UL,3UL,float>::*)(float)) &easy3d::Mat<3, 3, float>::load_identity, "C++: easy3d::Mat<3, 3, float>::load_identity(float) --> void", pybind11::arg("s"));
Expand Down Expand Up @@ -163,7 +163,7 @@ void bind_easy3d_core_mat(pybind11::module_& m)
cl.def("num_columns", (unsigned long (easy3d::Mat<4UL,4UL,float>::*)() const) &easy3d::Mat<4, 4, float>::num_columns, "C++: easy3d::Mat<4, 4, float>::num_columns() const --> unsigned long");
cl.def("row", (class easy3d::Vec<4, float> (easy3d::Mat<4UL,4UL,float>::*)(unsigned long) const) &easy3d::Mat<4, 4, float>::row, "C++: easy3d::Mat<4, 4, float>::row(unsigned long) const --> class easy3d::Vec<4, float>", pybind11::arg("r"));
cl.def("col", (class easy3d::Vec<4, float> (easy3d::Mat<4UL,4UL,float>::*)(unsigned long) const) &easy3d::Mat<4, 4, float>::col, "C++: easy3d::Mat<4, 4, float>::col(unsigned long) const --> class easy3d::Vec<4, float>", pybind11::arg("c"));
cl.def("__call__", (float & (easy3d::Mat<4UL,4UL,float>::*)(unsigned long, unsigned long)) &easy3d::Mat<4, 4, float>::operator(), "C++: easy3d::Mat<4, 4, float>::operator()(unsigned long, unsigned long) --> float &", pybind11::return_value_policy::automatic, pybind11::arg("r"), pybind11::arg("c"));
cl.def("__call__", (float & (easy3d::Mat<4UL,4UL,float>::*)(size_t, size_t)) &easy3d::Mat<4, 4, float>::operator(), "C++: easy3d::Mat<4, 4, float>::operator()(size_t, size_t) --> float &", pybind11::return_value_policy::automatic, pybind11::arg("r"), pybind11::arg("c"));
cl.def("load_zero", (void (easy3d::Mat<4UL,4UL,float>::*)()) &easy3d::Mat<4, 4, float>::load_zero, "C++: easy3d::Mat<4, 4, float>::load_zero() --> void");
cl.def("load_identity", [](easy3d::Mat<4UL,4UL,float> &o) -> void { return o.load_identity(); }, "");
cl.def("load_identity", (void (easy3d::Mat<4UL,4UL,float>::*)(float)) &easy3d::Mat<4, 4, float>::load_identity, "C++: easy3d::Mat<4, 4, float>::load_identity(float) --> void", pybind11::arg("s"));
Expand Down
4 changes: 2 additions & 2 deletions python/bindings/easy3d/core/plane.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <easy3d/core/line.h>
#include <easy3d/core/line.h>
#include <easy3d/core/plane.h>
#include <easy3d/core/vec.h>

Expand Down Expand Up @@ -30,7 +30,7 @@ void bind_easy3d_core_plane(pybind11::module_& m)
cl.def("b", (float (easy3d::GenericPlane<float>::*)() const) &easy3d::GenericPlane<float>::b, "C++: easy3d::GenericPlane<float>::b() const --> float");
cl.def("c", (float (easy3d::GenericPlane<float>::*)() const) &easy3d::GenericPlane<float>::c, "C++: easy3d::GenericPlane<float>::c() const --> float");
cl.def("d", (float (easy3d::GenericPlane<float>::*)() const) &easy3d::GenericPlane<float>::d, "C++: easy3d::GenericPlane<float>::d() const --> float");
cl.def("__getitem__", (float & (easy3d::GenericPlane<float>::*)(unsigned long)) &easy3d::GenericPlane<float>::operator[], "C++: easy3d::GenericPlane<float>::operator[](unsigned long) --> float &", pybind11::return_value_policy::automatic, pybind11::arg("idx"));
cl.def("__getitem__", (float & (easy3d::GenericPlane<float>::*)(size_t)) &easy3d::GenericPlane<float>::operator[], "C++: easy3d::GenericPlane<float>::operator[](size_t) --> float &", pybind11::return_value_policy::automatic, pybind11::arg("idx"));
cl.def("normal", (class easy3d::Vec<3, float> (easy3d::GenericPlane<float>::*)() const) &easy3d::GenericPlane<float>::normal, "C++: easy3d::GenericPlane<float>::normal() const --> class easy3d::Vec<3, float>");
cl.def("point", (class easy3d::Vec<3, float> (easy3d::GenericPlane<float>::*)() const) &easy3d::GenericPlane<float>::point, "C++: easy3d::GenericPlane<float>::point() const --> class easy3d::Vec<3, float>");
cl.def("base1", (class easy3d::Vec<3, float> (easy3d::GenericPlane<float>::*)() const) &easy3d::GenericPlane<float>::base1, "C++: easy3d::GenericPlane<float>::base1() const --> class easy3d::Vec<3, float>");
Expand Down
6 changes: 3 additions & 3 deletions python/bindings/easy3d/core/point_cloud.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <easy3d/core/point_cloud.h>
#include <easy3d/core/point_cloud.h>
#include <easy3d/core/property.h>
#include <easy3d/renderer/renderer.h>

Expand Down Expand Up @@ -56,7 +56,7 @@ struct PyCallBack_easy3d_PointCloud_VertexProperty_easy3d_Vec_3_float_t : public
using easy3d::PointCloud::VertexProperty<easy3d::vec3>::VertexProperty;

using _binder_ret_0 = easy3d::vec3 &;
_binder_ret_0 operator[](unsigned long a0) override {
_binder_ret_0 operator[](size_t a0) override {
pybind11::gil_scoped_acquire gil;
pybind11::function overload = pybind11::get_overload(static_cast<const easy3d::PointCloud::VertexProperty<easy3d::vec3> *>(this), "__getitem__");
if (overload) {
Expand Down Expand Up @@ -273,7 +273,7 @@ void bind_easy3d_core_point_cloud(pybind11::module_& m)
cl.def("__getitem__", (easy3d::vec3 & (easy3d::PointCloud::VertexProperty<easy3d::vec3>::*)(struct easy3d::PointCloud::Vertex)) &easy3d::PointCloud::VertexProperty<easy3d::vec3>::operator[], "C++: easy3d::PointCloud::VertexProperty<easy3d::vec3>::operator[](struct easy3d::PointCloud::Vertex) --> easy3d::vec3 &", pybind11::return_value_policy::automatic, pybind11::arg("v"));
cl.def("assign", (class easy3d::PointCloud::VertexProperty<easy3d::vec3 > & (easy3d::PointCloud::VertexProperty<easy3d::vec3>::*)(const class easy3d::PointCloud::VertexProperty<easy3d::vec3 > &)) &easy3d::PointCloud::VertexProperty<easy3d::vec3>::operator=, "C++: easy3d::PointCloud::VertexProperty<easy3d::vec3>::operator=(const class easy3d::PointCloud::VertexProperty<easy3d::vec3 > &) --> class easy3d::PointCloud::VertexProperty<easy3d::vec3 > &", pybind11::return_value_policy::automatic, pybind11::arg(""));
cl.def("reset", (void (easy3d::Property<easy3d::vec3>::*)()) &easy3d::Property<easy3d::vec3>::reset, "C++: easy3d::Property<easy3d::vec3>::reset() --> void");
cl.def("__getitem__", (easy3d::vec3 & (easy3d::Property<easy3d::vec3>::*)(unsigned long)) &easy3d::Property<easy3d::vec3>::operator[], "C++: easy3d::Property<easy3d::vec3>::operator[](unsigned long) --> easy3d::vec3 &", pybind11::return_value_policy::automatic, pybind11::arg("i"));
cl.def("__getitem__", (easy3d::vec3 & (easy3d::Property<easy3d::vec3>::*)(size_t)) &easy3d::Property<easy3d::vec3>::operator[], "C++: easy3d::Property<easy3d::vec3>::operator[](size_t) --> easy3d::vec3 &", pybind11::return_value_policy::automatic, pybind11::arg("i"));
cl.def("data", (const easy3d::vec3 * (easy3d::Property<easy3d::vec3>::*)() const) &easy3d::Property<easy3d::vec3>::data, "C++: easy3d::Property<easy3d::vec3>::data() const --> const easy3d::vec3 *", pybind11::return_value_policy::automatic);
cl.def("vector", (class std::vector<easy3d::vec3 > & (easy3d::Property<easy3d::vec3>::*)()) &easy3d::Property<easy3d::vec3>::vector, "C++: easy3d::Property<easy3d::vec3>::vector() --> class std::vector<easy3d::vec3 > &", pybind11::return_value_policy::automatic);
cl.def("array", (class easy3d::PropertyArray<easy3d::vec3 > & (easy3d::Property<easy3d::vec3>::*)()) &easy3d::Property<easy3d::vec3>::array, "C++: easy3d::Property<easy3d::vec3>::array() --> class easy3d::PropertyArray<easy3d::vec3 > &", pybind11::return_value_policy::automatic);
Expand Down
Loading

0 comments on commit af7da3c

Please sign in to comment.