@@ -342,7 +342,7 @@ namespace pcl
342342 PCL_EXPORTS std::ostream& operator << (std::ostream& os, const RGB& p);
343343 /* * \brief A structure representing RGB color information.
344344 *
345- * The RGBA information is available either as separate r, g, b, or as a
345+ * The RGB information is available either as separate r, g, b or as a
346346 * packed std::uint32_t rgba value. To pack it, use:
347347 *
348348 * \code
@@ -355,7 +355,7 @@ namespace pcl
355355 * int rgb = ...;
356356 * std::uint8_t r = (rgb >> 16) & 0x0000ff;
357357 * std::uint8_t g = (rgb >> 8) & 0x0000ff;
358- * std::uint8_t b = (rgb) & 0x0000ff;
358+ * std::uint8_t b = (rgb) & 0x0000ff;
359359 * \endcode
360360 *
361361 */
@@ -506,20 +506,21 @@ namespace pcl
506506 PCL_EXPORTS std::ostream& operator << (std::ostream& os, const PointXYZRGBA& p);
507507 /* * \brief A point structure representing Euclidean xyz coordinates, and the RGBA color.
508508 *
509- * The RGBA information is available either as separate r, g, b, or as a
510- * packed std::uint32_t rgba value. To pack it, use:
509+ * The RGBA information is available either as separate r, g, b and a uint8_t values,
510+ * or as a packed std::uint32_t rgba value. To pack it, use:
511511 *
512512 * \code
513- * int rgb = ((int)r) << 16 | ((int)g) << 8 | ((int)b);
513+ * int rgba = ((int)a) << 24 | (int)r) << 16 | ((int)g) << 8 | ((int)b);
514514 * \endcode
515515 *
516516 * To unpack it use:
517517 *
518518 * \code
519519 * int rgb = ...;
520+ * std::uint8_t a = (rgb >> 24) & 0x0000ff;
520521 * std::uint8_t r = (rgb >> 16) & 0x0000ff;
521522 * std::uint8_t g = (rgb >> 8) & 0x0000ff;
522- * std::uint8_t b = (rgb) & 0x0000ff;
523+ * std::uint8_t b = (rgb) & 0x0000ff;
523524 * \endcode
524525 *
525526 * \ingroup common
0 commit comments