Go to the documentation of this file.
34 m_colorFromModule(false),
37 m_point_color = m_color;
38 m_field_color = m_color;
39 m_still_color = m_color;
40 m_maxspeed_color = m_color;
51 m_colorFromModule(false),
72 #if MRPT_HAS_OPENGL_GLUT
100 for (
unsigned int i = 0; i <
x_p.cols(); i++)
101 for (
unsigned int j = 0; j <
x_p.rows(); j++)
114 for (
unsigned int i = 0; i <
x_vf.cols(); i++)
115 for (
unsigned int j = 0; j <
x_vf.rows(); j++)
125 for (
unsigned int i = 0; i <
x_vf.cols(); i++)
126 for (
unsigned int j = 0; j <
x_vf.rows(); j++)
129 const float module = sqrt(
238 for (
unsigned int i = 0; i <
x_p.cols(); i++)
239 for (
unsigned int j = 0; j <
x_p.rows(); j++)
242 if (
x_p(j, i) < bb_min.
x) bb_min.
x =
x_p(j, i);
244 if (
x_p(j, i) +
x_vf(j, i) < bb_min.
x)
247 if (
y_p(j, i) < bb_min.
y) bb_min.
y =
y_p(j, i);
249 if (
y_p(j, i) +
y_vf(j, i) < bb_min.
y)
252 if (
z_p(j, i) < bb_min.
z) bb_min.
z =
z_p(j, i);
254 if (
z_p(j, i) +
z_vf(j, i) < bb_min.
z)
258 if (
x_p(j, i) > bb_max.
x) bb_max.
x =
x_p(j, i);
260 if (
x_p(j, i) +
x_vf(j, i) > bb_max.
x)
263 if (
y_p(j, i) > bb_max.
y) bb_max.
y =
y_p(j, i);
265 if (
y_p(j, i) +
y_vf(j, i) > bb_max.
y)
268 if (
z_p(j, i) > bb_max.
z) bb_max.
z =
z_p(j, i);
270 if (
z_p(j, i) +
z_vf(j, i) > bb_max.
z)
GLAPI void GLAPIENTRY glBegin(GLenum mode)
bool m_antiAliasing
By default it is true.
GLAPI void GLAPIENTRY glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
mrpt::math::CMatrix z_p
Z coordinate of the points at which the vector field is plotted.
mrpt::img::TColor m_field_color
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.
GLAPI void GLAPIENTRY glDisable(GLenum cap)
EIGEN_STRONG_INLINE void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated)
GLAPI void GLAPIENTRY glEnable(GLenum cap)
float m_pointSize
By default it is 1.0.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
GLAPI void GLAPIENTRY glVertex3f(GLfloat x, GLfloat y, GLfloat z)
T square(const T x)
Inline function for the square of a number.
bool m_colorFromModule
By default it is false.
void render_dl() const override
Render.
Virtual base class for "archives": classes abstracting I/O streams.
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
float m_LineWidth
By default it is 1.0.
A matrix of dynamic size.
CVectorField3D()
Constructor.
GLAPI void GLAPIENTRY glEnd(void)
mrpt::poses::CPose3D m_pose
6D pose wrt the parent coordinate reference.
mrpt::img::TColor m_color
Color components in the range [0,255].
static void checkOpenGLError()
Checks glGetError and throws an exception if an error situation is found.
GLAPI void GLAPIENTRY glLineWidth(GLfloat width)
mrpt::math::CMatrix y_p
Y coordinate of the points at which the vector field is plotted.
#define GL_ONE_MINUS_SRC_ALPHA
GLAPI void GLAPIENTRY glPushAttrib(GLbitfield mask)
double x
X,Y,Z coordinates.
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
bool m_showPoints
By default it is true.
GLAPI void GLAPIENTRY glPointSize(GLfloat size)
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'.
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
void composePoint(double lx, double ly, double lz, double &gx, double &gy, double &gz, mrpt::math::CMatrixFixedNumeric< double, 3, 3 > *out_jacobian_df_dpoint=nullptr, mrpt::math::CMatrixFixedNumeric< double, 3, 6 > *out_jacobian_df_dpose=nullptr, mrpt::math::CMatrixFixedNumeric< double, 3, 6 > *out_jacobian_df_dse3=nullptr, bool use_small_rot_approx=false) const
An alternative, slightly more efficient way of doing with G and L being 3D points and P this 6D pose...
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...
GLAPI void GLAPIENTRY glPopAttrib(void)
This base provides a set of functions for maths stuff.
mrpt::img::TColor m_still_color
Color associated to fields with null module.
mrpt::math::CMatrix y_vf
Y component of the vector field.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
void writeToStreamRender(mrpt::serialization::CArchive &out) const
mrpt::math::CMatrix x_p
X coordinate of the points at which the vector field is plotted.
The namespace for 3D scene representation and rendering.
void readFromStreamRender(mrpt::serialization::CArchive &in)
GLAPI void GLAPIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor)
#define GL_COLOR_BUFFER_BIT
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 | |