Go to the documentation of this file.
10 #ifndef opengl_CVectorField3D_H
11 #define opengl_CVectorField3D_H
102 const float R,
const float G,
const float B,
const float A = 1)
120 const float R,
const float G,
const float B,
const float A = 1)
140 const float Rmin,
const float Gmin,
const float Bmin,
const float Rmax,
141 const float Gmax,
const float Bmax,
const float Amin = 1,
142 const float Amax = 1)
212 template <
class MATRIX>
214 MATRIX& Matrix_x, MATRIX& Matrix_y, MATRIX& Matrix_z)
const
234 template <
class MATRIX>
236 MATRIX& Coord_x, MATRIX& Coord_y, MATRIX& Coord_z)
const
272 (Matrix_x.rows() == Matrix_y.rows()) &&
273 (Matrix_x.rows() == Matrix_z.rows()));
275 (Matrix_x.cols() == Matrix_y.cols()) &&
276 (Matrix_x.cols() == Matrix_z.cols()));
283 template <
class MATRIX>
287 (Matrix_x.rows() == Matrix_y.rows()) &&
288 (Matrix_x.rows() == Matrix_z.rows()));
290 (Matrix_x.cols() == Matrix_y.cols()) &&
291 (Matrix_x.cols() == Matrix_z.cols()));
307 (Matrix_x.rows() == Matrix_y.rows()) &&
308 (Matrix_x.rows() == Matrix_z.rows()));
310 (Matrix_x.cols() == Matrix_y.cols()) &&
311 (Matrix_x.cols() == Matrix_z.cols()));
318 template <
class MATRIX>
320 MATRIX& Matrix_x, MATRIX& Matrix_y, MATRIX& Matrix_z)
323 (Matrix_x.rows() == Matrix_y.rows()) &&
324 (Matrix_x.rows() == Matrix_z.rows()));
326 (Matrix_x.cols() == Matrix_y.cols()) &&
327 (Matrix_x.cols() == Matrix_z.cols()));
void setPointCoordinates(mrpt::math::CMatrixFloat &Matrix_x, mrpt::math::CMatrixFloat &Matrix_y, mrpt::math::CMatrixFloat &Matrix_z)
Set the coordinates of the points at which the vector field is plotted with Matrix_x,...
const mrpt::math::CMatrixFloat & getVectorField_z() const
Get the "z" component of the vector field as a matrix.
size_t rows() const
Returns the total count of columns used to represent the vector field.
bool m_antiAliasing
By default it is true.
mrpt::math::CMatrixFloat & getVectorField_z()
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::shared_ptr< CVectorField3D > Ptr
mrpt::img::TColorf getPointColor() const
Get the point color in the range [0,1].
float getMaxSpeedForColor() const
Get the max_speed with which lines are drawn.
float getLineWidth() const
Get the width with which lines are drawn.
bool isColorFromModuleEnabled() const
mrpt::math::CMatrix z_p
Z coordinate of the points at which the vector field is plotted.
void setLineWidth(const float w)
Set the width with which lines will be drawn.
mrpt::math::CMatrixFloat & getVectorField_y()
This is an overloaded member function, provided for convenience. It differs from the above function o...
mrpt::img::TColor m_field_color
void getVectorFieldColor(mrpt::img::TColorf Cmin, mrpt::img::TColorf Cmax) const
Get the motion field min and max colors (colormap) in the range [0,1].
mrpt::math::CMatrix x_vf
X component of the vector field.
A renderizable object suitable for rendering with OpenGL's display lists.
A 3D vector field representation, consisting of points and arrows drawn at any spatial position.
EIGEN_STRONG_INLINE void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated)
float m_pointSize
By default it is 1.0.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
static Ptr Create(Args &&... args)
GLubyte GLubyte GLubyte GLubyte w
bool isAntiAliasingEnabled() const
#define ASSERT_(f)
Defines an assertion mechanism.
void getPointCoordinates(MATRIX &Coord_x, MATRIX &Coord_y, MATRIX &Coord_z) const
bool m_colorFromModule
By default it is false.
void render_dl() const override
Render.
void getVectorField(mrpt::math::CMatrixFloat &Matrix_x, mrpt::math::CMatrixFloat &Matrix_y, mrpt::math::CMatrixFloat &Matrix_z) const
Get the vector field in three independent matrices: Matrix_x, Matrix_y and Matrix_z.
size_t cols() const
Returns the total count of rows used to represent the vector field.
float m_LineWidth
By default it is 1.0.
A matrix of dynamic size.
CVectorField3D()
Constructor.
void clear()
Clear the matrices.
void getVectorField(MATRIX &Matrix_x, MATRIX &Matrix_y, MATRIX &Matrix_z) const
void enableColorFromModule(bool enable=true)
mrpt::math::CMatrixFloat & getVectorField_x()
This is an overloaded member function, provided for convenience. It differs from the above function o...
This class is a "CSerializable" wrapper for "CMatrixFloat".
mrpt::math::CMatrix y_p
Y coordinate of the points at which the vector field is plotted.
void resize(size_t rows, size_t cols)
Resizes the set.
A RGB color - floats in the range [0,1].
bool m_showPoints
By default it is true.
void setMotionFieldColormap(const float Rmin, const float Gmin, const float Bmin, const float Rmax, const float Gmax, const float Bmax, const float Amin=1, const float Amax=1)
Set the motion field min and max colors (colormap) in the range [0,1].
void setPointSize(const float p)
Set the size with which points will be drawn.
void setPointColor(const float R, const float G, const float B, const float A=1)
Set the point color in the range [0,1].
float m_maxspeed
Value of the module of the motion field which will correspond to 'm_maxspeed_color'.
mrpt::img::TColor m_maxspeed_color
Color associated to fields whose module is equal or larger than 'm_maxspeed'.
mrpt::img::TColorf getVectorFieldColor() const
Get the arrow color in the range [0,1].
float getPointSize() const
Get the size with which points are drawn.
mrpt::math::CMatrix z_vf
Z component of the vector field.
void getBoundingBox(mrpt::math::TPoint3D &bb_min, mrpt::math::TPoint3D &bb_max) const override
Evaluates the bounding box of this object (including possible children) in the coordinate frame of th...
const mrpt::math::CMatrixFloat & getVectorField_x() const
Get the "x" component of the vector field as a matrix.
void setPointCoordinates(MATRIX &Matrix_x, MATRIX &Matrix_y, MATRIX &Matrix_z)
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
void setVectorField(mrpt::math::CMatrixFloat &Matrix_x, mrpt::math::CMatrixFloat &Matrix_y, mrpt::math::CMatrixFloat &Matrix_z)
Set the vector field with Matrix_x, Matrix_y and Matrix_z.
mrpt::img::TColor m_still_color
Color associated to fields with null module.
void enableShowPoints(bool enable=true)
void getPointCoordinates(mrpt::math::CMatrixFloat &Coord_x, mrpt::math::CMatrixFloat &Coord_y, mrpt::math::CMatrixFloat &Coord_z) const
Get the coordiantes of the points at which the vector field is plotted: Coord_x, Coord_y and Coord_z.
void enableAntiAliasing(bool enable=true)
void setVectorField(MATRIX &Matrix_x, MATRIX &Matrix_y, MATRIX &Matrix_z)
mrpt::math::CMatrix y_vf
Y component of the vector field.
void setMaxSpeedForColor(const float s)
Set the max speed associated for the color map ( m_still_color, m_maxspeed_color)
const mrpt::math::CMatrixFloat & getVectorField_y() const
Get the "y" component of the vector field as a matrix.
mrpt::math::CMatrix x_p
X coordinate of the points at which the vector field is plotted.
virtual ~CVectorField3D()
Private, virtual destructor: only can be deleted from smart pointers.
void setVectorFieldColor(const float R, const float G, const float B, const float A=1)
Set the arrow color in the range [0,1].
mrpt::img::TColor m_point_color
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |