Go to the documentation of this file.
15 #if MRPT_HAS_OPENGL_GLUT
22 #include <OpenGL/gl.h>
29 #if MRPT_HAS_OPENGL_GLUT && defined(_WIN32)
32 #pragma comment(lib, "opengl32.lib")
33 #pragma comment(lib, "GlU32.lib")
35 #endif // MRPT_HAS_OPENGL_GLUT
66 m_enable_points(true),
68 m_enable_surface(true)
86 #if MRPT_HAS_OPENGL_GLUT
101 const float *
x, *
y, *
z;
104 if (!
n || !
x)
return;
119 for (i = 0; i <
n - 1; i++)
138 for (i = 0; i <
n; i++)
154 for (i = 0; i <
n - 1; i++)
228 const float *
x, *
y, *
z;
231 if (!
n || !
x)
return;
234 std::numeric_limits<double>::max(), std::numeric_limits<double>::max(),
235 std::numeric_limits<double>::max());
237 -std::numeric_limits<double>::max(),
238 -std::numeric_limits<double>::max(),
239 -std::numeric_limits<double>::max());
241 for (
size_t i = 0; i <
n; i++)
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.
GLAPI void GLAPIENTRY glBegin(GLenum mode)
bool insertObservation(const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D *robotPose=NULL)
Insert the observation information into this map.
IMPLEMENTS_SERIALIZABLE(CPlanarLaserScan, CRenderizableDisplayList, mrpt::opengl) CPlanarLaserScan
void clear()
Clear the contents of this container.
GLAPI void GLAPIENTRY glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
float minDistBetweenLaserPoints
The minimum distance between points (in 3D): If two points are too close, one of them is not inserted...
A renderizable object suitable for rendering with OpenGL's display lists.
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)
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
GLAPI void GLAPIENTRY glEnable(GLenum cap)
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...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
mrpt::obs::CObservation2DRangeScan m_scan
GLAPI void GLAPIENTRY glVertex3f(GLfloat x, GLfloat y, GLfloat z)
void resizeScan(const size_t len)
Resizes all data vectors to allocate a given number of scan rays.
#define ASSERT_(f)
Defines an assertion mechanism.
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
Virtual base class for "archives": classes abstracting I/O streams.
GLAPI void GLAPIENTRY glEnd(void)
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
CPlanarLaserScan()
Constructor.
bool isPlanarMap
If set to true, only HORIZONTAL (in the XY plane) measurements will be inserted in the map (Default v...
mrpt::poses::CPose3D m_pose
6D pose wrt the parent coordinate reference.
static void checkOpenGLError()
Checks glGetError and throws an exception if an error situation is found.
GLAPI void GLAPIENTRY glLineWidth(GLfloat width)
#define GL_ONE_MINUS_SRC_ALPHA
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() const
Common members of all points & poses classes.
double x
X,Y,Z coordinates.
GLAPI void GLAPIENTRY glPointSize(GLfloat size)
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::containers::ContainerReadOnlyProxyAccessor< mrpt::aligned_std_vector< float > > scan
The range values of the scan, in meters.
void getPointsBuffer(size_t &outPointsCount, const float *&xs, const float *&ys, const float *&zs) const
Provides a direct access to points buffer, or nullptr if there is no points in the map.
TInsertionOptions insertionOptions
The options used when inserting observations in the map.
mrpt::maps::CSimplePointsMap m_cache_points
This base provides a set of functions for maths stuff.
void clear()
Erase all the contents of the map.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
void writeToStreamRender(mrpt::serialization::CArchive &out) const
mrpt::poses::CPose3D sensorPose
The 6D pose of the sensor on the robot at the moment of starting the scan.
mrpt::containers::ContainerReadOnlyProxyAccessor< mrpt::aligned_std_vector< char > > validRange
It's false (=0) on no reflected rays, referenced to elements in scan.
The namespace for 3D scene representation and rendering.
void readFromStreamRender(mrpt::serialization::CArchive &in)
void render_dl() const override
Render.
GLAPI void GLAPIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor)
This object renders a 2D laser scan by means of three elements: the points, the line along end-points...
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 | |