27 : x_vf(0,0), y_vf(0,0), z_vf(0,0), x_p(0,0), y_p(0,0), z_p(0,0), m_LineWidth(1.0),m_pointSize(1.0),m_antiAliasing(true),m_colorFromModule(false),m_showPoints(true)
29 m_point_color = m_color;
30 m_field_color = m_color;
31 m_still_color = m_color;
32 m_maxspeed_color = m_color;
38 : m_LineWidth(1.0),m_pointSize(1.0),m_antiAliasing(true),m_colorFromModule(false),m_showPoints(true)
59 #if MRPT_HAS_OPENGL_GLUT 86 for (
unsigned int i=0; i<
x_p.getColCount(); i++)
87 for (
unsigned int j=0; j<
x_p.getRowCount(); j++)
99 for (
unsigned int i=0; i<
x_vf.getColCount(); i++)
100 for (
unsigned int j=0; j<
x_vf.getRowCount(); j++)
108 for (
unsigned int i=0; i<
x_vf.getColCount(); i++)
109 for (
unsigned int j=0; j<
x_vf.getRowCount(); j++)
205 bb_min.
x = 10e10; bb_min.
y = 10e10; bb_min.
z = 10e10;
206 bb_max.
x = -10e10; bb_max.
y = -10e10; bb_max.
z = -10e10;
208 for (
unsigned int i=0; i<
x_p.getColCount(); i++)
209 for (
unsigned int j=0; j<
x_p.getRowCount(); j++)
212 if (
x_p(j,i) < bb_min.
x)
215 if (
x_p(j,i) +
x_vf(j,i) < bb_min.
x)
218 if (
y_p(j,i) < bb_min.
y)
221 if (
y_p(j,i) +
y_vf(j,i) < bb_min.
y)
224 if (
z_p(j,i) < bb_min.
z)
227 if (
z_p(j,i) +
z_vf(j,i) < bb_min.
z)
231 if (
x_p(j,i) > bb_max.
x)
234 if (
x_p(j,i) +
x_vf(j,i) > bb_max.
x)
237 if (
y_p(j,i) > bb_max.
y)
240 if (
y_p(j,i) +
y_vf(j,i) > bb_max.
y)
243 if (
z_p(j,i) > bb_max.
z)
246 if (
z_p(j,i) +
z_vf(j,i) > bb_max.
z)
mrpt::utils::TColor m_point_color
mrpt::math::CMatrix x_vf
X component of the vector field.
float m_LineWidth
By default it is 1.0.
void writeToStreamRender(utils::CStream &out) const
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
void render_dl() const MRPT_OVERRIDE
Render.
GLAPI void GLAPIENTRY glEnable(GLenum cap)
GLAPI void GLAPIENTRY glPointSize(GLfloat size)
EIGEN_STRONG_INLINE void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated) ...
mrpt::utils::TColor m_still_color
Color associated to fields with null module.
mrpt::utils::TColor m_field_color
void writeToStream(mrpt::utils::CStream &out, int *getVersion) const
Introduces a pure virtual method responsible for writing to a CStream.
#define GL_ONE_MINUS_SRC_ALPHA
float m_maxspeed
Value of the module of the motion field which will correspond to 'm_maxspeed_color'.
double z
X,Y,Z coordinates.
GLAPI void GLAPIENTRY glPopAttrib(void)
IMPLEMENTS_SERIALIZABLE(CLogFileRecord_FullEval, CHolonomicLogFileRecord, mrpt::nav) IMPLEMENTS_SERIALIZABLE(CHolonomicFullEval
float m_pointSize
By default it is 1.0.
GLAPI void GLAPIENTRY glLineWidth(GLfloat width)
mrpt::poses::CPose3D m_pose
6D pose wrt the parent coordinate reference. This class automatically holds the cached 3x3 rotation m...
GLAPI void GLAPIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor)
T square(const T x)
Inline function for the square of a number.
A renderizable object suitable for rendering with OpenGL's display lists.
bool m_showPoints
By default it is true.
#define GL_COLOR_BUFFER_BIT
void composePoint(double lx, double ly, double lz, double &gx, double &gy, double &gz, mrpt::math::CMatrixFixedNumeric< double, 3, 3 > *out_jacobian_df_dpoint=NULL, mrpt::math::CMatrixFixedNumeric< double, 3, 6 > *out_jacobian_df_dpose=NULL, mrpt::math::CMatrixFixedNumeric< double, 3, 6 > *out_jacobian_df_dse3=NULL, 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...
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
This base provides a set of functions for maths stuff.
mrpt::math::CMatrix y_p
Y coordinate of the points at which the vector field is plotted.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
void readFromStreamRender(mrpt::utils::CStream &in)
mrpt::math::CMatrix z_vf
Z component of the vector field.
mrpt::math::CMatrix y_vf
Y component of the vector field.
mrpt::utils::TColor m_color
Color components in the range [0,255].
GLAPI void GLAPIENTRY glBegin(GLenum mode)
mrpt::math::CMatrix z_p
Z coordinate of the points at which the vector field is plotted.
A 3D vector field representation, consisting of points and arrows drawn at any spatial position...
GLAPI void GLAPIENTRY glVertex3f(GLfloat x, GLfloat y, GLfloat z)
GLAPI void GLAPIENTRY glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
CVectorField3D()
Constructor.
static void checkOpenGLError()
Checks glGetError and throws an exception if an error situation is found.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
mrpt::utils::TColor m_maxspeed_color
Color associated to fields whose module is equal or larger than 'm_maxspeed'.
bool m_colorFromModule
By default it is false.
void getBoundingBox(mrpt::math::TPoint3D &bb_min, mrpt::math::TPoint3D &bb_max) const MRPT_OVERRIDE
Evaluates the bounding box of this object (including possible children) in the coordinate frame of th...
GLAPI void GLAPIENTRY glPushAttrib(GLbitfield mask)
void readFromStream(mrpt::utils::CStream &in, int version)
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly...
The namespace for 3D scene representation and rendering.
GLAPI void GLAPIENTRY glEnd(void)
A matrix of dynamic size.
bool m_antiAliasing
By default it is true.
GLAPI void GLAPIENTRY glDisable(GLenum cap)
mrpt::math::CMatrix x_p
X coordinate of the points at which the vector field is plotted.