Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef NURBS_TRIANGULATION_H
00039 #define NURBS_TRIANGULATION_H
00040
00041 #include <pcl/pcl_exports.h>
00042 #include <pcl/point_cloud.h>
00043 #include <pcl/point_types.h>
00044 #include <pcl/surface/3rdparty/opennurbs/opennurbs.h>
00045 #include <pcl/PolygonMesh.h>
00046
00047 #include <pcl/surface/on_nurbs/nurbs_data.h>
00048
00049 namespace pcl
00050 {
00051 namespace on_nurbs
00052 {
00053
00055 class PCL_EXPORTS Triangulation
00056 {
00057 protected:
00059 static void
00060 createIndices (std::vector<pcl::Vertices> &vertices, unsigned vidx, unsigned segX, unsigned segY);
00061
00063 static void
00064 createVertices (pcl::PointCloud<pcl::PointXYZ>::Ptr &cloud, float x0, float y0, float z0, float width,
00065 float height, unsigned segX, unsigned segY);
00066
00067 public:
00068 static bool
00069 isInside(const ON_NurbsCurve &curve, const pcl::PointXYZ &v);
00070
00071
00072
00073
00074
00075
00076
00077
00082 static void
00083 convertSurface2PolygonMesh (const ON_NurbsSurface &nurbs, PolygonMesh &mesh, unsigned resolution);
00084
00090 static void
00091 convertTrimmedSurface2PolygonMesh (const ON_NurbsSurface &nurbs, const ON_NurbsCurve &curve, PolygonMesh &mesh,
00092 unsigned resolution);
00093 static void
00094 convertTrimmedSurface2PolygonMesh (const ON_NurbsSurface &nurbs, const ON_NurbsCurve &curve, PolygonMesh &mesh,
00095 unsigned resolution, vector_vec3d &start, vector_vec3d &end);
00096
00103 static void
00104 convertSurface2Vertices (const ON_NurbsSurface &nurbs, pcl::PointCloud<pcl::PointXYZ>::Ptr cloud,
00105 std::vector<pcl::Vertices> &vertices, unsigned resolution);
00106
00112 static void
00113 convertCurve2PointCloud (const ON_NurbsCurve &nurbs, pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud,
00114 unsigned resolution);
00115
00121 static void
00122 convertCurve2PointCloud (const ON_NurbsCurve &curve, const ON_NurbsSurface &surf,
00123 pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud, unsigned resolution);
00124
00125 };
00126 }
00127 }
00128
00129 #endif