8 #include <pybind11/pybind11.h>
9 #include <pybind11/stl.h>
10 #include <pybind11/stl_bind.h>
16 #include "../casters.h"
19 using namespace pybind11::literals;
23 py::class_<ccPolyline, cloudViewer::Polyline, ccShiftedObject>(m,
"ccPolyline")
27 py::keep_alive<1, 2>()
41 std::vector<ccPolyline *> parts;
42 self.split(maxEdgeLength, parts);
58 "samplingParameter"_a,
float PointCoordinateType
Type of the coordinates of a (N-D) point.
void define_ccPolyline(py::module &m)
PointCoordinateType computeLength() const
Computes the polyline length.
void setForeground(bool state)
Defines if the polyline is drawn in background or foreground.
bool verticesShown() const
Whether the polyline vertices should be displayed or not.
void set2DMode(bool state)
Defines if the polyline is considered as 2D or 3D.
ccPointCloud * samplePoints(bool densityBased, double samplingParameter, bool withRGB)
Samples points on the polyline.
bool is2DMode() const
Returns whether the polyline is considered as 2D or 3D.
ccPolyline * smoothChaikin(PointCoordinateType ratio, unsigned iterationCount) const
Smoothes the polyline (Chaikin algorithm)
void showArrow(bool state, unsigned vertIndex, PointCoordinateType length)
Shows an arrow in place of a given vertex.
const ecvColor::Rgb & getColor() const
Returns the polyline color.
void setVertexMarkerWidth(int width)
Sets the width of vertex markers.
void importParametersFrom(const ccPolyline &poly)
Copy the parameters from another polyline.
void showVertices(bool state)
Sets whether to display or hide the polyline vertices.
unsigned segmentCount() const
Returns the number of segments.
PointCoordinateType getWidth() const
Returns the width of the line.
int getVertexMarkerWidth() const
Returns the width of vertex markers.
void setColor(const ecvColor::Rgb &col)
Sets the polyline color.
void setWidth(PointCoordinateType width)
Sets the width of the line.
A generic 3D point cloud with index-based and presistent access to points.