30 m_verticesPointSize(.0f)
38 m_antiAliasing(antiAliasing),
39 m_verticesPointSize(.0f)
68 #if MRPT_HAS_OPENGL_GLUT
87 glVertex3d(it->point1.x, it->point1.y, it->point1.z);
88 glVertex3d(it->point2.x, it->point2.y, it->point2.z);
109 glVertex3d(seg.point1.x, seg.point1.y, seg.point1.z);
112 glVertex3d(seg.point2.x, seg.point2.y, seg.point2.z);
145 in >> x0 >> y0 >> z0 >> x1 >> y1 >> z1;
150 size_t N = x0.size();
152 for (
size_t i = 0; i < N; i++)
190 std::numeric_limits<double>::max(), std::numeric_limits<double>::max(),
191 std::numeric_limits<double>::max());
193 -std::numeric_limits<double>::max(),
194 -std::numeric_limits<double>::max(),
195 -std::numeric_limits<double>::max());
197 for (
size_t i = 0; i <
mSegments.size(); i++)
200 for (
size_t p = 0;
p < 2;
p++)
203 for (
size_t j = 0; j < 3; j++)
217 size_t index,
double& x0,
double& y0,
double& z0,
double& x1,
double& y1,
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
Column vector, like Eigen::MatrixX*, but automatically initialized to zeros since construction.
A renderizable object suitable for rendering with OpenGL's display lists.
void readFromStreamRender(mrpt::serialization::CArchive &in)
EIGEN_STRONG_INLINE void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated)
mrpt::poses::CPose3D m_pose
6D pose wrt the parent coordinate reference.
mrpt::img::TColor m_color
Color components in the range [0,255].
void writeToStreamRender(mrpt::serialization::CArchive &out) const
static void checkOpenGLError()
Checks glGetError and throws an exception if an error situation is found.
A set of independent lines (or segments), one line with its own start and end positions (X,...
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.
void setLineByIndex(size_t index, const mrpt::math::TSegment3D &segm)
Sets a specific line in the set, given its index.
void render_dl() const override
Render.
float m_verticesPointSize
0: means hidden
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
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...
CSetOfLines()
Constructor.
void setVerticesPointSize(const float size_points)
Enable showing vertices as dots if size_points>0.
float getVerticesPointSize() const
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
std::vector< mrpt::math::TSegment3D > mSegments
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...
Virtual base class for "archives": classes abstracting I/O streams.
const Scalar * const_iterator
#define ASSERT_(f)
Defines an assertion mechanism.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
#define THROW_EXCEPTION(msg)
GLAPI void GLAPIENTRY glEnable(GLenum cap)
GLAPI void GLAPIENTRY glPointSize(GLfloat size)
GLAPI void GLAPIENTRY glLineWidth(GLfloat width)
GLAPI void GLAPIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor)
#define GL_COLOR_BUFFER_BIT
GLAPI void GLAPIENTRY glBegin(GLenum mode)
#define GL_ONE_MINUS_SRC_ALPHA
GLAPI void GLAPIENTRY glEnd(void)
GLAPI void GLAPIENTRY glPopAttrib(void)
GLAPI void GLAPIENTRY glDisable(GLenum cap)
GLAPI void GLAPIENTRY glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
GLAPI void GLAPIENTRY glPushAttrib(GLbitfield mask)
GLAPI void GLAPIENTRY glVertex3d(GLdouble x, GLdouble y, GLdouble z)
This base provides a set of functions for maths stuff.
The namespace for 3D scene representation and rendering.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
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.
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.
double x
X,Y,Z coordinates.
3D segment, consisting of two points.