00001
00002 #ifndef PCL_MESSAGE_POLYGONMESH_H
00003 #define PCL_MESSAGE_POLYGONMESH_H
00004 #include <string>
00005 #include <vector>
00006 #include <ostream>
00007 #include "ros/serialization.h"
00008 #include "ros/builtin_message_traits.h"
00009 #include "ros/message_operations.h"
00010 #include "ros/message.h"
00011 #include "ros/time.h"
00012
00013 #include "std_msgs/Header.h"
00014 #include "sensor_msgs/PointCloud2.h"
00015 #include "pcl/Vertices.h"
00016
00017 namespace pcl
00018 {
00019 template <class ContainerAllocator>
00020 struct PolygonMesh_ : public ros::Message
00021 {
00022 typedef PolygonMesh_<ContainerAllocator> Type;
00023
00024 PolygonMesh_()
00025 : header()
00026 , cloud()
00027 , polygons()
00028 {
00029 }
00030
00031 PolygonMesh_(const ContainerAllocator& _alloc)
00032 : header(_alloc)
00033 , cloud(_alloc)
00034 , polygons(_alloc)
00035 {
00036 }
00037
00038 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00039 ::std_msgs::Header_<ContainerAllocator> header;
00040
00041 typedef ::sensor_msgs::PointCloud2_<ContainerAllocator> _cloud_type;
00042 ::sensor_msgs::PointCloud2_<ContainerAllocator> cloud;
00043
00044 typedef std::vector< ::pcl::Vertices_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::pcl::Vertices_<ContainerAllocator> >::other > _polygons_type;
00045 std::vector< ::pcl::Vertices_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::pcl::Vertices_<ContainerAllocator> >::other > polygons;
00046
00047
00048 ROS_DEPRECATED uint32_t get_polygons_size() const { return (uint32_t)polygons.size(); }
00049 ROS_DEPRECATED void set_polygons_size(uint32_t size) { polygons.resize((size_t)size); }
00050 ROS_DEPRECATED void get_polygons_vec(std::vector< ::pcl::Vertices_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::pcl::Vertices_<ContainerAllocator> >::other > & vec) const { vec = this->polygons; }
00051 ROS_DEPRECATED void set_polygons_vec(const std::vector< ::pcl::Vertices_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::pcl::Vertices_<ContainerAllocator> >::other > & vec) { this->polygons = vec; }
00052 private:
00053 static const char* __s_getDataType_() { return "pcl/PolygonMesh"; }
00054 public:
00055 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00056
00057 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00058
00059 private:
00060 static const char* __s_getMD5Sum_() { return "45a5fc6ad2cde8489600a790acc9a38a"; }
00061 public:
00062 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00063
00064 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00065
00066 private:
00067 static const char* __s_getMessageDefinition_() { return "# Separate header for the polygonal surface\n\
00068 Header header\n\
00069 # Vertices of the mesh as a point cloud\n\
00070 sensor_msgs/PointCloud2 cloud\n\
00071 # List of polygons\n\
00072 Vertices[] polygons\n\
00073 \n\
00074 ================================================================================\n\
00075 MSG: std_msgs/Header\n\
00076 # Standard metadata for higher-level stamped data types.\n\
00077 # This is generally used to communicate timestamped data \n\
00078 # in a particular coordinate frame.\n\
00079 # \n\
00080 # sequence ID: consecutively increasing ID \n\
00081 uint32 seq\n\
00082 #Two-integer timestamp that is expressed as:\n\
00083 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00084 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00085 # time-handling sugar is provided by the client library\n\
00086 time stamp\n\
00087 #Frame this data is associated with\n\
00088 # 0: no frame\n\
00089 # 1: global frame\n\
00090 string frame_id\n\
00091 \n\
00092 ================================================================================\n\
00093 MSG: sensor_msgs/PointCloud2\n\
00094 # This message holds a collection of N-dimensional points, which may\n\
00095 # contain additional information such as normals, intensity, etc. The\n\
00096 # point data is stored as a binary blob, its layout described by the\n\
00097 # contents of the \"fields\" array.\n\
00098 \n\
00099 # The point cloud data may be organized 2d (image-like) or 1d\n\
00100 # (unordered). Point clouds organized as 2d images may be produced by\n\
00101 # camera depth sensors such as stereo or time-of-flight.\n\
00102 \n\
00103 # Time of sensor data acquisition, and the coordinate frame ID (for 3d\n\
00104 # points).\n\
00105 Header header\n\
00106 \n\
00107 # 2D structure of the point cloud. If the cloud is unordered, height is\n\
00108 # 1 and width is the length of the point cloud.\n\
00109 uint32 height\n\
00110 uint32 width\n\
00111 \n\
00112 # Describes the channels and their layout in the binary data blob.\n\
00113 PointField[] fields\n\
00114 \n\
00115 bool is_bigendian # Is this data bigendian?\n\
00116 uint32 point_step # Length of a point in bytes\n\
00117 uint32 row_step # Length of a row in bytes\n\
00118 uint8[] data # Actual point data, size is (row_step*height)\n\
00119 \n\
00120 bool is_dense # True if there are no invalid points\n\
00121 \n\
00122 ================================================================================\n\
00123 MSG: sensor_msgs/PointField\n\
00124 # This message holds the description of one point entry in the\n\
00125 # PointCloud2 message format.\n\
00126 uint8 INT8 = 1\n\
00127 uint8 UINT8 = 2\n\
00128 uint8 INT16 = 3\n\
00129 uint8 UINT16 = 4\n\
00130 uint8 INT32 = 5\n\
00131 uint8 UINT32 = 6\n\
00132 uint8 FLOAT32 = 7\n\
00133 uint8 FLOAT64 = 8\n\
00134 \n\
00135 string name # Name of field\n\
00136 uint32 offset # Offset from start of point struct\n\
00137 uint8 datatype # Datatype enumeration, see above\n\
00138 uint32 count # How many elements in the field\n\
00139 \n\
00140 ================================================================================\n\
00141 MSG: pcl/Vertices\n\
00142 # List of point indices\n\
00143 uint32[] vertices\n\
00144 \n\
00145 "; }
00146 public:
00147 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00148
00149 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00150
00151 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00152 {
00153 ros::serialization::OStream stream(write_ptr, 1000000000);
00154 ros::serialization::serialize(stream, header);
00155 ros::serialization::serialize(stream, cloud);
00156 ros::serialization::serialize(stream, polygons);
00157 return stream.getData();
00158 }
00159
00160 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00161 {
00162 ros::serialization::IStream stream(read_ptr, 1000000000);
00163 ros::serialization::deserialize(stream, header);
00164 ros::serialization::deserialize(stream, cloud);
00165 ros::serialization::deserialize(stream, polygons);
00166 return stream.getData();
00167 }
00168
00169 ROS_DEPRECATED virtual uint32_t serializationLength() const
00170 {
00171 uint32_t size = 0;
00172 size += ros::serialization::serializationLength(header);
00173 size += ros::serialization::serializationLength(cloud);
00174 size += ros::serialization::serializationLength(polygons);
00175 return size;
00176 }
00177
00178 typedef boost::shared_ptr< ::pcl::PolygonMesh_<ContainerAllocator> > Ptr;
00179 typedef boost::shared_ptr< ::pcl::PolygonMesh_<ContainerAllocator> const> ConstPtr;
00180 };
00181 typedef ::pcl::PolygonMesh_<std::allocator<void> > PolygonMesh;
00182
00183 typedef boost::shared_ptr< ::pcl::PolygonMesh> PolygonMeshPtr;
00184 typedef boost::shared_ptr< ::pcl::PolygonMesh const> PolygonMeshConstPtr;
00185
00186
00187 template<typename ContainerAllocator>
00188 std::ostream& operator<<(std::ostream& s, const ::pcl::PolygonMesh_<ContainerAllocator> & v)
00189 {
00190 ros::message_operations::Printer< ::pcl::PolygonMesh_<ContainerAllocator> >::stream(s, "", v);
00191 return s;}
00192
00193 }
00194
00195 namespace ros
00196 {
00197 namespace message_traits
00198 {
00199 template<class ContainerAllocator>
00200 struct MD5Sum< ::pcl::PolygonMesh_<ContainerAllocator> > {
00201 static const char* value()
00202 {
00203 return "45a5fc6ad2cde8489600a790acc9a38a";
00204 }
00205
00206 static const char* value(const ::pcl::PolygonMesh_<ContainerAllocator> &) { return value(); }
00207 static const uint64_t static_value1 = 0x45a5fc6ad2cde848ULL;
00208 static const uint64_t static_value2 = 0x9600a790acc9a38aULL;
00209 };
00210
00211 template<class ContainerAllocator>
00212 struct DataType< ::pcl::PolygonMesh_<ContainerAllocator> > {
00213 static const char* value()
00214 {
00215 return "pcl/PolygonMesh";
00216 }
00217
00218 static const char* value(const ::pcl::PolygonMesh_<ContainerAllocator> &) { return value(); }
00219 };
00220
00221 template<class ContainerAllocator>
00222 struct Definition< ::pcl::PolygonMesh_<ContainerAllocator> > {
00223 static const char* value()
00224 {
00225 return "# Separate header for the polygonal surface\n\
00226 Header header\n\
00227 # Vertices of the mesh as a point cloud\n\
00228 sensor_msgs/PointCloud2 cloud\n\
00229 # List of polygons\n\
00230 Vertices[] polygons\n\
00231 \n\
00232 ================================================================================\n\
00233 MSG: std_msgs/Header\n\
00234 # Standard metadata for higher-level stamped data types.\n\
00235 # This is generally used to communicate timestamped data \n\
00236 # in a particular coordinate frame.\n\
00237 # \n\
00238 # sequence ID: consecutively increasing ID \n\
00239 uint32 seq\n\
00240 #Two-integer timestamp that is expressed as:\n\
00241 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00242 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00243 # time-handling sugar is provided by the client library\n\
00244 time stamp\n\
00245 #Frame this data is associated with\n\
00246 # 0: no frame\n\
00247 # 1: global frame\n\
00248 string frame_id\n\
00249 \n\
00250 ================================================================================\n\
00251 MSG: sensor_msgs/PointCloud2\n\
00252 # This message holds a collection of N-dimensional points, which may\n\
00253 # contain additional information such as normals, intensity, etc. The\n\
00254 # point data is stored as a binary blob, its layout described by the\n\
00255 # contents of the \"fields\" array.\n\
00256 \n\
00257 # The point cloud data may be organized 2d (image-like) or 1d\n\
00258 # (unordered). Point clouds organized as 2d images may be produced by\n\
00259 # camera depth sensors such as stereo or time-of-flight.\n\
00260 \n\
00261 # Time of sensor data acquisition, and the coordinate frame ID (for 3d\n\
00262 # points).\n\
00263 Header header\n\
00264 \n\
00265 # 2D structure of the point cloud. If the cloud is unordered, height is\n\
00266 # 1 and width is the length of the point cloud.\n\
00267 uint32 height\n\
00268 uint32 width\n\
00269 \n\
00270 # Describes the channels and their layout in the binary data blob.\n\
00271 PointField[] fields\n\
00272 \n\
00273 bool is_bigendian # Is this data bigendian?\n\
00274 uint32 point_step # Length of a point in bytes\n\
00275 uint32 row_step # Length of a row in bytes\n\
00276 uint8[] data # Actual point data, size is (row_step*height)\n\
00277 \n\
00278 bool is_dense # True if there are no invalid points\n\
00279 \n\
00280 ================================================================================\n\
00281 MSG: sensor_msgs/PointField\n\
00282 # This message holds the description of one point entry in the\n\
00283 # PointCloud2 message format.\n\
00284 uint8 INT8 = 1\n\
00285 uint8 UINT8 = 2\n\
00286 uint8 INT16 = 3\n\
00287 uint8 UINT16 = 4\n\
00288 uint8 INT32 = 5\n\
00289 uint8 UINT32 = 6\n\
00290 uint8 FLOAT32 = 7\n\
00291 uint8 FLOAT64 = 8\n\
00292 \n\
00293 string name # Name of field\n\
00294 uint32 offset # Offset from start of point struct\n\
00295 uint8 datatype # Datatype enumeration, see above\n\
00296 uint32 count # How many elements in the field\n\
00297 \n\
00298 ================================================================================\n\
00299 MSG: pcl/Vertices\n\
00300 # List of point indices\n\
00301 uint32[] vertices\n\
00302 \n\
00303 ";
00304 }
00305
00306 static const char* value(const ::pcl::PolygonMesh_<ContainerAllocator> &) { return value(); }
00307 };
00308
00309 template<class ContainerAllocator> struct HasHeader< ::pcl::PolygonMesh_<ContainerAllocator> > : public TrueType {};
00310 template<class ContainerAllocator> struct HasHeader< const ::pcl::PolygonMesh_<ContainerAllocator> > : public TrueType {};
00311 }
00312 }
00313
00314 namespace ros
00315 {
00316 namespace serialization
00317 {
00318
00319 template<class ContainerAllocator> struct Serializer< ::pcl::PolygonMesh_<ContainerAllocator> >
00320 {
00321 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00322 {
00323 stream.next(m.header);
00324 stream.next(m.cloud);
00325 stream.next(m.polygons);
00326 }
00327
00328 ROS_DECLARE_ALLINONE_SERIALIZER;
00329 };
00330 }
00331 }
00332
00333 namespace ros
00334 {
00335 namespace message_operations
00336 {
00337
00338 template<class ContainerAllocator>
00339 struct Printer< ::pcl::PolygonMesh_<ContainerAllocator> >
00340 {
00341 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::pcl::PolygonMesh_<ContainerAllocator> & v)
00342 {
00343 s << indent << "header: ";
00344 s << std::endl;
00345 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00346 s << indent << "cloud: ";
00347 s << std::endl;
00348 Printer< ::sensor_msgs::PointCloud2_<ContainerAllocator> >::stream(s, indent + " ", v.cloud);
00349 s << indent << "polygons[]" << std::endl;
00350 for (size_t i = 0; i < v.polygons.size(); ++i)
00351 {
00352 s << indent << " polygons[" << i << "]: ";
00353 s << std::endl;
00354 s << indent;
00355 Printer< ::pcl::Vertices_<ContainerAllocator> >::stream(s, indent + " ", v.polygons[i]);
00356 }
00357 }
00358 };
00359
00360
00361 }
00362 }
00363
00364 #endif // PCL_MESSAGE_POLYGONMESH_H
00365