This post was updated on .
Hi,
I am trying to create my custom Point type that stores the Point( i.e. x,y,z coordinates) as well as three normals. I had a look at the PointNormal Definition struct PointNormal 00301 { 00302 PCL_ADD_POINT4D; // This adds the members x,y,z which can also be accessed using the point (which is float[4]) 00303 PCL_ADD_NORMAL4D; // This adds the member normal[3] which can also be accessed using the point (which is float[4]) 00304 union 00305 { 00306 struct 00307 { 00308 float curvature; 00309 }; I believe line 303 will enable me to access the each individual value for example p.normal[0], which should give me the x coordinate of the normal. Please correct me if the above was wrong. I am now looking to extend this to three vectors(not Normals but Eigen Vectors) using a Eigen3f Matrix . Eigen::Matrix3f eigVector; struct PointEig { PCL_ADD_POINT4D; Eigen::Matrix3f eigVector; }; If i were to implement it as above how can i access the eigenVector at a point p for example like p.eigVector, would this work? If not how can i change it ? Thanks in Advance 
Administrator

Unfortunately nonPOD types (http://en.wikipedia.org/wiki/Plain_old_data_structure) cannot be used as members of a PCL
point type. Cheers, Radu.  http://openperception.org On 06/13/2013 04:23 AM, Merlyn wrote: > Hi, > > I am trying to create my custom Point type that stores the Point( i.e. x,y,z > coordinates) as well as three normals. I had a look at the PointNormal > Definition > > struct PointNormal > 00301 { > 00302 PCL_ADD_POINT4D; // This adds the members x,y,z which can also be > accessed using the point (which is float[4]) > 00303 PCL_ADD_NORMAL4D; // This adds the member normal[3] which can also > be accessed using the point (which is float[4]) > 00304 union > 00305 { > 00306 struct > 00307 { > 00308 float curvature; > 00309 }; > > I believe line 303 will enable me to access the each individual value for > example p.normal[0], which should give me the x coordinate of the normal. > Please correct me if the above was wrong. I am now looking to extend this to > three vectors(not Normals but Eigen Vectors) using a Eigen3f Matrix . > > Eigen::Matrix3f eigVector; > > struct PointEig > { > PCL_ADD_POINT4D; > union > { > struct > Eigen::Matrix3f eigVector; > }; > float data_c[4]; > }; > > If i were to implement it as above how can i access the eigenVector at a > point p for example like p.eigVector, would this work? If not how can i > change it ? > > Thanks in Advance > > > >  > View this message in context: http://www.pclusers.org/PointEigenvectorstp4028243.html > Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com. > _______________________________________________ > [hidden email] / http://pointclouds.org > http://pointclouds.org/mailman/listinfo/pclusers > [hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pclusers 
Free forum by Nabble  Resume Templates  Edit this page 