MRPT  2.0.4
CEllipsoid3D.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
11 #include <mrpt/math/CMatrixD.h>
12 #include <mrpt/math/CMatrixFixed.h>
14 
15 namespace mrpt::opengl
16 {
17 /** A 3D ellipsoid, centered at zero with respect to this object pose.
18  * The color is determined by the RGBA fields in the class "CRenderizable".
19  * Note that a transparent ellipsoid can be drawn for "0<alpha<1" values.
20  * If any of the eigen values of the covariance matrix of the ellipsoid is
21  * zero, nothing will be rendered.
22  * \sa opengl::COpenGLScene
23  *
24  * Please read the documentation of
25  * CGeneralizedEllipsoidTemplate::setQuantiles() for learning
26  * the mathematical details about setting the desired confidence interval.
27  *
28  * <div align="center">
29  * <table border="0" cellspan="4" cellspacing="4" style="border-width: 1px;
30  *border-style: solid;">
31  * <tr> <td> mrpt::opengl::CEllipsoid3D </td> <td> \image html
32  *preview_CEllipsoid.png </td> </tr>
33  * </table>
34  * </div>
35  *
36  * \ingroup mrpt_opengl_grp
37  */
39 {
41 
43 
44  public:
45  CEllipsoid3D() = default;
46  virtual ~CEllipsoid3D() override = default;
47 
48  /** The number of segments of a 3D ellipse (in both "axes") (default=20) */
49  void set3DsegmentsCount(unsigned int N) { BASE::setNumberOfSegments(N); }
50 
51  /** Ray tracing */
52  bool traceRay(const mrpt::poses::CPose3D& o, double& dist) const override;
53 
54  protected:
55  /** To be implemented by derived classes: maps, using some arbitrary space
56  * transformation, a list of points
57  * defining an ellipsoid in parameter space into their corresponding
58  * points in 2D/3D space.
59  */
61  const std::vector<BASE::array_parameter_t>& in_pts,
62  std::vector<BASE::array_point_t>& out_pts) const override;
63 };
64 
65 } // namespace mrpt::opengl
virtual ~CEllipsoid3D() override=default
void setNumberOfSegments(const uint32_t numSegments)
Set the number of segments of the surface/curve (higher means with greater resolution) ...
bool traceRay(const mrpt::poses::CPose3D &o, double &dist) const override
Ray tracing.
void transformFromParameterSpace(const std::vector< BASE::array_parameter_t > &in_pts, std::vector< BASE::array_point_t > &out_pts) const override
To be implemented by derived classes: maps, using some arbitrary space transformation, a list of points defining an ellipsoid in parameter space into their corresponding points in 2D/3D space.
A class that generalizes the concept of an ellipsoid to arbitrary parameterizations of uncertainty sh...
void set3DsegmentsCount(unsigned int N)
The number of segments of a 3D ellipse (in both "axes") (default=20)
Definition: CEllipsoid3D.h:49
A 3D ellipsoid, centered at zero with respect to this object pose.
Definition: CEllipsoid3D.h:38
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:85
The namespace for 3D scene representation and rendering.
Definition: CGlCanvasBase.h:13
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...



Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020