39 py::class_<ccGenericPrimitive, PyGenericPrimitive<ccGenericPrimitive>,
40 std::shared_ptr<ccGenericPrimitive>,
ccMesh>
41 primitive(m,
"ccGenericPrimitive",
"The base primitives class.");
46 "ccGenericPrimitive with type {}, precision {}",
54 return std::shared_ptr<ccGenericPrimitive>(
63 "Returns type name (sphere, cylinder, etc.)")
69 "Sets primitive color (shortcut).",
"color"_a)
70 .def(
"has_drawing_precision",
72 "Whether drawing is dependent on 'precision' parameter.")
73 .def(
"set_drawing_precision",
75 "Sets drawing precision.",
"steps"_a)
76 .def(
"get_drawing_precision",
78 "Returns drawing precision (or 0 if feature is not "
86 "Returns the transformation that is currently applied to "
89 "get_transformation_history",
94 "inherited methods (ccHObject).");
98 {{
"color",
"rgb color."}});
100 "has_drawing_precision");
102 m,
"ccGenericPrimitive",
"set_drawing_precision",
105 "- steps should always be >= "
106 "ccGenericPrimitive::MIN_DRAWING_PRECISION"
107 "- changes primitive content(calls "
108 "ccGenericPrimitive::updateRepresentation)"
109 "- may fail if not enough memory!"
110 "- param steps drawing precision"
111 "return success(false if not enough memory)"}});
113 "get_drawing_precision");
115 "get_transformation");
117 "get_transformation_history");
120 py::class_<ccPlane, ccGenericPrimitive, std::shared_ptr<ccPlane>,
122 pyplane(m,
"ccPlane", py::multiple_inheritance(),
123 "The 3D plane primitive.");
124 py::detail::bind_default_constructor<ccPlane>(pyplane);
125 py::detail::bind_copy_functions<ccPlane>(pyplane);
126 pyplane.def(py::init([](
const std::string&
name) {
129 "Simplified constructor",
"name"_a =
"Plane")
132 const Eigen::Matrix4d& trans_matrix,
133 const std::string&
name) {
141 "Plane normal corresponds to 'Z' dimension: "
143 "-param width plane width along 'X' dimension; "
145 "-param height plane width along 'Y' dimension; "
147 "param trans_matrix optional 3D transformation (can be set "
148 "afterwards with ccDrawableObject::setGLTransformation); "
151 "width"_a,
"height"_a,
152 "trans_matrix"_a = Eigen::Matrix4d::Identity(),
158 "ccPlane with faces {}, width {}, height {} and "
159 "equation {}x + {}y + {}z = {}",
161 eq[0], eq[1], eq[2], eq[3]);
172 "Sets 'X' width.",
"width"_a,
"auto_update"_a =
true)
180 "Sets 'Y' width.",
"height"_a,
"auto_update"_a =
true)
186 "Returns the plane center.")
192 "inherited from ccPlanarEntityInterface, returns the plane "
203 "Returns the equation of the plane. Equation: N.P + "
205 "i.e.Nx.x + Ny.y + Nz.z + constVal = 0");
210 m,
"ccPlane",
"set_width",
211 {{
"width",
"plane 'X' width."}, {
"auto_update",
"auto update"}});
214 m,
"ccPlane",
"set_height",
215 {{
"height",
"plane 'Y' width."}, {
"auto_update",
"auto update"}});
221 py::class_<ccBox, PyGenericPrimitive<ccBox>, std::shared_ptr<ccBox>,
223 pybox(m,
"ccBox",
"The 3D Box primitive.");
224 py::detail::bind_default_constructor<ccBox>(pybox);
225 py::detail::bind_copy_functions<ccBox>(pybox);
226 pybox.def(py::init([](
const std::string&
name) {
229 "Simplified constructor",
"name"_a =
"Box")
230 .def(py::init([](
const Eigen::Vector3d& dims,
231 const Eigen::Matrix4d& trans_matrix,
232 const std::string&
name) {
240 "Box dimensions axis along each dimension are defined in a "
242 "A box is in fact composed of 6 planes (ccPlane)."
244 "-param dims box dimensions; "
246 "-param trans_matrix optional 3D transformation (can be set "
247 "afterwards with ccDrawableObject::setGLTransformation); "
250 "dims"_a,
"trans_matrix"_a = Eigen::Matrix4d::Identity(),
253 [](
const ccBox& box) {
256 "ccBox with faces {} and dimension ({}, {}, {})",
257 box.
size(), dims.
x, dims.
y, dims.
z);
265 "Returns box dimensions.")
268 [](
ccBox& box,
const Eigen::Vector3d& dims) {
272 "Returns box dimensions.",
"dims"_a);
276 m,
"ccBox",
"set_dimensions",
277 {{
"dims",
"box dimensions (width, length, height)."}});
280 py::class_<ccSphere, PyGenericPrimitive<ccSphere>,
282 pysphere(m,
"ccSphere",
"The 3D sphere primitive.");
283 py::detail::bind_default_constructor<ccSphere>(pysphere);
284 py::detail::bind_copy_functions<ccSphere>(pysphere);
285 pysphere.def(py::init([](
const std::string&
name) {
288 "Simplified constructor",
"name"_a =
"Sphere")
290 const Eigen::Matrix4d& trans_matrix,
291 unsigned precision,
const std::string&
name) {
299 "-param radius sphere radius; "
301 "-param trans_matrix optional 3D transformation (can be set "
302 "afterwards with ccDrawableObject::setGLTransformation); "
304 "-param precision drawing precision (angular step = "
308 "radius"_a,
"trans_matrix"_a = Eigen::Matrix4d::Identity(),
309 "precision"_a = 24,
"name"_a =
"Sphere")
313 fmt::format(
"ccSphere with faces {} and radius {}",
323 m,
"ccSphere",
"set_radius",
325 "sphere radius, warning changes primitive content "
326 "(calls ccGenericPrimitive::updateRepresentation)."}});
329 py::class_<ccTorus, PyGenericPrimitive<ccTorus>, std::shared_ptr<ccTorus>,
331 pytorus(m,
"ccTorus",
"The 3D torus primitive.");
332 py::detail::bind_default_constructor<ccTorus>(pytorus);
333 py::detail::bind_copy_functions<ccTorus>(pytorus);
334 pytorus.def(py::init([](
const std::string&
name) {
337 "Simplified constructor",
"name"_a =
"Torus")
340 double angle_rad,
bool rectangular_section,
342 const Eigen::Matrix4d& trans_matrix,
343 unsigned precision,
const std::string&
name) {
346 auto prim =
new ccTorus(inside_radius, outside_radius,
347 angle_rad, rectangular_section,
348 rect_section_height, &matrix,
349 name.c_str(), precision);
353 "Torus is defined in the XY plane by default: "
355 "-param inside_radius inside radius.",
357 "-param outside_radius outside radius.",
359 "-param angle_rad subtended angle (in radians).",
361 "-param rectangular_section whether section is rectangular or "
364 "-param rect_section_height section height (if rectangular "
367 "-param trans_matrix optional 3D transformation (can be set "
368 "afterwards with ccDrawableObject::setGLTransformation); "
370 "-param precision drawing precision (angular step = "
374 "inside_radius"_a,
"outside_radius"_a,
375 "angle_rad"_a = 2.0 *
M_PI,
"rectangular_section"_a =
false,
376 "rect_section_height"_a = 0,
377 "trans_matrix"_a = Eigen::Matrix4d::Identity(),
378 "precision"_a = 24,
"name"_a =
"Torus")
382 "ccTorus with faces {}, inside-radius {}, "
383 "outside-radius {} and height {}",
390 "Returns the torus inside radius.")
392 "Returns the torus outside radius.")
394 "Returns the torus rectangular section height (along Y-axis) "
397 "Returns whether torus has a rectangular (true) or circular "
400 "Returns the torus subtended angle (in radians).");
409 py::class_<ccQuadric, PyGenericPrimitive<ccQuadric>,
411 pyquadric(m,
"ccQuadric",
"The 3D quadric primitive.");
412 py::detail::bind_default_constructor<ccQuadric>(pyquadric);
413 py::detail::bind_copy_functions<ccQuadric>(pyquadric);
415 .def(py::init([](
const std::string&
name) {
418 "Simplified constructor",
"name"_a =
"Quadric")
419 .def(py::init([](
const Eigen::Vector2d& min_corner,
420 const Eigen::Vector2d& max_corner,
423 const Eigen::Matrix4d& trans_matrix,
424 unsigned precision,
const std::string&
name) {
434 for (
size_t i = 0; i < 6; ++i) {
438 Tuple3ub dims(
static_cast<unsigned char>(dimensions(0)),
439 static_cast<unsigned char>(dimensions(1)),
440 static_cast<unsigned char>(dimensions(2)));
443 new ccQuadric(minCorner, maxCorner, eq, &dims,
444 &matrix,
name.c_str(), precision);
448 "-Quadric orthogonal dimension is 'Z' by default: "
450 "-param min_corner min corner of the 'representation' base "
453 "-param max_corner max corner of the 'representation' base "
456 "-param equation equation coefficients ( Z = a + b.X + c.Y + "
457 "d.X^2 + e.X.Y + f.Y^2); "
459 "-param dimensions optional dimension indexes; "
461 "-param trans_matrix optional 3D transformation (can be set "
462 "afterwards with ccDrawableObject::setGLTransformation); "
464 "-param precision drawing precision (angular step = "
468 "min_corner"_a,
"max_corner"_a,
"equation"_a,
469 "dimensions"_a = Eigen::Vector3i::Ones(),
470 "trans_matrix"_a = Eigen::Matrix4d::Identity(),
471 "precision"_a = 24,
"name"_a =
"Quadric")
475 "ccQuadric with faces {} and equations: {}",
486 "Returns the quadric min corner.")
493 "Returns the quadric max corner.")
495 "get_equation_coefficient",
500 for (
size_t i = 0; i < 6; ++i) {
501 coefficient(i) =
static_cast<double>(equation[i]);
505 "Returns the quadric equation coefficients.")
511 static_cast<int>(dims.
y),
512 static_cast<int>(dims.
z));
514 "Returns the quadric equation 'coordinate system' (X,Y,Z "
515 "dimensions indexes).")
517 "get_equation_string",
521 "Returns the quadric equation coefficients as a string.")
523 "project_on_quadric",
529 return std::make_tuple(elevation,
532 "Returns the quadric equation coefficients as a string.")
543 "[ccQuadric::Fit] Illegal input "
544 "parameters, only support point cloud!");
545 return std::make_tuple(
546 std::make_shared<ccQuadric>(
"Quadric"),
551 return std::make_tuple(
552 std::shared_ptr<ccQuadric>(quadric), rms);
554 "Fits a quadric primitive on a cloud",
"cloud"_a);
564 py::class_<ccCone, PyGenericPrimitive<ccCone>, std::shared_ptr<ccCone>,
566 pycone(m,
"ccCone",
"The 3D cone primitive.");
567 py::detail::bind_default_constructor<ccCone>(pycone);
568 py::detail::bind_copy_functions<ccCone>(pycone);
569 pycone.def(py::init([](
const std::string&
name) {
572 "Simplified constructor",
"name"_a =
"Cone")
578 const Eigen::Matrix4d& trans_matrix,
579 unsigned precision,
const std::string&
name) {
582 auto prim =
new ccCone(bottom_radius, top_radius,
height,
583 x_off, y_off, &matrix,
name.c_str(),
588 "Cone axis corresponds to the 'Z' dimension by default: "
590 "-param bottom_radius cone bottom radius; "
592 "-param top_radius cone top radius; "
594 "-param height cone height (transformation should point to "
597 "-param x_off displacement of axes along X-axis (Snout mode); "
599 "-param y_off displacement of axes along Y-axis (Snout mode); "
601 "-param trans_matrix optional 3D transformation (can be set "
602 "afterwards with ccDrawableObject::setGLTransformation); "
604 "-param precision drawing precision (angular step = "
607 "-param name primitive name.",
608 "bottom_radius"_a,
"top_radius"_a,
"height"_a,
"x_off"_a = 0,
609 "y_off"_a = 0,
"trans_matrix"_a = Eigen::Matrix4d::Identity(),
610 "precision"_a = 24,
"name"_a =
"Cone")
614 "ccCone with faces {}, bottom radius {}, top "
615 "radius {} and height {}",
624 "Returns cone bottom radius.")
626 "Sets cone bottom radius.",
"radius"_a)
628 "Returns cone top radius.")
630 "Sets cone top radius.",
"radius"_a)
636 "Returns cone axis bottom end point after applying "
643 "Returns cone axis top end point after applying "
650 "Returns cone axis end point associated with whichever "
657 "Returns cone axis end point associated with whichever "
660 "Returns whichever cone radii is smaller")
662 "Returns whichever cone radii is larger")
664 "Returns true if the Cone was created in snout mode.");
668 m,
"ccCone",
"set_height",
670 "changes primitive content (calls "
671 "ccGenericPrimitive::updateRepresentation)."}});
674 m,
"ccCone",
"set_bottom_radius",
676 "changes primitive content (calls "
677 "ccGenericPrimitive::updateRepresentation)."}});
680 m,
"ccCone",
"set_top_radius",
682 "changes primitive content (calls "
683 "ccGenericPrimitive::updateRepresentation)."}});
693 py::class_<ccCylinder, PyGenericPrimitive<ccCylinder>,
694 std::shared_ptr<ccCylinder>,
ccCone>
695 pycylinder(m,
"ccCylinder",
"The 3D Box primitive.");
696 py::detail::bind_default_constructor<ccCylinder>(pycylinder);
697 py::detail::bind_copy_functions<ccCylinder>(pycylinder);
699 .def(py::init([](
const std::string&
name) {
702 "Simplified constructor",
"name"_a =
"Cylinder")
705 const Eigen::Matrix4d& trans_matrix,
706 unsigned precision,
const std::string&
name) {
710 name.c_str(), precision);
714 "Cylinder axis corresponds to the 'Z' dimension: "
715 "Internally represented by a cone with the same top and "
718 "-param radius cylinder radius"
720 "-param height cylinder height(transformation should point to "
723 "-param trans_matrix optional 3D transformation (can be set "
724 "afterwards with ccDrawableObject::setGLTransformation); "
726 "-param precision drawing precision (angular step = "
730 "radius"_a,
"height"_a,
731 "trans_matrix"_a = Eigen::Matrix4d::Identity(),
732 "precision"_a = 24,
"name"_a =
"Cylinder")
733 .def(
"__repr__", [](
const ccCylinder& cylinder) {
735 "ccCylinder with faces {}, radius {} and height {}",
742 py::class_<ccDish, PyGenericPrimitive<ccDish>, std::shared_ptr<ccDish>,
744 pydish(m,
"ccDish",
"The 3D dish primitive.");
745 py::detail::bind_default_constructor<ccDish>(pydish);
746 py::detail::bind_copy_functions<ccDish>(pydish);
747 pydish.def(py::init([](
const std::string&
name) {
750 "Simplified constructor",
"name"_a =
"Dish")
754 const Eigen::Matrix4d& trans_matrix,
755 unsigned precision,
const std::string&
name) {
758 auto prim =
new ccDish(base_radius,
height, second_radius,
759 &matrix,
name.c_str(), precision);
763 "dish dimensions axis along each dimension are defined in a "
765 "A dish is in fact composed of 6 planes (ccPlane)."
767 "-param radius base radius; "
769 "-param height maximum height of dished surface above base; "
771 "-param radius2 If radius2 is zero, dish is drawn as a "
772 "section of sphere. If radius2 is >0, dish is defined as half "
775 "-param trans_matrix optional 3D transformation (can be set "
776 "afterwards with ccDrawableObject::setGLTransformation); "
778 "-param precision drawing precision (angular step = "
782 "base_radius"_a,
"height"_a,
"second_radius"_a = 0,
783 "trans_matrix"_a = Eigen::Matrix4d::Identity(),
784 "precision"_a = 24,
"name"_a =
"Dish")
788 "ccDish with faces {}, R1 {}, R2 {} and heigth {}",
794 "Returns the dish base radius.")
796 "Returns the dish second radius.")
804 py::class_<ccExtru, PyGenericPrimitive<ccExtru>, std::shared_ptr<ccExtru>,
806 pyextru(m,
"ccExtru",
"The 3D extru primitive.");
807 py::detail::bind_default_constructor<ccExtru>(pyextru);
808 py::detail::bind_copy_functions<ccExtru>(pyextru);
809 pyextru.def(py::init([](
const std::string&
name) {
812 "Simplified constructor",
"name"_a =
"Extrusion")
813 .def(py::init([](
const std::vector<Eigen::Vector2d>&
profile,
815 const Eigen::Matrix4d& trans_matrix,
816 const std::string&
name) {
819 std::vector<CCVector2> tempProfile(
profile.size());
820 for (
const auto& pro :
profile) {
830 "extru dimensions axis along each dimension are defined in a "
832 "A extru is in fact composed of 6 planes (ccPlane)."
834 "-param profile 2D profile to extrude; "
836 "-param height extrusion thickness; "
838 "-param trans_matrix optional 3D transformation (can be set "
839 "afterwards with ccDrawableObject::setGLTransformation); "
842 "profile"_a,
"height"_a,
843 "trans_matrix"_a = Eigen::Matrix4d::Identity(),
844 "name"_a =
"Extrusion")
853 "Returns extrusion thickness.")
857 const std::vector<CCVector2>&
profile =
859 std::vector<Eigen::Vector2d> outProfile;
860 for (
const auto& pro :
profile) {
861 outProfile.emplace_back(
862 Eigen::Vector2d(pro.x, pro.y));
866 "Returns extrusion profile.");
872 py::class_<ccDisc, PyGenericPrimitive<ccDisc>, std::shared_ptr<ccDisc>,
874 pydisc(m,
"ccDisc",
"The 3D disc primitive.");
875 py::detail::bind_default_constructor<ccDisc>(pydisc);
876 py::detail::bind_copy_functions<ccDisc>(pydisc);
877 pydisc.def(py::init([](
const std::string&
name) {
880 "Simplified constructor",
"name"_a =
"Disc")
882 const Eigen::Matrix4d& trans_matrix,
883 unsigned precision,
const std::string&
name) {
886 auto prim =
new ccDisc(radius, &matrix,
name.c_str(),
891 "Disc is defined in the XY plane by default: "
893 "-param radius disc radius; "
895 "-param trans_matrix optional 3D transformation (can be set "
896 "afterwards with ccDrawableObject::setGLTransformation); "
898 "-param precision drawing precision (angular step = "
902 "radius"_a,
"trans_matrix"_a = Eigen::Matrix4d::Identity(),
903 "precision"_a = 72,
"name"_a =
"Disc")
917 m,
"ccDisc",
"set_radius",
919 "disc radius, warning changes primitive content "
920 "(calls ccGenericPrimitive::updateRepresentation)."}});
923 py::class_<ccCoordinateSystem, PyGenericPrimitive<ccCoordinateSystem>,
925 pyCS(m,
"ccCoordinateSystem",
"The 3D Coordinate System.");
926 py::detail::bind_default_constructor<ccCoordinateSystem>(pyCS);
927 py::detail::bind_copy_functions<ccCoordinateSystem>(pyCS);
928 pyCS.def(py::init([](
const std::string&
name) {
931 "Simplified constructor",
"name"_a =
"CoordinateSystem")
934 const Eigen::Matrix4d& trans_matrix,
935 const std::string&
name) {
939 display_scale, axis_width, &matrix,
name.c_str());
943 "Coordinate System is essentially just a way to visualize a "
944 "transform matrix. param transMat optional "
945 "3D transformation (can be set afterwards with "
946 "ccDrawableObject::setGLTransformation) param name name.",
947 "display_scale"_a,
"axis_width"_a,
948 "trans_matrix"_a = Eigen::Matrix4d::Identity(),
950 .def(py::init([](
const Eigen::Matrix4d& trans_matrix,
951 const std::string&
name) {
958 "Coordinate System is essentially just a way to visualize a "
959 "transform matrix. param transMat optional "
960 "3D transformation (can be set afterwards with "
961 "ccDrawableObject::setGLTransformation) param name name.",
962 "trans_matrix"_a = Eigen::Matrix4d::Identity(),
970 "ccCoordinateSystem with origin ({}, {}, {}) "
971 "display scale {} and axis width {}",
972 origin.
x, origin.
y, origin.
z, display_scale,
977 "Returns whether axis planes are Shown.")
979 "Sets whether axis planes are Shown.",
"show"_a)
981 "Returns whether axis lines are Shown.")
983 "Sets whether axis lines are Shown.",
"show"_a)
985 "Returns axis width.")
987 "Sets axis width.",
"width"_a)
989 "Returns display scale.")
991 "Sets display scale.",
"scale"_a)
1003 "Returns CoordinateSystem origin.");
1006 "axis_planes_shown");
1008 {{
"show",
"axis planes shown flag."}});
1010 "axis_lines_shown");
1012 {{
"show",
"axis lines shown flag."}});
1016 m,
"ccCoordinateSystem",
"set_axis_width",
1017 {{
"width",
"Coordinate system axis width."}});
1019 "get_display_scale");
1021 m,
"ccCoordinateSystem",
"set_display_scale",
1022 {{
"scale",
"Coordinate system display scale."}});
Vector2Tpl< PointCoordinateType > CCVector2
Default 2D Vector.
float PointCoordinateType
Type of the coordinates of a (N-D) point.
filament::Texture::InternalFormat format
CloudViewerScene::LightingProfile profile
static Vector3Tpl fromArray(const int a[3])
Constructor from an int array.
const CCVector3 & getDimensions() const
Returns box dimensions.
void setDimensions(CCVector3 &dims)
Sets box dimensions.
PointCoordinateType getTopRadius() const
Returns top radius.
virtual CCVector3 getLargeCenter() const
Returns cone axis end point associated with whichever radii is larger.
virtual PointCoordinateType getLargeRadius() const
Returns whichever cone radii is larger.
virtual CCVector3 getTopCenter() const
Returns cone axis top end point after applying transformation.
PointCoordinateType getHeight() const
Returns height.
virtual PointCoordinateType getSmallRadius() const
Returns whichever cone radii is smaller.
virtual bool isSnoutMode() const
Returns true if the Cone was created in snout mode.
virtual void setTopRadius(PointCoordinateType radius)
Sets top radius.
virtual CCVector3 getSmallCenter() const
Returns cone axis end point associated with whichever radii is smaller.
PointCoordinateType getBottomRadius() const
Returns bottom radius.
void setHeight(PointCoordinateType height)
Sets height.
virtual CCVector3 getBottomCenter() const
Returns cone axis bottom end point after applying transformation.
virtual void setBottomRadius(PointCoordinateType radius)
Sets bottom radius.
Coordinate System (primitive)
bool axisPlanesAreShown() const
CCVector3 getOrigin() const
std::shared_ptr< ccPlane > getZXplane() const
std::shared_ptr< ccPlane > getXYplane() const
void ShowAxisLines(bool show)
void ShowAxisPlanes(bool show)
void setDisplayScale(PointCoordinateType scale)
std::shared_ptr< ccPlane > getYZplane() const
PointCoordinateType getDisplayScale() const
bool axisLinesAreShown() const
PointCoordinateType getAxisWidth() const
void setAxisWidth(PointCoordinateType width)
PointCoordinateType getRadius() const
Returns radius.
void setRadius(PointCoordinateType radius)
Sets radius.
PointCoordinateType getSecondRadius() const
Returns the dish second radius.
PointCoordinateType getBaseRadius() const
Returns the dish base radius.
PointCoordinateType getHeight() const
Returns the dish height.
Profile extrusion (primitive)
PointCoordinateType getThickness() const
Returns extrusion thickness.
const std::vector< CCVector2 > & getProfile() const
Returns profile.
static ccGLMatrixTpl< float > FromEigenMatrix(const Eigen::Matrix< double, 4, 4 > &mat)
static Eigen::Matrix< double, 4, 4 > ToEigenMatrix4(const ccGLMatrixTpl< float > &mat)
Float version of ccGLMatrixTpl.
Generic primitive interface.
virtual QString getTypeName() const =0
Returns type name (sphere, cylinder, etc.)
virtual bool setDrawingPrecision(unsigned steps)
Sets drawing precision.
virtual void setColor(const ecvColor::Rgb &col)
Sets primitive color (shortcut)
virtual unsigned getDrawingPrecision() const
Returns drawing precision (or 0 if feature is not supported)
virtual bool hasDrawingPrecision() const
Whether drawing is dependent on 'precision' parameter.
virtual ccGenericPrimitive * clone() const =0
Clones primitive.
const ccGLMatrix & getGLTransformationHistory() const override
inherited methods (ccHObject)
virtual ccGLMatrix & getTransformation()
Returns the transformation that is currently applied to the vertices.
void clearTriNormals()
Removes per-triangle normals.
virtual unsigned size() const override
Returns the number of triangles.
Interface for a planar entity.
CCVector3 getCenter() const
Returns the center.
CCVector3 getNormal() const override
Returns the entity normal.
void flip()
Flips the plane.
void setXWidth(PointCoordinateType w, bool autoUpdate=true)
Sets 'X' width.
void getEquation(CCVector3 &N, PointCoordinateType &constVal) const
Returns the equation of the plane.
PointCoordinateType getXWidth() const
Returns 'X' width.
PointCoordinateType getYWidth() const
Returns 'Y' width.
void setYWidth(PointCoordinateType h, bool autoUpdate=true)
Sets 'Y' width.
const Tuple3ub & getEquationDims() const
const CCVector2 & getMaxCorner() const
Returns the quadric max corner.
QString getEquationString() const
Returns the quadric equation coefficients as a string.
const PointCoordinateType * getEquationCoefs() const
Returns the quadric equation coefficients.
const CCVector2 & getMinCorner() const
Returns the quadric min corner.
PointCoordinateType projectOnQuadric(const CCVector3 &P, CCVector3 &Q) const
Projects a 3D point in the quadric coordinate system.
static ccQuadric * Fit(cloudViewer::GenericIndexedCloudPersist *cloud, double *rms)
Fits a quadric primitive on a cloud.
void setRadius(PointCoordinateType radius)
Sets radius.
PointCoordinateType getRadius() const
Returns radius.
double getAngleRad() const
Returns the torus subtended angle (in radians)
PointCoordinateType getInsideRadius() const
Returns the torus inside radius.
PointCoordinateType getRectSectionHeight() const
PointCoordinateType getOutsideRadius() const
Returns the torus outside radius.
bool getRectSection() const
A generic 3D point cloud with index-based and presistent access to points.
constexpr static RgbTpl FromEigen(const Eigen::Vector3d &t)
Eigen::Matrix< double, 6, 1 > Vector6d
void ClassMethodDocInject(py::module &pybind_module, const std::string &class_name, const std::string &function_name, const std::unordered_map< std::string, std::string > &map_parameter_body_docs)
void pybind_primitives_methods(py::module &m)
void pybind_primitives(py::module &m)
Generic file read and write utility for python interface.
Eigen::Matrix< Index, 3, 1 > Vector3i