8 #include <pybind11/pybind11.h>
9 #include <pybind11/stl.h>
10 #include <pybind11/stl_bind.h>
12 #include "../casters.h"
18 using namespace pybind11::literals;
23 py::class_<ccPlanarEntityInterface>(m,
"ccPlanarEntityInterface")
28 py::class_<ccPlane, ccGenericPrimitive, ccPlanarEntityInterface>(m,
35 xWidth : PointCoordinateType
36 yWidth : PointCoordinateType
38 optional 3D transformation (can be set afterwards with ccDrawableObject::setGLTransformation)
39 name : str, default: Sphere
40 name of the sphere object
41 uniqueID : int, optional
42 unique ID (handle with care)
47 >>> plane = pycc.ccPlane(10.0, 5.0)
52 >>> plane.setXWidth(15.0)
53 >>> plane.setYWidth(12.5)
59 .def(py::init<PointCoordinateType, PointCoordinateType, const ccGLMatrix *, QString>(),
62 "transMat"_a =
nullptr,
63 "name"_a = QString(
"Plane"))
78 self.getEquation(N, constVal);
79 return py::make_tuple(N, constVal);
float PointCoordinateType
Type of the coordinates of a (N-D) point.
void define_ccPlane(py::module &m)
void showNormalVector(bool state)
Show normal vector.
bool normalVectorIsShown() const
Whether normal vector is shown or not.
virtual CCVector3 getNormal() const =0
Returns the entity normal.
static ccPlane * Fit(cloudViewer::GenericIndexedCloudPersist *cloud, double *rms=0)
Fits a plane primitive on a cloud.
CCVector3 getCenter() const
Returns the center.
void flip()
Flips the plane.
void setXWidth(PointCoordinateType w, bool autoUpdate=true)
Sets 'X' width.
PointCoordinateType getXWidth() const
Returns 'X' width.
PointCoordinateType getYWidth() const
Returns 'Y' width.
void setYWidth(PointCoordinateType h, bool autoUpdate=true)
Sets 'Y' width.