From: David D. <dav...@gm...> - 2009-02-13 15:12:32
|
Say I have a vector<vgl_point_3d<double> > Points; I can do this: vgl_box_3d<double> BB; vgl_box_3d_bounds(Points.begin(), Points.end(), BB); But what if I have vector<vgl_poitn_3d<double> *> Points; Do I have to dereference every element and store them all in a vector<vgl_point_3d<double> > before calling this function? -- Thanks, David |
From: Ian S. <ian...@st...> - 2009-02-13 15:15:54
|
David Doria wrote: > Say I have a > vector<vgl_point_3d<double> > Points; > > I can do this: > vgl_box_3d<double> BB; > vgl_box_3d_bounds(Points.begin(), Points.end(), BB); > > But what if I have > vector<vgl_poitn_3d<double> *> Points; > > Do I have to dereference every element and store them all in a > vector<vgl_point_3d<double> > before calling this function? Or write your own version of vgl_box_3d_bounds - it's trivial. Or write an iterator that dereferences the pointer. Ian. |