28 return CSetOfLinesPtr(
new CSetOfLines(sgms,antiAliasing));
32 : mSegments(),mLineWidth(1.0),m_antiAliasing(true), m_verticesPointSize(.0f)
38 : mSegments(sgms),mLineWidth(1.0),m_antiAliasing(antiAliasing), m_verticesPointSize(.0f)
68 #if MRPT_HAS_OPENGL_GLUT 86 glVertex3d(it->point1.x,it->point1.y,it->point1.z);
87 glVertex3d(it->point2.x,it->point2.y,it->point2.z);
106 glVertex3d(seg.point1.x, seg.point1.y, seg.point1.z);
109 glVertex3d(seg.point2.x, seg.point2.y, seg.point2.z);
151 in>>x0>>y0>>z0>>x1>>y1>>z1;
156 for (
size_t i=0;i<N;i++) {
189 bb_min =
mrpt::math::TPoint3D(std::numeric_limits<double>::max(),std::numeric_limits<double>::max(), std::numeric_limits<double>::max());
190 bb_max =
mrpt::math::TPoint3D(-std::numeric_limits<double>::max(),-std::numeric_limits<double>::max(),-std::numeric_limits<double>::max());
195 for (
size_t p=0;
p<2;
p++)
198 for (
size_t j=0;j<3;j++)
std::vector< mrpt::math::TSegment3D > mSegments
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)
void getLineByIndex(size_t index, double &x0, double &y0, double &z0, double &x1, double &y1, double &z1) const
Gets a specific line in the set, given its index.
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
#define THROW_EXCEPTION(msg)
Column vector, like Eigen::MatrixX*, but automatically initialized to zeros since construction...
GLAPI void GLAPIENTRY glVertex3d(GLdouble x, GLdouble y, GLdouble z)
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_verticesPointSize
0: means hidden
const Scalar * const_iterator
#define GL_ONE_MINUS_SRC_ALPHA
GLAPI void GLAPIENTRY glPopAttrib(void)
GLAPI void GLAPIENTRY glLineWidth(GLfloat width)
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...
mrpt::poses::CPose3D m_pose
6D pose wrt the parent coordinate reference. This class automatically holds the cached 3x3 rotation m...
void writeToStream(mrpt::utils::CStream &out, int *getVersion) const
Introduces a pure virtual method responsible for writing to a CStream.
GLAPI void GLAPIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor)
A renderizable object suitable for rendering with OpenGL's display lists.
#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.
float getVerticesPointSize() const
3D segment, consisting of two points.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
void readFromStreamRender(mrpt::utils::CStream &in)
mrpt::utils::TColor m_color
Color components in the range [0,255].
void setVerticesPointSize(const float size_points)
Enable showing vertices as dots if size_points>0.
GLAPI void GLAPIENTRY glBegin(GLenum mode)
void keep_max(T &var, const K test_val)
If the second argument is above the first one, set the first argument to this higher value...
GLAPI void GLAPIENTRY glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
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.
CSetOfLines()
Constructor.
GLAPI void GLAPIENTRY glPushAttrib(GLbitfield mask)
void keep_min(T &var, const K test_val)
If the second argument is below the first one, set the first argument to this lower value...
The namespace for 3D scene representation and rendering.
GLAPI void GLAPIENTRY glEnd(void)
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...
A set of independent lines (or segments), one line with its own start and end positions (X...
GLAPI void GLAPIENTRY glDisable(GLenum cap)
void setLineByIndex(size_t index, const mrpt::math::TSegment3D &segm)
Sets a specific line in the set, given its index.