ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
CCGeom.cpp File Reference
#include <pybind11/operators.h>
#include <pybind11/pybind11.h>
#include <CVGeom.h>
Include dependency graph for CCGeom.cpp:

Macros

#define DEFINE_VECTOR2TPL_TYPE(cppname, pyname, type_)
 
#define DEFINE_TUPLE3TPL(cppname, pyname, type_)
 
#define DEFINE_CCVECTOR3(cppname, pyname, type_)
 

Functions

void define_CCGeom (py::module &cccorelib)
 

Macro Definition Documentation

◆ DEFINE_CCVECTOR3

#define DEFINE_CCVECTOR3 (   cppname,
  pyname,
  type_ 
)
Value:
py::class_<cppname, Tuple3Tpl<type_>>(cccorelib, pyname) \
.def(py::init<>()) \
.def(py::init<type_, type_, type_>()) \
.def("__mul__", [](const cppname &self, PointCoordinateType val) { return self * val; }) \
.def("__sub__", [](const cppname &self, const cppname &other) { return self - other; }) \
.def("__div__", &cppname::operator/) \
.def("__add__", [](const cppname &self, const cppname &other) { return self + other; }) \
.def("__repr__", \
[](const cppname &self) \
{ \
return std::string("<") + pyname + "(" + std::to_string(self.x) + ", " + \
std::to_string(self.y) + ", " + std::to_string(self.z) + ")>"; \
});

◆ DEFINE_TUPLE3TPL

#define DEFINE_TUPLE3TPL (   cppname,
  pyname,
  type_ 
)

◆ DEFINE_VECTOR2TPL_TYPE

#define DEFINE_VECTOR2TPL_TYPE (   cppname,
  pyname,
  type_ 
)

Function Documentation

◆ define_CCGeom()

void define_CCGeom ( py::module &  cccorelib)
x
normal_z x
Definition: my_point_types.h:165
y
normal_z y
Definition: my_point_types.h:168
PointCoordinateType
float PointCoordinateType
Type of the coordinates of a (N-D) point.
Definition: CVTypes.h:16
z
normal_z z
Definition: my_point_types.h:165
patch::to_string
std::string to_string(const T &n)
Definition: Common.h:20