From ecb22263458d67de763d9362ffa8265525715b7b Mon Sep 17 00:00:00 2001 From: John Lambert Date: Wed, 6 Jan 2021 12:55:20 -0500 Subject: [PATCH] make r,g,b part of constructor w/ default values --- gtsam/slam/dataset.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gtsam/slam/dataset.h b/gtsam/slam/dataset.h index e4162fa75..00e3516d0 100644 --- a/gtsam/slam/dataset.h +++ b/gtsam/slam/dataset.h @@ -218,10 +218,11 @@ typedef std::pair SiftIndex; /// Define the structure for the 3D points struct SfmTrack { - SfmTrack(): p(0,0,0) {} - SfmTrack(const gtsam::Point3& pt) : p(pt) {} + SfmTrack(float r = 0, float g = 0, float b = 0): p(0,0,0), r(r), g(g), b(b) {} + SfmTrack(const gtsam::Point3& pt, float r = 0, float g = 0, float b = 0) : p(pt), r(r), g(g), b(b) {} + Point3 p; ///< 3D position of the point - float r = 0, g = 0, b = 0; ///< RGB color of the 3D point + float r, g, b; ///< RGB color of the 3D point std::vector measurements; ///< The 2D image projections (id,(u,v)) std::vector siftIndices;